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

**URL:** https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302
**Category:** Questions
**Tags:** blender
**Created:** [July 7, 2020, 10:37pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302 "2020-07-07T22:37:28Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 7, 2020, 10:37pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/1 "2020-07-07T22:37:28Z")

</div>

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.

Video\_prueba-2020-07-07\_18.40.44

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/c/cdc9d5674b9afb91f0bcf087ce4d5abfe1de2645.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/c/cdc9d5674b9afb91f0bcf087ce4d5abfe1de2645.mp4)
  

Video\_prueba-2020-07-07\_20.10.10

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/8/8dc92c60fa3725a0af8577e87cfa66a16851fe78.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/8/8dc92c60fa3725a0af8577e87cfa66a16851fe78.mp4)
  
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.  
 ![Captura de pantalla_2020-07-07_18-45-14](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/64641a21a9702d23388791838df1cb9f309f8786.png)  
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.  
[https://playground.babylonjs.com/#4L7DY6#2](https://playground.babylonjs.com/#4L7DY6#2)

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  
[cuboAnimado.glb.zip](https://forum.babylonjs.com/uploads/short-url/5dqR4uzGk4wYptHSLIQWBGITWT9.zip) (5.6 KB)  
[cuboAnimado.babylon.zip](https://forum.babylonjs.com/uploads/short-url/1NbOwVxtdeDyNlTmG1mvjrsD8dK.zip) (180.3 KB)

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 8, 2020, 11:47am UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/2 "2020-07-08T11:47:53Z")

</div>

Here are the actions

 ![Captura de pantalla_2020-07-08_08-46-49](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/e/e1d3b59e81a8ddbfa80aef6a79a5056ed816ad17.png)

---

<div class="post-metadata">

### Author: ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)
#### Post date: [July 8, 2020, 1:26pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/3 "2020-07-08T13:26:17Z")

</div>

adding @JCPalmer the mastermind behind the blender exporter

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 8, 2020, 2:12pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/4 "2020-07-08T14:12:34Z")

</div>

We await your responses then.

---

<div class="post-metadata">

### Author: ![gryff](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gryff/32/1855_2.png) [@gryff](https://forum.babylonjs.com/u/gryff)
#### Post date: [July 8, 2020, 3:30pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/5 "2020-07-08T15:30:15Z")

</div>

@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,  
> “materials”:[{“name”:“rojo”,“id”:“rojo”,“customType”:“BABYLON.PBRMaterial”,“backFaceCulling”:true,“checkReadyOnlyOnce”:false,“maxSimultaneousLights”:4,“environmentIntensity”:1,“reflectivity”:[0.5,0.5,0.5],“roughness”:0.1,  
> “alpha”:1,“transparencyMode”:0,“alphaCutOff”:0.4,“metallic”:0.8,  
> “albedoTexture”:{“name”:“rojo.jpg”,“level”:1,“hasAlpha”:false,“coordinatesMode”:0,“uOffset”:0,“vOffset”:0,“uScale”:1,“vScale”:1,“uAng”:0,“vAng”:0,“wAng”:0,“wrapU”:1,“wrapV”:1,“coordinatesIndex”:0,  
> “base64String”:"data:image/JPEG;base64,
> 
> [image data here]
> 
> “multiMaterials”:,  
> “skeletons”:,  
> “meshes”:[{“name”:“CuboAnimado”,“id”:“CuboAnimado”,“materialId”:“rojo”,“billboardMode”:0,“position”:[0,11.0088,2.7401],“rotation”:[0,-0.7037,0],“scaling”:[1,1,1],“isVisible”:true,“freezeWorldMatrix”:false,  
> “isEnabled”:true,“checkCollisions”:false,“receiveShadows”:false,“pickable”:true,“tags”:“”  
> ,“positions”:[-1,1,-1,-1,-1,1,-1,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,1,1,-1  
> ,1,1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,1,1,-1,-1,-1,-1,-1,-1,1,1,-1,1,-1,1,1,-1]  
> ,“normals”:[-1,0,0,-1,0,0,-1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0  
> ,0,1,0,-1,0,0,0,0,1,1,0,0,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0]  
> ,“uvs”:[0.625,0,0.375,0.25,0.375,0,0.625,0.25,0.375,0.5,0.375,0.25,0.625,0.5,0.375,0.75,0.375,0.5,0.625,0.75,0.375,1,0.375,0.75,0.375,0.5,0.125,0.75,0.125,0.5,0.875,0.5,0.625,0.75,0.625,0.5,0.625,  
> 0.25,0.625,0.5,0.625,0.75,0.625,1,0.375,1,0.375,0.5,0.375,0.75  
> ,0.125,0.75,0.875,0.5,0.875,0.75,0.625,0.75]  
> ,“indices”:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,0,18,1,3,19,4,6,20,7,9,21,22,23,24,25,26,27,28]  
> ,“subMeshes”:[{“materialIndex”:0,“verticesStart”:0,“verticesCount”:29,“indexStart”:0,“indexCount”:36}]  
> ,“instances”:}  
> ],  
> “morphTargetManagers”:,  
> “cameras”:,  
> “lights”:,  
> “shadowGenerators”:  
> }

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 🙂

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 8, 2020, 3:59pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/6 "2020-07-08T15:59:51Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)
#### Post date: [July 8, 2020, 5:23pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/7 "2020-07-08T17:23:35Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 8, 2020, 5:37pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/8 "2020-07-08T17:37:20Z")

</div>

> [@JCPalmer](#):
>
> 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.

 ![Captura de pantalla_2020-07-08_14-33-09](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/f263d468b3164b7a7e471add8c45f4b395e88e22.png)

---

<div class="post-metadata">

### Author: ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)
#### Post date: [July 8, 2020, 6:29pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/9 "2020-07-08T18:29:16Z")

</div>

For skeletons: [doc](https://doc.babylonjs.com/api/classes/babylon.skeleton#beginanimation)

```javascript
skeleton.beginAnimation("Walk");

```

For Mesh, Lights & Camera implemented at Node super class: [doc](https://doc.babylonjs.com/api/classes/babylon.node#beginanimation)

```javascript
mesh.beginAnimation("Rotate");

```

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 8, 2020, 6:43pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/10 "2020-07-08T18:43:10Z")

</div>

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

Video\_prueba-2020-07-08\_15.41.56

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b1cb51ca1d889ce63a9dc489b369891c6a3769c2.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b1cb51ca1d889ce63a9dc489b369891c6a3769c2.mp4)

---

<div class="post-metadata">

### Author: ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)
#### Post date: [July 8, 2020, 8:09pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/11 "2020-07-08T20:09:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 9, 2020, 10:33pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/12 "2020-07-09T22:33:51Z")

</div>

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

Video\_prueba-2020-07-09\_19.19.38

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/bfaa0bec27c5d69358b935b349c56017443d2291.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/bfaa0bec27c5d69358b935b349c56017443d2291.mp4)
  
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  

Video\_prueba-2020-07-09\_19.21.27

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/1a914a31189ad11facb1121d592dc1e85350fac2.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/1a914a31189ad11facb1121d592dc1e85350fac2.mp4)
  
On the other hand, if I export in gltf2, if I export the animations.  

Video\_prueba-2020-07-09\_19.23.06

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b1ed657b3cab997593eca91aba0aeb613840f439.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/b1ed657b3cab997593eca91aba0aeb613840f439.mp4)
  
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.  
[cuboAnimadoMultiTrack.zip](https://forum.babylonjs.com/uploads/short-url/pepbXLQ2JxFmZpNZIgJhiHKELM0.zip) (1.8 KB)  
This is what the console says when exporting that model

 ![Captura de pantalla_2020-07-09_19-33-22](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/92af4f41da718f9bd35879e17468b757a5da2681.png)

And here is the blender file I mean the .blend…Open with Blender 2.82  
[CuboAnimado.blend.zip](https://forum.babylonjs.com/uploads/short-url/fTMZT7fuqpIcKQQDTkQ39IuCP3r.zip) (82.5 KB)

---

<div class="post-metadata">

### Author: ![Ariel\_Gimenez](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ariel_gimenez/32/471_2.png) [@Ariel\_Gimenez](https://forum.babylonjs.com/u/Ariel_Gimenez)
#### Post date: [July 9, 2020, 10:56pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/13 "2020-07-09T22:56:37Z")

</div>

@JCPalmer  
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.

 ![bug in babylon](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/411a0d7cc092e10b2872efc4b434a7d9b365a1c1.jpeg)  
 ![Captura de pantalla_2020-07-09_19-57-44](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/9ed3af8f06f9cbf684bfb3bb650ba733c0699171.png)  
 ![Captura de pantalla_2020-07-09_19-53-22](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/2/20a8d80b31a9c5ed6e1bd63fa535a50ec420c630.png)

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](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/d/d4853fec6daa71b475ee2547a726ae380d5e9e5a.png)

 ![Captura de pantalla_2020-07-09_19-55-43](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/413ce0b2d7414363e5db24b86c7aa4e238505c02.png)

---

<div class="post-metadata">

### Author: ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)
#### Post date: [July 13, 2020, 1:36pm UTC](https://forum.babylonjs.com/t/blender3d-animations-using-actions-in-babylon-js-nonlinealanimation-exportoficial-babylon/12302/14 "2020-07-13T13:36:10Z")

</div>

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’.

 ![actioneditor](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/972ac0217e9cc19fc2a0a1883855caa0a80c741d.jpeg)

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.

```auto
	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.

 ![muliple actions](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/3661b769e4e2452c3ddb6317ff626075c74c094a.jpeg)

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.
