Animations lost when exported with GLTF2Export.GLBAsync

Animations lost when GLTF2Export.GLBAsync is used to export a scene with animated models.

What can be the cause?

As far as I know the animations are kicked in automatically, so I think the animations need to be started after models loaded is not the case here.

Also there is color change too.

Any insights?

@bghgary is the master wizard of everything glTF. :smiley: Gary, any thoughts on this one?

@fselcukcan, do you have a Playground that exhibits the behavior you’re seeing? If so, can you post a link to it? Thanks!

Yes, a playground would be best. Depending on what is being animated, there might be either features that are not supported or not implemented yet. The color change is likely not supported as glTF does not have the ability to animate colors without an extension.

Yes, I will supply a PG as soon as possible. I use BJS with an SPA so I decided to use Reactjs, so my BJS constructors etc a little bit dispersed amongst React specific lifecycle methods etc but I will put them together as a classic PG createScene function we all love :slight_smile: or maybe I put as it is now in jsfiddle or similar.

Colors are not animated. But I would like more info on that, any leads?

I am also having trouble with animations lately, what I discovered is that appending a simple test glTF file exported from blender 2.80 with exporter version 0.9.33 or 0.9.35 will give me an end/to value for the animation of -1.7976931348623157e+308 in the inspector, but exporting with version 0.9.25 everything seems ok. My test file was simply adding three keyframes to the default cube to make it “loop”, the only thing i changed was to output to glTF instead of glb i think. So my guess is that either the exporter or blender is the culprit, atleast in my case. I am using the stable 4.0.3 localy so nothing should have changed there.

EDIT: looks like there was a commit yesterday that might help you, looks like it is going to fix my problem atleast: Merge pull request #585 from p3d-in/fix-broken-anim-export · KhronosGroup/glTF-Blender-IO@96f23b8 · GitHub

Animations in glTF 2.0 core can only target translation, rotation, scale, or weights.

I will put up a PG but the case includes me importing a model into scene on my compuer. Is it possible to put an html input type file on PG?

What I need to demonstrate my case is to

  1. import an animated model
  2. export as glb
  3. import the export, to see if animations are still there


  1. I get models from BJS github, or oher model archive
  2. then imported into this PG and exported it with the code. (Then put it into a public gtihub repository to import below again)
  3. Then imported to another PG, or an app with BJS scene which is on my localhost, but animations are gone, no Animation Groups section in Scene Explorer or visible animation

Also when I download and import the original github models to my BSJ scene they also work.
Something happens when I run export methods. Animation groups in scene explorer is also lost.

Exporting skins for glTF is not currently implemented and thus they get lost. If exporting this is important, please file a feature request on GitHub.