Addition of support for vox files in version 200. #3097
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I propose this small change to allow loading MagicaVox files in version 200. The Vox files saved by the MagicaVox editor have been in version 200 since version 0.99.7, although no specification for this new version can be found on the internet.
At the end of the message, I am including two links to support my statement, which seem to confirm that loading can still be done in the same way as with version 150 Vox files.
The only noticeable issue is that when exporting the file via the editor instead of saving it, it appears to have been compressed or minified, and therefore the first line containing "VOX " is not present. Even when removing this check, no voxel loads properly, so a solution to this problem would need to be found in the future. However, the strings "SIZE," "XYZI," and "RGBA" remain present in the exported files.
I have conducted tests on 15 .vox models saved via the editor in version 200, and everything is working normally. I can share this test if needed.
ephtracy/ephtracy.github.io#264
AnotherCraft/ac-worldgen#9