Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of support for vox files in version 200. #3097

Merged
merged 1 commit into from
Jun 4, 2023
Merged

Addition of support for vox files in version 200. #3097

merged 1 commit into from
Jun 4, 2023

Conversation

Bigfoot71
Copy link
Contributor

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

@raysan5
Copy link
Owner

raysan5 commented Jun 4, 2023

@Bigfoot71 Please note that version 200 could have important changes on file structure, just adding the version check is not enough to validate a vox structure specific to version 200, did you check the file structure changes between version 150 and 200, is it somewhere documented?

@Bigfoot71
Copy link
Contributor Author

I couldn't find any specifications for version 200 anywhere, and I'm not the only one, hence the links I shared. An issue regarding this matter is even open on the official repository, but there has been no response from the author.

For compatibility, I rely on the 15 tests I conducted successfully and this comment from another developer who arrived at the same conclusion as me: AnotherCraft/ac-worldgen#9 (comment)

Here is the official specification of the Vox format, which strangely remains at version 150: https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox.txt

@raysan5 raysan5 merged commit 753c0b3 into raysan5:master Jun 4, 2023
@raysan5
Copy link
Owner

raysan5 commented Jun 4, 2023

@Bigfoot71 Thanks for the additional info! Ok, it seems that's a good approach for now, at least until the v200 specs get released or more info provided on the linked issue. I'm merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants