Decoding Failed in threejs after upgrading to [email protected] #488
-
Since upgrading to v2 of glTF-Transform, whenever i try to open a gltf on https://gltf-viewer.donmccurdy.com/ that has been compressed with draco, i get the following error.
The error only happens when I read a remote gltf file that has draco and merge it onto a newly created document with draco compression enabled. Interestingly it does not happen with Sequential Compression, only Edgebreaker, and neither does it happen |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hm, this may be difficult for me to reproduce without the assets, as compression is sensitive to some details in the geometry. Would you be able to share the two assets you're merging? Thanks! |
Beta Was this translation helpful? Give feedback.
glTF Transform won't be able to write a file without also rewriting the associated
.bin
– there's too much to keep track of to be sure that the.bin
hasn't changed, even if you're only merging materials. Moreover, loading the model in glTF Transform decompresses mesh data for editing. If you do something likegltf-transform copy in_compressed.glb out.glb
you'll see this warning:To merge two files without decompressing anything I think you'd need to work directly with the raw JSON, and do pretty careful binary operations on the
.bin
files. In general it is much easier to do processing before compression, and save com…