Missing animations in Blender -> babylon export

I have a rigged model with armature in blender that I’m trying to export for use with Babylon. Using the Blender to babylon exporter (version 6.4.5), I’m not seeing any of my animations / actions exported.

There are two actions, both named after the mesh they are animating, and I have “Only currently assigned actions” unchecked. All transforms are applied to the model and armature, so I don’t believe that to be the issue.

When I export to gltf / glb the animations show up correctly, however that comes with it’s own baggage, such as needing to switch to a right handed coordinate system and having the “root” mesh added everywhere.

Attached here is the blend, babylon, and gltf files as well as the blender export log.

model.zip (261.6 KB)

Not quite sure what I’m missing, but any insights anyone has would be appreciated.

Adding @JCPalmer our blender -> babylon GURU :slight_smile: he is amazing at it and thanks to your files it should be easier to repro.

Please, be mindful than it is vacation period so there might be a slight delay before the answer.

@JCPalmer I keep learning from your answers and I hope one day I ll be able to help better than a ping :slight_smile:

The log file shows 2 animation on the legs, idle and walk:

processing begun of mesh:  legs
	animation processing begun
		processing action idle:  in[1 - 60], out[0 - 60]
		processing action walk:  in[1 - 24], out[70 - 94]
	processing begun of material:  legs
	registered as also a user of material:  legs
	num positions      :  1104
	num normals        :  1104
	num tangents       :  0
	num uvs            :  2208
	num uvs2           :  0
	num colors         :  0
	num triangles      :  368
	Skeleton stats:  
		Total Influencers:  1984
		Avg # of influencers per vertex:  1.7971
		Highest # of influencers observed:  3, num vertices with this:  80
		exported as 3 influencers
		num skeletonWeights and skeletonIndices:  4416

If you are talking about them not being run in the sandbox, that has to do with the sandbox only supporting armature based animations when the file format is .GLB. Unless you can start these with the inspector inside the sandbox, to see them for a .babylon, you will need to make a page, which loads the file, then starts them.

I do not really use Sandbox all that much, & I have my own animation system / custom exporter, so I really do not do this. The animations are there though.


Yeah, the animations are there and I can see the separate ranges for the separate animations, but when I start them in the inspector, nothing happens.

Also in game, when I call mesh.beginAnimation or scene.beginAnimation and pass in the range, nothing happens.

Once again, this all seems to work fine with gltf/glb, however I wasn’t aware of the different behavior in the sandbox for glb files, so I may be missing something else.

@Tim_Shannon : Well, I’m no expert when things go wrong, I leave that to @JCPalmer, but I have a few observations that may indicate something to JCP.

I opened your .blend file in Blender 2.90 and looked at the armature and looked at the animation associated with it and it includes something from the NLA editor. I’m not sure what impact this has on the exporter. I was never part of the exporter, I believe.

Looking at the .log file I see this at the end of the armature processing:

processing begun of bone: Bone.027, index: 26
processing begun of bone: IK.003, index: 27
processing begun of mesh: body

from your file, whereas when I export an animated rigged object I get something like this :

processing begun of bone: Toes.R, index: 25
Ignoring IK bone: leg.L.IK
Ignoring IK bone: leg.R.IK
Ignoring IK bone: arm.L.IK
Ignoring IK bone: arm.R.IK
processing action mouthAction: in[1 - 30], out[0 - 30]
processing begun of mesh: Trigger

Notice the line about processing the action. Missing in your log.

When I look at the .babylon file from your .blend file I see this kind of data under the skeleton:


With no animation data associated with any of the bones. I normally expect to see something like this with data for individual bones :


All your animation data ends up in something called “animations” at the end of mesh data for legs - not associated directly with the skeleton?

So is that NLA stuff causing this ? Maybe JCP knows? (See image below)

Do you have a .blend file without all the NLA stuff?

Stay Safe All, gryff :slight_smile:


1 Like

Hm. I was under the impression that the NLA stuff was just a result of creating actions in the action editor. I’ll see if I can remove them and still preserve my actions.

Also, FWIW, the sandbox (and my code) shows an error when trying to play the animation:

Uncaught TypeError: Cannot read property 'frame' of undefined
    at new RuntimeAnimation (dataReader-16bc64e5.js:114)
    at Animatable.appendAnimations (dataReader-16bc64e5.js:1751)
    at Scene.beginAnimation (dataReader-16bc64e5.js:2018)
    at Scene.beginAnimation (dataReader-16bc64e5.js:2024)
    at Scene.beginAnimation (dataReader-16bc64e5.js:2024)
    at Mesh.Node.beginAnimation (node-9c7d6999.js:1196)

An image from something I created with an animation (sitAction) with the armature opened - shows no NLA stuff!

Stay Safe, gryff :slight_smile:

Yep, looks like the NLA stuff is from me pushing down and stashing actions in the action editor.

Attached is a new version of a blend without the NLA. I no longer get the error, but now I get no animations in engine.

no_nla.zip (148.8 KB)

I’ll keep messing with this. I appreciate your help in troubleshooting.

TY @Tim_Shannon. I will have a look later tonight - - it is supper time for me :wink:

I try to help when I can - @JCPalmer is the coder though not me. And he may have more detail :slight_smile:

Stay Safe, gryff :slight_smile:

On mobile, so just a short peck. The armature has the animation, not mesh. Something like


After renaming the animation from legs-idle to idle, the animation range seems to have exported successfully

spider.zip (194.4 KB)


But then you can only have one animation right? My understanding (and maybe it’s out of date) is that if you want multiple animation ranges you need to define actions in blender and name them <mesh>-<range-name> and uncheck Only currently assigned actions.

So according to this the mesh has the animation, maybe that’s the issue?

console.log("mesh: ", mesh.animations);
console.log("skeleton: ", mesh.skeleton.animations);
mesh:  (3) [Animation, Animation, Animation]
skeleton:  undefined

The same seems to be true for the animation ranges

mesh:  (2) [AnimationRange, AnimationRange]
skeleton:  []

I’m going to rebuild the armature and animations from scratch, see if I can figure out where I messed up.

Your assumption about the action name is not true. You only need to prefix the name of action with the name of the mesh when there are multiple meshes with current action, AND you wish a specific Action to only apply to a single mesh.

You do not have an action on any meshes. It is on the skeleton. Probably why removing it got the the result @gbz has shown. I would check out what he did.


Thanks, I think I’m getting close. Should actions be associated to the mesh or the armature then? Both?

@Tim_Shannon : if you have two objects (two cubes, say) that are unrigged and you want to give each one a different action (just one) then use the action names like this :


If you just create Action1 and Action2, then both will be applied to Cube1 and Cube2

In your case you have a rigged set of meshes, and as @gbz points out the “mesh-” is screwing up your export. And as @JCPalmer points out above with an armature the armature is being animated not the mesh.

In fact removing the “mesh-” from the names in your original file (with the NLA stuff) produces a fine working creature in the sandbox. Two animations (see image below)

Stay Safe All, gryff :slight_smile:

1 Like

Thanks for the help everyone.

@Tim_Shannon : Just one more point/suggestion, you should probably have a “central” bone of some kind that is the parent to all those first leg bones (bone.001, bone.008, bone.015, bone.022 which have no parent) so that if you wish to move the whole “spider” in X,Y,Z directions it is easy.

Stay Safe, gryff :slight_smile:

1 Like

Yeah adding a central bone also helps the walking IK bones influence the whole model appropriately, however now I seem to have an issue where the body disconnects from the legs during animation.

model.zip (255.5 KB)

Once again this all exports fine to gtlf. My workflow doesn’t seem to mesh well with what the babylon exporter is expecting.