Convert Draco to glb format

Hello everyone!
I want to group multiple Draco-compressed geometry files into a GLB file. Is there any way to do this without decompressing the geometry? I’m new to this, and unfortunately, I couldn’t find any resources on it :frowning:

I’m not a GLTF expert. However, it looks like the Draco mesh compression is declared in the GLTF at the bufferView level. These can be backed by different sections of the same buffer or different ones, with buffer roughly mapping to file.

So as far as pure GLTF is concerned, looks like you can unpack the GLB, and then store the pre-Draco’ed geometry in different sections of the same buffer or different ones, referenced by the new unified GLTF file.

However, in order to re-pack this as a GLB, this section from the GLTF 2.0 Spec may suggest that you need to prefer the former

Take this with a pound of salt though. I’m no GLTF guru.

References:

+1 to @Dark_Photon’s comments. I think you would need to repack the same buffer views into a single buffer to write a .glb file. If you were OK with having a single .gltf file with multiple .bin resources — one for each input scene — that is simpler.

If possible, there are some advantages to compressing after joining files, rather than before. If the scenes are meant to join nicely (like adjacent chunks of terrain) then you need to use the same quantization grid with each file to avoid seams.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.