Updating the dot_vox Rust Crate
Status: Merged and released in dot_vox v5.1.1.
Context: The software MagicaVoxel is (according to their website):
A free lightweight GPU-based voxel art editor and interactive path tracing renderer.
It uses it’s own .vox
file type to store it’s voxel positions and color, animations, scene information, camera positions, etc.
There is a Rust crate called dot_vox. It implements a parser for reading and writing to these types of files.
Pull Requests
While I was implementing something completely unrelated, I stumbled upon a bug in the aforementioned module. According to the specification, it was reading/writing files wrong by expecting a deprecated type of chunk.
To get myself unblocked, I put up a fix.
After the fix, my original project required me to implement a voxel terrain generator that would output a .vox
file. The model abstraction stored within the file was limiting because it only allowed models with smaller dimensions than 256x256x50. This would not work for me because I wanted terrain that was thousands of voxels wide.
This led me to implement the parts of the specification (in a second PR) that allowed me to save multiple models within the same file.
In conclusion, I’d like to thank Zhixing Zhang for his timely feedback on my contributions. With his help, I was able to merge the code and return to my original project.