Search Unity

Imported Blender animation resulting in distorted mesh

Discussion in 'Asset Importing & Exporting' started by lmeeken, Aug 8, 2017.

  1. lmeeken

    lmeeken

    Joined:
    Dec 14, 2016
    Posts:
    3
    Hi. This is my very first time using Blender and Unity together - I ran through the Rollaball and Survival Shooter tuts, and wanted to see if I could build on those bases to import my own models and animations.

    Overall, the process has been relatively painless. Though I have noticed one issue. When importing a walking animation from Blender, the animation of the figure is distorted (in a mildly hilarious way....)



    As you can see, the original Blender animation is a fairly basic walk cycle. The imported animation in Unity has a..pronounced pelvic thrust.

    What could be causing this? If you look at my skeleton, you'll note I have bones for the limbs, but not the torso. Is this causing the torso to go bananas in Unity, whereas Blender just kind of leaves those polys alone?

    Or is there some other issue I'm overlooking when it comes to importing Blender animations?

    I simply copied the Blender file into the assets folder from my project - no FBX or OBJ exports or anything like that.
     
  2. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Can you show the painted vertex wheight of the bones?
    And also, can you show your quality settings?
    For me, it seems that u need the torso extra bones that you avoided to prevent unity auto weight them with the shoulder bones.
    Sry for the bad english....
     
  3. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Project-Mysh has it right. I'm understanding that for usage in Unity, all verts MUST be weighted to a bone. This doesn't mean that the bone has to actually move though. You should have a primary parent bone, that all bones are children of. This bone wouldn't move, but could serve to move the whole model all at once if you needed to. Then, if there is seriously zero torso movement, then you should have those verts weighted to that parent bone.
     
  4. GeekGonzo

    GeekGonzo

    Joined:
    Apr 27, 2014
    Posts:
    13
    Sorry to disagree here, but you don't need everything to be weighted, and if I am understanding kburkhart84 correctly, you def do not want to be weighting everything to your root bone.

    You do want a root bone however, that all the other bones are parented to, but it has no weighting on any of the vertex's, it just holds all your rig, and can move them around.

    What this looks like, is that you have some weighting from the left arm on the chest area, though I am not sure as to why its not showing up when you play it in blender. Like Mysh said, just double check your settings: Edit>Project Settings will bring them up in the Inspector, towards the bottom you will see a field called 'Other', make sure your 'Blend Weights' are set to 4 bones.

    Also, I take it you are using a generic rig for this? You may want to take a look at your import settings and the rig/animations setup, and try altering the settings to see if you get a different result. It could also be in how you exported it from Blender. Tbh its a little difficult to know without seeing the file... if none of this solves the issue maybe you could send me the file for me to take a look at for you.