-
Notifications
You must be signed in to change notification settings - Fork 502
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: Preserve custom vertex attributes during optimization #529
Comments
Yeah, I had a similar request related to |
Potential patch for copying the ID attributes. 55d7092 |
@zeux I'm not entirely understanding why we can't generically handle vertex attributes - I'm probably missing something. If a user has a custom vertex attribute of a specific type, I'd expect that whichever vertexes are removed, the corresponding indexes for that attribute would also be removed. Is it more complicated than that? |
It's not about copying or removal, it's about whether to preserve the type, how to encode the attribute and which compression filters to use, and how/whether to modify the attribute under various transformations. gltfpack performs a full scene reassembly so it ideally needs to know the semantics behind every component of the scene to perform it correctly and optimally. It's possible to encode every attribute as vec4 of floats with no compression, but that defeats the purpose of using gltfpack and may still misbehave under certain transformations like mesh merging depending on what the attribute means. |
It would be helpful to preserve custom attributes when using gltfpack. Currently, if I pass a glb in with a custom
_ID
vertex attribute, the resulting file has that attribute stripped. Instead, I'd like to see those attributes preserved, and when simplification is applied the indexes that survive simplification should be copied to the new model.Attached are two glbs with custom
_ID
vertex attributes.Archive.zip
The text was updated successfully, but these errors were encountered: