Deformed animation after blender export

Recommended Posts

Hi there! I'm new to the community, and also to Blender and Babylon.js.

I made my first model in Blender v 2.78 (a basic creature, humanoid type), rigged it and animated a simple walk movement (or a half one, right foot forward, left foot back). I baked my IKs, then exported the whole animation and mesh with the babylon exporter (v. 4.6.1).

When I import the animation in Babylon it gets distorted. When the arms and legs goes forward/backward, they move too much upwards. I attached the .blend file, and i have a working online demo also:


It is password protected: thyalie:iso88591

First of all, I want to find out that the babylon settings cause this, or the blender exporter, or i did something wrong in blender (this last seems the most likely, but i dont know what i missed).

Thanks for helping in advance!



Share this post

Link to post
Share on other sites

I have Mesh: Cube has un-applied transformations. This will never work for a mesh with an armature. Export cancelled  when exporting.

I haven't done yet armature animation in BJS, but some little tips:

- in realtime 3D assets, always apply scale (all scale values must be equal to 1), especially when doing some skinning: applying must be done before starting skinning. Apply rotation if needed, I think it must be done when doing skinning too.

- you're using a subsurf modifier, it seems excessive in realtime but why not :) In that case it's probably better to apply modifier, then starting skinning. Keep in mind that their's some limitations.


In my opinion, you have to delete armature & subsurf modifiers, cleaning mesh, and re-doing armature.

Make some little tests on a simple object, for trainning.

Share this post

Link to post
Share on other sites

@V!nc3r you were exactly right. The most probably i dd not apply the transformations in a correct way. I separated the mesh from the armature, and rejoined it. This time i did not apply IK, and i applied the subsurf modifier also (wow, export speed skyrocketed).

I have to work on the influence exceed warning (thank you for the link, once again!), but the deformation problem is gone now. You can see the demo also.

Thanks! You were great help!

Share this post

Link to post
Share on other sites

FYI, the fact that you actually got an export means that you are using 4.6.1 of the exporter.  This is obsolete, only kept for those requiring a version of Blender earlier than 2.7.4, I think.  Remove it, then install the zip file version using Blender preferences.  It actually blows itself up when there are un-applied transforms involving armatures.


Share this post

Link to post
Share on other sites

@Wildstyle : Hi and welcome to the forum.

I took a look at your basic blend file - and there are issues with un-applied transforms as @V!nc3r points out, and you are using a very old version of the exporter as @JCPalmer points out. Add to that you have the subsurf modifier which gives the mesh >150K vertices. That is a lot!! I get worried when I have more than 20K vertices. And about 120K of those vertices are just the eyeballs!!

Now some additional stuff:

1. The rig is parented to a "Bezier Curve" which as far as I can tell is not exported.

2. Your IK is odd. You are using two "Empties" to control the IK. These get exported as meshes along with their own animations. Y should use IK bones. Have a look at this YouTube video from Sebastian Lague from about 5 minutes to 6 minutes which adds a couple of simple Ik bones to a leg. You don't need to add the additional sophistication that he adds. As for the "Pole Target" he talks about I usually call that Knee.IK.(R or L). See below.You can add those IK bones to both legs and arms just in the way he describes.

3. As he points out the IK bones do not "deform" the mesh rather they give you easy control of a group of bones quickly.And note he sets a "chain length" of 2 - you left it at zero.

So here is a quick rerigging of your character with just a simple leg IK set up and animation :

Character Animation

And finally, The legs of your character are very small and a tiny part of the mesh, so I am not sure of you reall yreally need 3 bones per leg. One might easily work - in which case there maybe no need to to use IK for the legs.

You can download the blend file that I created - no bezier curve , no empties, no subsurf modifier, and  my simple IK rig here

Hope some of that helps.

cheers, gryff :)

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.