Error when compressing glTF model with DRACO compression
See original GitHub issueI’ve been researching on how to compress a multi-texture OBJ with DRACO to be able to render in THREE.js. Anyways, after some discussions in this thread, I was advised to convert the OBJ to glTF and then leverage the V2 branch here to compress the glTF with DRACO compression.
Here are my steps:
- Generated a 3D OBJ model with OpenDroneMap. You can download a model with WebODM
- Converted the multi-texture OBJ to glTF via https://github.com/AnalyticalGraphicsInc/obj2gltf
- Tried to compress the new glTF via v2 branch and got the following error:
$ node ./gltf-pipeline/bin/gltf-pipeline.js -i odm/odm_textured_model.gltf -d --stats
Statistics before:
Total byte length of all buffers: 60397176 bytes
Images: 4
Draw calls: 4
Rendered primitives (e.g., triangles): 193353
Nodes: 1
Meshes: 1
Materials: 4
Animations: 0
External requests (not data uris): 0
1
1
abort(1). Build with -s ASSERTIONS=1 for more info.
Thank you for your help and assistance.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Draco GLTF Decompression Error - Bugs - Babylon.js Forum
Ive been using Draco to compress/ decompress my 3D model sizes, its working fine on OBJ and PLY, but the decompression is not...
Read more >Gltf-pipeline draco compression not working! - Questions
The Draco set up is working now, but I noticed that I can no longer compress the compressed files from Blender, it seems...
Read more >[SOLVED] Error when loading glb compressed with Draco
I'm new with GLB compressed with Draco. I can see this model in the Playcanvas gltf viewer without any problem.
Read more >gltf piepeline draco compression creates weird edges
Is there any way I can compress glb model without creating weird edges? javascript · three.js · 3d · gltf · react-fiber ·...
Read more >DRACO Loader - Three.js Tutorials - sbcode.net
glTF files can also be compressed using the DRACO library, and they can also be loaded using the glTF loader. We can configure...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed the secondary issue in https://github.com/AnalyticalGraphicsInc/gltf-pipeline/commit/734f85d26e766834347cb2ec835a6c694b970734 by adding a stage that splits primitives that share the same attributes but have different indices. This unintentionally fixed the draco crash too. The model now converts correctly.
Thanks @FarhadG
It seems like this is an error from within the draco library. @FrankGalligan would you be to take a look at this? I uploaded the gltf here: https://drive.google.com/open?id=1u8oSGfsDpPTxD41MuJusbPahI126t9qC.
If it helps with debugging, primitive at index 3 is failing at
EncodeMeshToDracoBuffer
. Also the model converts correctly ifMESH_SEQUENTIAL_ENCODING
is applied.This also reveals a secondary issue where mesh data is encoded multiple times when primitives share the same attributes but have different indices. I might have a chance later to look into that. For example the original glTF looks like:
Possibly relevant: https://github.com/KhronosGroup/glTF/issues/1267