Search Unity

Humanoid rig loses animation on some bones? But not if I first make it generic.

Discussion in 'Animation' started by Slein, Dec 17, 2013.

  1. Slein

    Slein

    Joined:
    May 26, 2013
    Posts:
    9
    Hi there everyone,

    At the moment I'm just trying to work with IK. I found out that IK is only supported for humanoid rigs, which is a bit dissapointing. Mainly because I am using a generic rig setting on a humanoid character.

    The reason I am using the generic rig setting is because I have some joints outside the hierarchy that allow me to get position info from the animation and joints for weapons. When I import the character and set it up as a humanoid rig, these joints will lose their animation. Only the joints that are part of the actual humanoid will still animate.

    First of all, is that supposed to happen, because that makes humanoid rigs near useless? :s

    Now, if I import the character, set it up as a generic rig. Save that and play it, the other joints do still have the animation, but obviously the IK doesn't work anymore. Here comes the weird part, if after this I change it to a humanoid rig, the other joints do still receive their animation and the IK works too.

    I am hesitant to use this work-around as I'll be working with a lot of animations and if something goes wrong half-way through importing I think I have to start all over.

    So, is the humanoid rig supposed to lose all animation on any other joints? And does anyone have experience with this work-around, if so, do you advice against using it?

    Thanks for your time!
     
    CakeLegends likes this.
  2. Slein

    Slein

    Joined:
    May 26, 2013
    Posts:
    9
    /bump
     
  3. jooeess

    jooeess

    Joined:
    Apr 5, 2008
    Posts:
    40
    Hi Slein,

    It is possible to do what you want, without resorting to that work-around.

    Until Unity 4.2, there was a checkbox in the rig import settings to "keep extra bones" for humanoid rigs with non-standard additional bones. Starting with 4.3, you have to actually use an AvatarMask that basically includes the whole rig plus the extra bones. So, first create a new AvatarMask object (this is an actual asset, go to your Project view and right click -> create...), set it up to point to your t-posed avatar definition, and then in each animation's import settings, set the Mask to be this mask.

    This is a bit of a pain compared to 4.2 where you just had to do this once and not for every animation clip, but it does provide extra flexibility. Hope this helps!
     
    CakeLegends likes this.