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?
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.
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.
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.
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.
Is it okay to use SceneLoader.Append not at the start? The console kept showing this if I do so: WebGL: INVALID_VALUE: getProgramParamter: attempt to use a deleted object
Or, are there any other ways to do this without warnings? And, how to get the mesh object after I loaded that draco-compressed file?