Closed mgerhardy closed 2 years ago
To properly fix this I have to refactor the way I handle the volumes. I do the voxel rotation while loading a volume. This doesn't work very well for magicavoxel vox files. As this format supports multiple objects in the scene with different rotation and translation to point to the same volume. There is e.g. a prince of persia scene, that references the same tile again and again to assemble a full scene. This feature is not yet supported.
Looks like I have to fully support the scene graph, or I would otherwise waste a lot of memory.
The id from the LAYR
chunk is most likely mapped to the layerId of the nTRN
chunk:
Support for the scene graph should get added via VoxelVolume - model matrix and RawVolume pointer (with the information about whether the particular instance is owning the RawVolume data or whether it's just a reference in the graph)
VoxelVolume
was renamed to SceneGraphNode
edfaeca34d837c9cab8ec7c16c20ee693f11eaa9
c298633a5f322d1017e8493f4d06207cfe9059bb should fix this issue. Feedback welcome
voxconvert got the --dump
option to print the scene graph to the console. This should also help to get the filter ids for layers in voxconvert by counting the model nodes.
i created 8 objects and put each 2 of them into 1 layer but the convertor does not count the layers. it counts the objects. and if my objects go pass the 8 layers (or technically 7 because it starts from 0) it wont work.