GLTF2Export.GLBAsync is increasing the size of the mesh is exported for some glbs

Please check the below model. when i call GLTF2Export.GLBAsync or in sandbox export, the model size is increasing 10 times from 6 MB to 60 MB

Adding @bghgary to see if he spots something obvious ?

When I save this GLB from Sandbox as .babylon file the size is even larger - 273 Mb.

It looks like this model is a Draco compressed model. We don’t have Draco compression yet when writing out the model, so it will expand when round tripping. I do not recommend using Babylon to round trip glTF files. This process will very likely be lossy.


@bghgary , got it, but i have scenario can you suggest me design approach, i have model which is draco compressed in my local machine, in my editor which is built on babylonjs will try to upload to server, but before upload would like to update few properties in the editor, while updating model back to server i am using GLTF2Export to convert to Glb and uploading back, now due to compression is not implemented in this exporter, i size is increasing, how to solve this

I’m not sure there is an easy solve. We have an issue for adding Draco compression to the export. Once that is implemented, then your editor will have to decide whether to use it or not. It’s perhaps possible to detect the extensions used in the original file and export using the same extensions (assuming the export has all the extensions implemented). But there is very likely going to be loss in the process.