How to play all animations from a GLB/GLTF scene simultaneously?

My glTF scene has several objects, some of them having their own animation. In Blender, all of the animations are separated by one single action per object, but none have been converted into NLA strips.

I’m not sure if this is correct, but when importing a glB/glTF from Blender, only the first animation imported is played by default (as indicated here), even if separate objects have their own animations. But I wish to play the animation from all of the objects at once, though I haven’t found anything about how to control the playback from imported objects.

Is there a convenient way to do this?

I’m using Babylon 5 at the moment, but I will consider upgrading to v7 in the future.

I think you have to collect the animations at the time of import.

BABYLON.SceneLoader.ImportMesh('', path, file, scene, function (meshes, particleSystems, skeletons, animationGroups, transformNodes, geometries, lights, spriteManagers) { //collect animationGroups });

If you are doing it this way, collect animationGroups then run through the collection with [i].play() when it is time. Maybe.

Here is the example how to find loaded animations - Babylon.js Playground
One may find them in animationGroups of loaded model or container, or at the scene level by animationGroup name.

1 Like