midstreeeam / MidVoxIO

A python io to load/write/visualize vox files (MagicalVoxel's .vox format).
MIT License
23 stars 3 forks source link

Failed to parse vox version 200 #3

Open arduino12 opened 11 months ago

arduino12 commented 11 months ago

Hi,

@midstreeeam Thanks for this great module!

I just discovered Magicavoxel and downloaded its new version 0.99.7.1 [5/29/2023]. Parsing the vox files from your repo works out of the box, but parsing an example vox file from the new version fails:

from midvoxio.voxio import  * 

viz_vox('assets/vox/98/cat.vox') # works
viz_vox('C:/Users/User/Downloads/MagicaVoxel-0.99.7.1-win64/vox/chr_knight.vox') # fails

I get the folloing error: midvoxio.exceptions.ParsingException: Unknown vox version: 200 expected 150

Can you please fix it?

I get the same error with numpy-vox-io as well, I can only parse the new vox files (version 200) using this code - but there is no numpy nor matplotlib examples :(

My goal is to be able to parse static vox images and animations.

midstreeeam commented 11 months ago

Hi, thank you for reaching out.

I've just noted that the .vox format has been updated to version 200. Unfortunately, there hasn't been clear documentation regarding the specifics of this update. In response, I've implemented a minor update to allow the parser to accept version 200. However, this adjustment is quite basic and does not account for potential nuances in the new version. As such, there may be issues when processing .vox files of version 200. I encourage you to report any problems you encounter with this format.

Additionally, please be aware that if you're looking to convert your array back into a .vox file, the current exported version remains at 150.