-
Notifications
You must be signed in to change notification settings - Fork 513
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
gltfpack: hope compressed model reusing attributes and indices bin data as the same as the origin model #726
Comments
@zeux Could you give me some advice how to share the attributes data between different meshes? |
gltfpack currently works with mesh attributes independently so the attribute data isn’t shared; doing that for an arbitrary example requires implementing deduplication on an attribute level. Note that instances like this can be represented using KHR_materials_variants extension; if the input file contains it, gltfpack will correctly preserve it without geometry duplication. For this to work the application would need to use variant switching instead of scene switching as there’s no way to encode “active” variant per scene. |
Thanks for the valuable advice, I'll look into the KHR_materials_variants extension first。 |
Not in the short term but it can probably happen in the future. |
This is properly fixed by #782 I believe (which is part of last gltfpack release). |
nice work! |
As mentioned in 723, in the origin gltf model, mesh[0] and mesh[1] have the same attributes data(buffer index 1, 2, 4, 5) and the same indices data(buffer index 0, 3), only materials are different.
After 724 fix, the scenes informations of meshopt compress model are correct, but the meshes data are not reused, actually attributes and indices bin data of meshes[0] and meshes[1] in the compressed model are repeated. buffer index (0, 1, 2, 3, 4, 5) vs buffer index ( 6, 7, 8, 9, 10, 11) have the same data.
If vertex attributes and index data can be reused, the model size can be further reduced.
Thanks!
origin.zip
originMeshopt2.zip
The text was updated successfully, but these errors were encountered: