Gltf-viewer shows only one animation out of many

Hello,
I am new to three.js, blender animations and subsequent loaders.
Setup- I downloaded two animations from https://www.mixamo.com (one skinned and one without- both in .fbx format), I then imported them into my Blender. Finally exported them in .gltf format
Requirement- view all the animations in https://gltf-viewer.donmccurdy.com/
Issue- my .glb file contains two animations, but in the gltf-viewer I can see only one animation working(the one with skin).
I am not sure if there are steps to be taken while exporting from Blender. (Blender version- 2.91.0).
You can download my .glb file from here
Please let me know what am I missing over here.

Thanks in advance! :v:

If you export the model as gltf instead of glb - you’ll be able to open it in code editor, like VSCode, and see if both animations are actually exported (Blender sometimes acts a bit weird, and you have to clone animation for it to actually export :see_no_evil: )

Hi, I checked in my editor, all the animations are exported. Both the animations are available even in the ‘animation’ dropdown in https://gltf-viewer.donmccurdy.com/ but only one animation is working when checked.
Also, could you point me to some documentation on cloning the animations (I searched online but no help).
Thanks for your quick reply!

Duplicating the animation in Blender won’t help much then unfortunately - it can just fix the export issue when the animation just isn’t exported. :pensive:

Are the animations working correctly in Blender? Could you share a sample .blend file?

Yep, the animations are working fine in Blender. You can download my .blend file from here.

Thanks!

It looks like you’ve got two duplicate armatures in Blender, each associated with one animation, and only one of the two is associated with the mesh. There are ways to play that back in Blender (associations between Actions and objects are fluid) but when exporting this creates two skeletons, and I think one of them is not attached to any THREE.SkinnedMesh, so you don’t see any effect when playing back the animation.

To fix that you need to “Push Down” or “Stash” an NLA track for both animations, on just one of the armatures (to bind them both to export with that armature). You can then delete the other armature.

2 Likes

I opened the NLA track and added action strip (of the unskinned armature) on skinned one and later deleted the unskinned armature from the collection. And it works as expected in the gltf-viewer!
Thanks a lot for your input!

1 Like