Search Unity

Mecanim dealing with twist bones

Discussion in 'Animation' started by MythicalCity, Sep 8, 2013.

  1. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    413
    Hi, I have a humanoid model that has forearm and lower leg twist bones and doesn't seem to work when imported into mecanim. Here is the what I mean by the bone layout:

    UpperArm
    - Lower Arm
    -- Hand
    --- Fingers...
    - Lower Arm Twist
    -- Lower Arm Twist1

    Upped Leg
    - Lower Leg
    -- Foot
    --- Toe
    - Lower Leg Twist
    -- Lower Leg Twist1

    So, because those twist bones are parallel to the other bones (lower leg twist is parallel to lower leg, etc..) the animation doesn't map correctly so the legs and arms are stretched strangely.

    Any way to fix this from within Unity or is the only way to go back to maya and reparent?
     
  2. lbender

    lbender

    Joined:
    Dec 16, 2013
    Posts:
    7
    did you resolve this?
    i am beginning to add twist bones to my unity rigs...
     
  3. TheCCJ

    TheCCJ

    Joined:
    May 2, 2013
    Posts:
    71
    Instead of having the twist bones be a child of the upper arm (and siblings of the lower arm), could you not add them to be children of the lower arm, so they are in the same heirarchy? This is how I've always done twist bones on other projects (Unreal engine stuff as well as proprietary engines), and it works well.

    So the heirarchy would look like

    -UpperArm
    --LowerArm
    ---LowerArm twist
    ----Hand

    Basically you'd just set up the twist to only be able to rotate in X (or whatever the axis is in your setup) locking out the other two. IK can be handled by the lowerarm bone with the IK Handle existing at the hand (if you need IK).

    Always tends to work fine on previous stuff, that I've worked on.
     
  4. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    413
    I think for our project we ended up removing those twist bones as best as we could. It was a bit of a nightmare to get it all to work and we still didn't get everything perfect, but fortunately our viewpoint wasn't that close up so it didn't matter too much.
     
unityunity