glTF export corrupts original file structure


I’m trying to build a pipeline to process uploaded glb files. The idea is to add several tools such as texture compression, etc. Right now, when I load a glb file with glTFLoader, it works well. But when I export the file again (without any modification), I get several errors related to the interaction between skins and skeleton.

I attach two models, which are correct glb files (according to glTF Validator), that become corrupted after the export operation (glTFExporter). I’m only using binary : true and animations : animations (where animations is the original array available in the glb) as options.

Any ideas?

Thank you,

Anim_no_root.glb (55.5 KB)
Anim_root.glb (55.6 KB)

If you could report a bug with some example code for the export I think someone could take a look. But in general, GLTFLoader → GLTFExporter can be lossy, I don’t know if I’d recommend that for a content pipeline unless you’re willing to modify one or both of them to your needs. I wrote for that purpose, which supports a few forms of compression already (see the CLI docs page for examples), if it helps.