-
Notifications
You must be signed in to change notification settings - Fork 251
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
Draco compression probably breaks CESIUM_primitive_outline
extension
#630
Comments
Well... yes and no. gltf-pipeline's Draco compression needs to know that a particular index buffer refers to vertices so that it can rewrite the index buffer when the vertex order changes. But it doesn't need to know about CESIUM_primitive_outline specifically. For example, I can imagine annotating the extension's JSON schema with enough information so that gltf-pipeline knows how to do this (as long as it can find the JSON schema for any given extension). Or a user could even supply a command-line argument that says "the indices property of CESIUM_primitive_outline identifies an index buffer that should be updated according to the renumbered vertices." I don't mean to make it sound trivial, cause it's not, but it would be nice to not need to code each extension into gltf-pipeline explicitly. |
How exactly it will determine which indices have to be updated is one question. Certain extensions could be supported by default, and one could think deeply about how to offer further options beyond that (e.g. at the command line, ranging from The more challenging point is how that rewriting itself should take place. Iff the number of indices remains the same, one could try to build some |
Possibly related issue: google/draco#584 |
There are some related issues, e.g. google/draco#326 or google/draco#363 But I gave this a stab. Disclaimer:I have no clue how Draco works, on any level, and how it is integrated into (and used in) the Specifically: I don't know whether this is generally true, or whether What I've done now:
The uncompressed one worked fine. The compressed ones caused the expected
Looking at the GLBs, I noticed that the accessor that the |
This is strongly related to #629 , and may just be another "instance" of the same problem:
The Draco compression restructures the meshes in a non-obvious way. Every extension that is added to a glTF asset for a given mesh structure will likely break when Draco is applied to this asset. Specifically, the
CESIUM_primitive_outline
extension defines a reference to someindices
, but when the topology of the mesh is changed by Draco, then these indices will become invalid.I don't know the necessary technical details of Draco to say how much effort it is (or whether it is even possible) to avoid this. In any case, each extension that should "survive" the Draco compression will have to be taken into account by the
gltf-pipeline
(andCESIUM_primitive_outline
does not seem to be taken into account right now.EDIT: This is in fact a duplicate of #558 , and all these issues might be specific cases of #579 . One suggestion in a comment there was to use
--draco.compressionLevel=0
to still have some compression, but keep the indices intact. Maybe that helps (I haven't tried it out yet).The text was updated successfully, but these errors were encountered: