Blender3D animations using actions in babylon.js "NonLinealAnimation" "ExportOficial" ".babylon"

Hello everyone, I’m testing animations in Blender3D, for example in this case I have 3 separate animations.
Each track is represented in the action editor as a separate animation.
Watch this video.

As it says in the documentation, each animated object has to be a different scene, in this code it is seen that I have the imported scene inside another imported scene.

I would be interested to know how to access each animation separately or together. Some documentation or something to guide me, I can’t figure out how to access the animations exported with the official plugin “.babylon” using blender3D actions.

I made this project in the playground, the imported cube has the actions created in Blender3D with the animations.

An important issue is that the gltf2 if animations work in the sandbox.
I leave the gltf and .babylon files. to drag in the sandbox (5.6 KB) (180.3 KB)

Here are the actions

adding @JCPalmer the mastermind behind the blender exporter

1 Like

We await your responses then.

@Ariel_Gimenez : I downloaded your .babylon file above - it contains no animation.

{“producer”:{“name”:“Blender”,“version”:“2.82 (sub 7)”,“exporter_version”:“6.4.2”,“file”:“cuboAnimado.babylon”},
“autoClear”:true,“clearColor”:[0.0509,0.0509,0.0509],“gravity”:[0,-9.81,0],“environmentTexture”:“lysGenerated_sunset.env”,“isPBR”:true,“environmentTextureRotationY”:0.8727,“createDefaultSkybox”:true,"skyboxBlurLevel ":0,

[image data here]


I see from your second post that you are using the NLA editor - which I believe the exporter ignores. @JCPalmer can confirm this?

Stay Safe All, gryff :slight_smile:

Ok, thank you very much for taking the time to test it, of course the issue is when animations are separated into actions and I use the official exporter of babylon.js.

You can call each Blender action in BJS terminology an AnimationRange, where you supply the name of the action

There is some documentation where they explain in more detail how to use the Blender3D actions in babylon.js … I mean, I did this, but I don’t understand how to start the animations.

For skeletons: doc


For Mesh, Lights & Camera implemented at Node super class: doc

1 Like

Okay thank you very much. And since I can check if the animations exist, the problem is that when I use the official babylon plugin, I don’t see the animations, instead if I export in glb format, if I see them … Is there any option that allows me to export all the actions from blender3D ?. My idea is to use the official plugin. In this video you can see that with GLB you can see animations, but with babylon you cannot

Post your log file. It shows all animation ranges exported.

Ok, I have this cube with 3 actions, one of movement, another of rotation and another of scale

I export in .babylon format, but when uploading it to the sandbox it does not recognize the animations, I can see that the plugin does not export the animations

On the other hand, if I export in gltf2, if I export the animations.

The issue is that I want to continue using the official plugin since it has options that the gltf2 does not have. I also want to get involved in the development of the plugin, but I still lack knowledge.
Is there an option in the plugin that allows us to choose the tracks that we want to export or something like that?

This is the file that I just used in those videos. (1.8 KB)
This is what the console says when exporting that model

And here is the blender file I mean the .blend…Open with Blender 2.82 (82.5 KB)

In this way the exported tracks appear, however they still do not work.
It seems to me that the .babylon exporter doesn’t export blender3D actions correctly.

Captura de pantalla_2020-07-09_19-57-44

The animations in the sandbox do not work either.
And this shows the console when it’s just actions.
Captura de pantalla_2020-07-09_19-55-59

You do not actually have an actions, made by the action editor, in your file. If you went to a dope sheet, then chose the action editor and hit new, then changed the name to ‘MyAction’.

You would get an action in the log, and the data in the file. I did not actually create any frames, but even then got a note of this in the log. You are adding tracks, not actions. That is not supported. Blender does things multiple ways for many things, not all of them are supported by anyone.

	processing begun of mesh:  Cube
		animation processing begun
			WARNING: action MyAction has no frames, ignored.
		processing begun of material:  CuboAnimado.Material
		num positions      :  30
		num normals        :  30
		num tangents       :  0
		num uvs            :  60
		num uvs2           :  0
		num colors         :  0
		num triangles      :  12

Some other things before you hit them. If you are having multiple actions, and you want more than the current one exported, you need to ensure you indicate so in world properties.

If you have both multiple actions and multiple meshes with animation, and some of the animations are specific to certain meshes, put the name of the mesh + ‘-’ + name as the name of the action, so it only gets exported for that mesh. e.g. 'mesh35-run '.

Finally, you are showing Animation Groups in the inspector. BJS decided to create them instead of using Animation Ranges when they added GLTF. Why, I do not know. If you want to check that they are at least there are there outside of the log file, without code, check 'Auto Launch` in world properties, and bring up in the sand box. You will get one combined animation, which will probably look terrible, but this is just a test.