-
Notifications
You must be signed in to change notification settings - Fork 36
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
ogt_vox: instance order differences between file versions #40
Comments
Interesting, I hadn't noticed this, but thanks for filing it. I expect it is just MV export order that has changed here, but I will try do some A/B tests on 150 versus 200 files soon. Thanks again! |
Hey Doug, so I just resaved the same scene from 2 different versions of magicavoxel:
I've confirmed that the above write file version 150 / 200 respectively, and that when ogt_vox loads the scenes (with group flag or without), version 200 shows instances in reversed order with respect to version 150. ogt_vox doesn't really do anything different depending on file version -- basically it creates instances in the same order in which DAG chunks were emitted in the file, so this must be a change in MV itself. Hopefully we can find an elegant solution here. |
Thanks for the response! I think the easiest first step for file reading is to store the file version in the However currently it looks like |
would be another perfect match for the context discussion - adding the target version here. |
I'm not sure this needs a context, perhaps just a flag to invert order depending on version. As mentioned in my earlier post the minimum would be to store the version as part of the scene (I think this should be done anyway), and have a note about the order somewhere in the documentation and comments. |
In MV vox files the instance order is important for the correct rendering of overlapping voxels. The first instance will 'replace' voxels in later instances. This instance order applies to groups and within groups.
Currently it seems that the instance order read by ogt_vox for version 200 files is inverted with respect to version 150 files. I haven't yet looked into whether this is ogt_vox or the actual file order.
My quick fix was to add a read for the version and switch order (extra note: it could be useful if the version was stored as part of the scene). I will look into this issue in more depth soon.
The text was updated successfully, but these errors were encountered: