Sign in to follow this  
Lynxerious

[SOLVED] Blender Animation Problem, Model Arms and Legs get stretched

Recommended Posts

Hello everyone, 

I am working on a game project using BabylonJS (thank you for your hardwork on this amazing framework!) and using Blender to create model.

I've been following this guy to create model and animation for my character: 

After I was done and ran the animation in BabylonJS, the model was fucked up and stretched everywhere unlike in Blender. I've looked for a lot of similar questions in the forum but still can't solve it (set LocRot, scale to 1, loc and rot to 0,...). 

Can you guys help me figure out what is wrong with the blender file?

Blender file: https://www.dropbox.com/s/n5ab6jg0s9a5qz5/Dave.blend?dl=0

Babylon file: https://www.dropbox.com/s/mwi4dar41irvjyy/Dave.babylon?dl=0

This is the model from the guy above, if you can find the problem with this file, I can fix it on my (terrible) model too. You can drop the babylon file in sandbox to see the problem since I checked the autolaunch animation box.

Thank you all!

P/S: The file doesn't come with a texture sorry, it's not really important though.

Edited by Lynxerious
solved

Share this post


Link to post
Share on other sites

@Lynxerious : I took a look at your .blend file and tried to export it. And I got an error message :

Quote

Mesh: Character has unapplied transformations.  This will never work for a mesh with an armature.  Export cancelled

As you were able to export it, what version of the exporter are you using?

Edit: Ok I looked at your .babylon file the exporter is 4.6.1. That is an old exporter - you need to update to 5.2 for a start.

cheers, gryff :)

Share this post


Link to post
Share on other sites

@Lynxerious : this is probably what you are looking for - right?

Dave Character - deleted

The chequered pattern is because you have no texture in the .blend file you posted.

Let me know when you have changed your exporter and I will tell you the changes to make to your .blend file.

cheers, gryff :)

 

Share this post


Link to post
Share on other sites

@gryff 

Thank you, I have solved it. it turned out I used the old exporter so it didn't display the error.

After I installed the new one, the error appears and I solved it by doing what you said in a similar thread. Link below for anyone who has the same problem as me:

The reason is mainly that the io_export_babylon.py on the link here: https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Blender is still in 4.6 and I wasn't aware of that.

And the 5.2 zip folder is a little hard to install to Blender since it's released as a package so it took me some times to figure it out.

Thank you very much, my (terrible) model works perfectly now. :D 

Share this post


Link to post
Share on other sites
3 hours ago, Lynxerious said:

Thank you very much, my (terrible) model works perfectly now. :D 

@Lynxerious: Glad to be of help :) And for a low poly model it is pretty good - Sebastian Lague  is not a bad teacher :)

As for installing the zipped exporter. It can be installed directly from the zipped file. In Blender, just go to File-> Preferences->Addons->Install From File-> then locate the zip directly. Then activate the addon and Save Settings. No need to unzip the file.

But a question for you. You have a lot of IK and Control Bones - which makes it easier to create that kind of walk animation, But are you exporting them as well? You don't have to - they are not needed as they actually don't deform the mesh.The exporter can automatically remove them if the armature is set up correctly :)

cheers, gryff :)

Share this post


Link to post
Share on other sites

@Lynxerious

54 minutes ago, Lynxerious said:

I can exclude the IK bones from being exported?

Yes you can. IK bones do not deform the mesh - just move other bones in Blender. They make some kinds of animating much easier.

Now by "IKbones" I include bones that are called IK in Blender plus what some people call "Pole Targets" or "Control" bones. When you are naming them just be sure that "IK" appears in the name.

See the image below for an example. See how I have included "IK" in some bone names (12 bones in total) . So for example "knee.IK.L" is the control or pole target at the knee for the left leg.

Now when you are ready to export in the Scene tab, check the box that says "Ignore IK Bones" (bottom right of image below).

You should see a reduction in file size and fewer bones in your BJS rig.

You are lucky I think as Sebastian Lague's model has all the bones marked correctly as deform and non-deform bones.

cheers, gryff :)

ikRig1.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.