habitat-sim
habitat-sim copied to clipboard
[WIP] Voxel saving
Motivation and Context
It's important that voxel grid saving & loading is enabled in the habitat simulator in order to enable users to avoid recreating the same voxel grids multiple times.
As my internship comes to a close, I will not be able to complete this task, but wanted to share my code in case another developer would like to pick it up.
So far, this is just a set of some initial functions for the saving and loading - it is by no means complete, but offers a starting point for implementing this functionality once Magnum can save & load 3D EXR images.
The SVX file format will be used for saving the voxel grids: https://abfab3d.com/svx-format/#:~:text=The%20SVX%20format(Simple%20Voxels,ease%20of%20implementation%2C%20and%20extensibility.&text=The%20basic%20format%20is%20a%20Zip%20file%2C%20named%20with%20a%20.
However, our implementation will save to EXR files instead of png files, since png files cannot store float values (which is needed in order to store float & Magnum Vector3 grids).
Types of changes
- tinyxml2 is introduced here to write to and read from SVX files.
- Functions for loading and saving multiple voxel grids and their structure is provided. Much is still to needed to be done.
- A default constructor for creating a VoxelGrid from a filepath (i.e. a SVX file) is declared but not defined.
Hi @ScottCSteinhauser!
Thank you for your pull request.
We require contributors to sign our Contributor License Agreement, and yours needs attention.
You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.
Process
In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.
Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed
. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.
If you have received this in error or have any questions, please contact us at [email protected]. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!