Search Unity

Mecanim Humanoid Issue, Something is missing?

Discussion in 'Animation' started by ChadrickEvans, Apr 12, 2017.

  1. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    I have an issue here where, no matter how many rigs I make, using "Humanoid" as the animation type results in this error.



    Just to be clear, the arms and legs are facing the opposite direction as if the orientation is correct. The head, chest and stomach are are placed as they should be. I will also provide a screenshot of the rig as it appears in Blender. (This issue appears in both fbx and blend format)



    The rig I've used is very simple. I made just enough bones to fill all of the slots humanoid rigs require. The only additional bone is the "root" bone underneath the model. The arms and legs are laid out completely straight.


    If anyone else has ever experienced this issue before and managed to solve it, please feel free to let me know. If needed, I will provide the model for testing.
     
  2. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    289
    A model in humanoid animation that's not animated will naturally sit in the relaxed pose (the mid pose between fully extended and fully contracted), not in T-Stance.
     
  3. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    There's a misunderstanding here. The issue is not that he's in the relaxed pose, the issue is that the relaxed pose is backwards. His hands and feet are behind his body instead of in front. I modeled out a rough draft of a nose and eyes to pinpoint exactly where the face is relative to the arms/legs.

    What I want to know is why this is the case for my rig specifically? It's no different than any other biped rigs I've seen.
     
  4. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    Here is a better example of the error (not the resting pose itself, but the backwards placement that only appears under "humanoid" type)

     
  5. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    194
    Would you be willing to share the rigged character? I'd be willing to take a look.

    Cheers,
    TrickyHandz
     
  6. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
  7. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    194
    Very quickly I ran a Sample Bind Pose on the character in the Avatar Configuration. Right away Unity started pointing out issues where bones were not rotated the way Mecanim expects them to be. See this image for a look at the problem spots:
    MecanimTest_SampleBIndPose.PNG

    This is strictly a guess as I'm not particularly apt at rigging, but the biggest problem spot would probably be the root bone "skeletonTest", which Unity is showing as rotated 180 degrees from where it expects it to be. The once the root bone is fixed, then you should be able to "Enforce T-Pose" for the avatar.

    I know it is not much, but I hope that might help.

    Cheers,
    TrickyHandz
     
  8. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    Thanks, this is the most helpful response I've gotten on these forums so far. I set all of the bone roll values to zero and inverted the root bone (because it was rotated to be placed under the model) however, the issue still remains. the face and arms/legs always seem to be looking in opposite directions.
     
  9. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    443
    The model looks like having the right(r) side and left(l) side switched... The left and right orientation should be in the model's perspective not from viewer's perspective...
     
  10. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    What exactly do you mean here? The tail of the bone should be towards the center of the model?
     
  11. bart_the_13th

    bart_the_13th

    Joined:
    Jan 16, 2012
    Posts:
    443
    No but from this image here

    it looks like you need to rename the (boneName).l into (boneName).r and vice versa...
    Example:
    shoulder.l should be shoulder.r, while shoulder.r should be shoulder.r
    lowerArm.l should be lowerArm.r, while lowerArm.r should be lowerArm.r
    and so on and so on...

    then reassign the bone like what you did here
     
  12. ChadrickEvans

    ChadrickEvans

    Joined:
    Mar 14, 2015
    Posts:
    38
    Wow, I can't believe this. That actually worked.

    Thank you for providing a solution after months of looking through it all!
     
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,070
    I've seen this happen to people before, but I don't know what causes it. If you develop any clues as to why L/R got switched, please post them.
     
  14. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    135
    I know how it happens. And it's really annoying.
    You have to manually transform the pivot rotation of the bone(s) in order to solve this issue. (Simply detach the legs from pelvis and offset them individually)
     
unityunity