# Does .babylon (file) Support Animations?

**URL:** <https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724>\
**Category:** Questions\
**Created:** [July 25, 2019, 3:06pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724 "2019-07-25T15:06:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theodore\_Lee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/theodore_lee/32/5061_2.png) [@Theodore\_Lee](https://forum.babylonjs.com/u/Theodore_Lee)\
**Post date:** [July 25, 2019, 3:06pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/1 "2019-07-25T15:06:31Z")

</div>

Are armature / skeleton animations saved to .babylon files? I have made this GLTF file, and when dropped into the sandbox, it loads with both of its animations and both can be played.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6cedb4c4961b5d75ba70403f511be69c7b872b83.png)

However, when I click the ‘Export to .babylon’ button, it saved fine. However, when I drop the .babylon file back into the playground, it fails to load the skeleton animations and instead t-poses me.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/9/9fe5d15f0774ce041474febea99d16f6c6ec4ea3.png)

I’ve attached the GLTF file here.

[upload.zip](https://forum.babylonjs.com/uploads/short-url/14ma288oUs9fgekmgguHuThqjZC.zip) (99.6 KB)

May I please know if this is a bug or do .babylon files not support skeleton animation? Thanks for taking the time to read my somewhat long post 😄

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 25, 2019, 3:09pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/2 "2019-07-25T15:09:33Z")

</div>

It is not a bug 🙂 glTF files uses Animation Groups which are automatically started by the sandbox. Babylon files host the animations differently but you should be able to start them by clicking on the skeleton in the scene explorer and you may have then a button to start animation on the properties panel

---

<div class="post-metadata">

**Author:** ![Theodore\_Lee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/theodore_lee/32/5061_2.png) [@Theodore\_Lee](https://forum.babylonjs.com/u/Theodore_Lee)\
**Post date:** [July 25, 2019, 3:12pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/3 "2019-07-25T15:12:18Z")

</div>

Thanks for the quick reply, Deltakosh.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/fcca541adc98bd046f4c076a94418e389727ba82.png)

I’ve tried to fiddle around and open the animation groups tree and hit play on each animation, without luck. Same goes for the Skeleton and Bones…

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/4aca47afd4da714658bf0191ee6740041ae0f464.png)

I am not sure if this is of much use… but the window on the right is the console for the GLTF file while that on the left is for the .babylon file. There seems to be a discrepancy at the x y z.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [July 25, 2019, 3:14pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/4 "2019-07-25T15:14:13Z")

</div>

Pinging @Drigax

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [July 25, 2019, 5:52pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/5 "2019-07-25T17:52:21Z")

</div>

Thanks for reporting this @Theodore_Lee, I’ll need some more information to determine a root cause. It appears that the skeleton and animations are exported properly in the .babylon if that data is imported properly, but perhaps the mesh isn’t being properly skinned?

This sounds somewhat similar to [Github issue 571](https://github.com/BabylonJS/Exporters/issues/571) but I can’t say for sure since I’m not sure what program you’re using. Would you also be able to share your scene file (or make a simple scene that reproduces this issue?)

---

<div class="post-metadata">

**Author:** ![Theodore\_Lee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/theodore_lee/32/5061_2.png) [@Theodore\_Lee](https://forum.babylonjs.com/u/Theodore_Lee)\
**Post date:** [July 25, 2019, 6:35pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/6 "2019-07-25T18:35:39Z")

</div>

I have attached the GLTF file to my first post. I am using the built-in GLTF exporter for Blender.

Here is the Blender file:  
[upload2.zip](https://forum.babylonjs.com/uploads/short-url/8pVQg8kE3DYnbhJ0wHRnNZ0GjmW.zip) (314.6 KB)

Thank you!

PS:

> [@Drigax](#):
>
> It appears that the skeleton and animations are exported properly in the .babylon if that data is imported properly, but perhaps the mesh isn’t being properly skinned?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/4/4aca47afd4da714658bf0191ee6740041ae0f464.png)  
The window on the right is the console for the GLTF file while that on the left is for the .babylon file. There seems to be a discrepancy at the absolutePosition x y z. I’m not sure if this has any meaning, but it’s a difference from the loaded GLTF file and the .babylon file.

---

<div class="post-metadata">

**Author:** ![Drigax](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drigax/32/16585_2.png) [@Drigax](https://forum.babylonjs.com/u/Drigax)\
**Post date:** [July 25, 2019, 8:13pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/7 "2019-07-25T20:13:15Z")

</div>

pinging @JCPalmer, as he maintains the Blender exporter

---

<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 25, 2019, 9:32pm UTC](https://forum.babylonjs.com/t/does-babylon-file-support-animations/4724/8 "2019-07-25T21:32:55Z")

</div>

Sorry, but I am not quite sure if this is glTF or .babylon. I only do a .babylon & my own javascript exporter for blender. The glTF importer / exporter for Blender is supported by Khronos.

Did not read this whole thread, but the .babylon exporter does the older AnimationRange, not Animation Groups. These need code to run, so cannot be animated in sandbox.

In your page this would start the `run` range:

```javascript
        BABYLON.SceneLoader.Append(url, "myfile.babylon", scene);
        scene.executeWhenReady(function () {
            skeleton = scene.getSkeletonByName("base_male1");
            skeleton.beginAnimation("run", true);
            
           // Attach camera to canvas inputs
            scene.activeCamera.attachControl(canvas);

            // Once the scene is loaded, register a render loop
            engine.runRenderLoop(function() {
                scene.render();
            });
        });

```

Each Blender action becomes an AnimationRange, with the same name. Check your log file for the ranges exported.
