Search Unity

My character model distorted in Mechamin

Discussion in 'Animation' started by JakeT, Aug 19, 2014.

  1. JakeT

    JakeT

    Joined:
    Nov 14, 2010
    Posts:
    34
    I'm tying to rig my character models using the Humanoid Animation Type in Mechanim. When I have them imported normally, all of my legacy animations work fine including facial animation, etc. I am a Max novice, so I may really need a 3D modeler / Mechanim expert's help.

    Normally, my character looks like this:
    upload_2014-8-19_13-41-52.png

    But, when I change the rig Animation Type to Humanoid, my character gets completely DEFORMED at the hip and feet (the idle animation still plays, but the legs and feet are totally out of whack):
    upload_2014-8-19_13-42-13.png

    I am exporting from Max as FXB, and I've tried a lot of different export settings.

    Everything looks fine in the Mapping and Muscles setup:
    upload_2014-8-19_13-44-45.png
    upload_2014-8-19_13-45-4.png

    I do get one error sometimes in the Rig settings in Unity that says something about the Bip01 SpineA having some rotation on it but I cant figure out if that has anything to do it. I tried changing the quality settings and maxed those out to 4 bones, etc., but that doesn't seem to change anything either. When Unity automatically assigns the Humanoid everything looks fine in Mechanim, but then distorts when I click Play in Unity and a Mechanim animation is applied.

    Any ideas? I'll post the solution if I ever get to it!

    Jake
     

    Attached Files:

  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi jakeT,

    can you send me a private pm with your fbx file attached, I will take a look and see what is going on.

    Best regards,
    Sonny
     
  3. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    So the warning was right: Bip01 SpineA having some rotation on it.

    You have a in between bone that contain some animation, in this case it a huge -90 on one axis.
    A In between bone is a bone that is not part of the human mapping but have a human bone as parent and some human bone as a child.

    For a Humanoid rig try to avoid animation on In between bone. So either you change your avatar mapping and set SpineA as your mecanim hips human bone, or apply SpineA bone animation to Pelvis bone in 3ds max.

    If you want more information on how to setup your rig, i would suggest you to read this blog post about mecanim rigging
    http://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

    Best regards,
    Sonny
     
  4. JakeT

    JakeT

    Joined:
    Nov 14, 2010
    Posts:
    34
    Hey Sonny,

    Thanks for the help!

    I tried your first suggestion of changing the avatar mapping to point SpineA to the hips bone which didn't work (still getting the same character deformation). Then in 3ds max, I tried getting rid of the 3rd spine bone (in the Biped settings, I changed from 3->2 spine bones, and turned Triangle Pelvis off). That got rid of the "Bip01 SpineA having some rotation on it" Error which is great.

    But then I got another error when importing. "ImportFBX Warnings: Mesh 'player' has 16 (out of 1353) vertices with no weight and bone assigned (they will be assigned to bone #0 with weight 1). The list of vertices: 91, 305, 306, 334, 342, 545, 551, 603, 771, 1002 and so on…". I fixed this by going into the Weight Table and manually assigning weights to the vertices missing assignments. That got rid of the import warning which is good, but the character is still being deformed (now there are actually a few more deformations because I probably didn't do the weight assignments correctly).

    I went through the documentation you sent, and I am following the guidelines for the standard hierarchy. Is there something else I'm missing?

    Jake
     
    Last edited: Aug 20, 2014
  5. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hi jake,

    send me back your new file, I will take a look.

    Sonny
     
  6. JakeT

    JakeT

    Joined:
    Nov 14, 2010
    Posts:
    34
    Hi Sonny,

    You were right about the scale / IK issue. I turned off the Foot IK setting on the “Third Person Animator Controller” - and the characters legs are no longer bent back at 90 degrees which is great!

    I'll look into the scale issues, but for nowI turned off the Foot IK setting and have gotten Mecanim to work correctly and can use the sample asset animations. Thanks for your help!!

    Jake