# Unexpected Skeleton/Bones from exported Blender file

**URL:** <https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599>\
**Category:** Questions\
**Created:** [September 12, 2019, 5:01am UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599 "2019-09-12T05:01:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 12, 2019, 5:01am UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/1 "2019-09-12T05:01:37Z")

</div>

Hi there.  
Today i bit the bullet and learned how to rig. Rigged up a very simple skeleton and thought i did a decent job in Blender. But when imported into Babylon as GLB, got unexpected results.

1. Can’t move the mesh via the bones (as i can on the Dude model). Can only move the mesh via transform nodes. Assume that this is not the right way?

2. There is an extra bone at the feet

Any tips on how to best rig for Babylon? Am I missing some technique?

 ![14%20PM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/f9888ab63eeac466b88de1fde329371a5dd23d4f.png)

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 12, 2019, 5:20am UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/2 "2019-09-12T05:20:23Z")

</div>

Sorry, uploaded wrong file. Here it is:  
[testrig.zip](https://forum.babylonjs.com/uploads/short-url/rfj9PW0ai2EcaGREQnbH2bTuH1o.zip) (291.2 KB)

Noting that when i move the bones, the mesh moves and then it snaps right back into place to original position/rotation.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 12, 2019, 4:39pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/3 "2019-09-12T16:39:30Z")

</div>

> Can’t move the mesh via the bones (as i can on the Dude model). Can only move the mesh via transform nodes. Assume that this is not the right way?

The way glTF skeletons work in Babylon.js is a bit different. glTF uses nodes for bones. To mimic this behavior in Babylon.js, the bones are linked to transform nodes in the scene. If you move the bone, it will immediately be overridden by the transform of the linked node. I know this is confusing, but we haven’t found a better way to do this yet.

> There is an extra bone at the feet

I think you are talking about the debug skeleton viewer showing the connection from the root of the skeleton to the first level bones. In the glTF skeleton, there are two bones `shin.L.001` and `shin.R.001` which have no children.

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 12, 2019, 5:10pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/4 "2019-09-12T17:10:23Z")

</div>

Thanks! That all makes sense.  
Does the IK setup come over to Babylon in either glTF or Babylon formats? Doesn’t seem like the control bones work (that’s what shin.L.001 and shin.R.001 are)

 ![48%20AM](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/d/d0f99d265edbb5b632c33c794d027e410c056f89.jpeg)

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [September 12, 2019, 5:19pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/5 "2019-09-12T17:19:45Z")

</div>

There is no IK in glTF that I’m aware of. Babylon has support for IK: [Use Bones and Skeletons - Babylon.js Documentation](https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons#boneikcontroller), but I don’t know about exporting it from Blender.

---

<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:** [September 12, 2019, 5:45pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/6 "2019-09-12T17:45:48Z")

</div>

> [@bigrig](#):
>
> Does the IK setup come over to Babylon in either glTF or Babylon formats? Doesn’t seem like the control bones work (that’s what shin.L.001 and shin.R.001 are)

The yellow calf bone tells you they are IK bones and they are set to “_not deform_” the mesh. (Click on the bone tab in the properties panel - the “deform” box has no check. Now for .babylon export you have an option to NOT export them. With that IK bone selected click on the pink globe tab and look at the “animation” panel and check “ignore IK bones” box. there will be no export then. Now in versions earlier than Blender 2.8 the name of those Ik bones had to include “IK”, so I would name them ShinL.IK and ShinR.IK to ensure they are not exported.

If you are going to use Ik for the legs - I would add a KneeL.IK and KneeR.IK. But that is all for .babylon export - I don’t use the GLB stuff.

Hope that helps.

cheers, gryff 🙂

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 12, 2019, 8:21pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/7 "2019-09-12T20:21:55Z")

</div>

Thanks @gryff. Yes, I added the IK bones in there myself (took a rigging class).

From what i gather from that link above and from your comment, are the following two statements true:

1. There is no format that I can use to import a rig with IK into babylon  
and
2. Babylon does support IK, but it must be coded explicitly using BABYLON.BoneIKController.

both true?

---

<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:** [September 12, 2019, 8:55pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/8 "2019-09-12T20:55:04Z")

</div>

As far as I know @bigrig both are true. But to be honest, I have never tried to use the Babylon.BoneIKController. I just want to create my animations in Blender and then export them (without the IK bones).

It seems you are looking to do/create animations in Babylon itself. I try to work with a minimum number of bones and even use animations that I can get from .bvh files that I import into Blender.

You are going beyond my paygrade 😆

cheers, gryff 🙂

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 16, 2019, 11:42pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/9 "2019-09-16T23:42:14Z")

</div>

Getting a little deeper into animating these skeletons. Again running into some walls. Will none of the copyAnimationRange+beginAnimation functions work since animating skeleton movements are being overidden by transform nodes? Is there a way to tell a function like copyAnimationRange to copy to the transform nodes instead?

---

<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:** [September 17, 2019, 5:01pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/10 "2019-09-17T17:01:48Z")

</div>

Hey Bigrig! I agree this could be complicate. Unfortunately babylon.js has to accomodate with a lot of different ways to animate things (gltf, blender, 3dsmax, etc…)

None of the copyAnimationRange will work as there is NO animation range defined on your skeleton,  
Skeletons can be animated (like any other entity in babylonjs actually):

- directly by adding animations onto each bones
- using AnimationGroups (which is the case of gltf)

Here because we are using gltf (which specs mimic what Unity does), we are animating nodes that will control bones so the skeleton animations are empty.

Does it make sense?

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 17, 2019, 5:16pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/11 "2019-09-17T17:16:57Z")

</div>

Thanks, I think that make sense.  
Are there any good playgrounds where an animation is added directly to a bone - on a loaded GLTF?

---

<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:** [September 17, 2019, 5:20pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/12 "2019-09-17T17:20:45Z")

</div>

What kind of animations do you want to add? Maybe you can create a simple playground that we will use to see how we can help you?

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 17, 2019, 6:04pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/13 "2019-09-17T18:04:49Z")

</div>

That would be so awesome. Have been banging my head for a few days on this. In sum, I want to be able to load a character with skeleton. And then load, separately, animation data and to be able to animate the character with that data.

[https://www.babylonjs-playground.com/#D9U0UW#9](https://www.babylonjs-playground.com/#D9U0UW#9)

---

<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:** [September 17, 2019, 6:10pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/14 "2019-09-17T18:10:50Z")

</div>

Ok this is an interesting use case.

So technically, you should be able to only change the skeleton property of your mesh. If the new scene loads correctly, you should get a new skeleton, then it should be enough to do something like `myMesh.skeleton = newSkeleton`

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 17, 2019, 6:43pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/15 "2019-09-17T18:43:39Z")

</div>

Ok. Gave that a try:  
[https://www.babylonjs-playground.com/#D9U0UW#12](https://www.babylonjs-playground.com/#D9U0UW#12)

Don’t think it did anything. In playground above, if it worked, I’d assume that both characters would be doing the “Jab” animation.

Btw, if we can get this working, I will make and share a shiton of animation data files… so that anyone should be able to load any character with a mixamo rig - and use these animations with a minimum of fuss. Think it’ll really be useful/fun for BJS makers.

---

<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:** [September 17, 2019, 8:17pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/16 "2019-09-17T20:17:13Z")

</div>

Are you sure about myMesh? not sure if myMesh should be set to newMeshes[0]

You should look for the one having a skeleton already

---

<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:** [September 17, 2019, 8:21pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/17 "2019-09-17T20:21:39Z")

</div>

Something like that:  
[https://www.babylonjs-playground.com/#D9U0UW#15](https://www.babylonjs-playground.com/#D9U0UW#15)

Now you also need to clone the animationGroup that was targeting the previous skeleton ☹

---

<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:** [September 17, 2019, 8:25pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/18 "2019-09-17T20:25:05Z")

</div>

Other option:  
[https://www.babylonjs-playground.com/#D9U0UW#16](https://www.babylonjs-playground.com/#D9U0UW#16)

It is not working now because the armature object on first mesh is not the same as of the second mesh (one has a scale of 0.01). If you make them identical it should work flawlessly

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 17, 2019, 9:34pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/19 "2019-09-17T21:34:36Z")

</div>

Have made scale identical.  
[https://www.babylonjs-playground.com/#D9U0UW#17](https://www.babylonjs-playground.com/#D9U0UW#17)

But not sure what I’m looking at here. Seems like two separate models with separate animations? (and one party disembodied, poor guy). Rather than loading the animation from one model onto the other. Am I misunderstanding?

---

<div class="post-metadata">

**Author:** ![bigrig](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bigrig/32/5548_2.png) [@bigrig](https://forum.babylonjs.com/u/bigrig)\
**Post date:** [September 17, 2019, 9:38pm UTC](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599/20 "2019-09-17T21:38:58Z")

</div>

Oh, or is that all actually the same mesh, but 1/2 of the mesh (hair/shirt/shorts) is playing one animation and 1/2 of the mesh is playing the other animation (head/torso/legs) ?? Woa.

[Next page](https://forum.babylonjs.com/t/unexpected-skeleton-bones-from-exported-blender-file/5599.md?page=2)
