Draco GLTF Decompression Error

Hey Guys!
Ive been using Draco to compress/ decompress my 3D model sizes, its working fine on OBJ and PLY, but the decompression is not working on GLTF files and im having this error. Is anyone familiar with why this is happening and how to fix it?
draco error


1 Like

pinging @bghgary

Can you share the model? When you say it’s not working on GLTF files, are you loading it in the sandbox? If you can, set up a playground would be the best way for us to help you.

Hey @bghgary thank you for offering your help!

I am using a car model for this project, where I tested on an obj version and glb version as shown below; both show completely fine on Babylon Sandbox.


Then I compressed both files using Draco

And got the following files; the first file is a resultant from obj while the second is from the glb file.


Then I used the Draco decoder to decompress the files and show them inside Babylon.
Here is a playground link that mimics what I am working with https://playground.babylonjs.com/#22MFU2#8.
As you can see in the playground, when loading the obj compressed file as the url and using the draco decoder everything works fine. But when you try to use the glb compressed file as the url and use the gltf draco decoder in the configuration it doesn’t work!

Also I have been using the gltf pipeline when compressing the glb model.

Any help is appreciated! Thank you!

DRC is a draco file that only contains geometry and thus you load it directly with DracoCompression class. GLB is a 3d asset. You have to load it with SceneLoader.


1 Like

Hey @bghgary thank you so much for your help! This is great! I didn’t know we shouldn’t use the decoder for glb models.

Once again thank you!

1 Like