Search Unity

Ninja example bug with humanoid rig

Discussion in 'Animation Rigging' started by Jac01, Sep 11, 2019.

  1. Jac01

    Jac01

    Joined:
    Dec 4, 2018
    Posts:
    1
    Problem :
    Multiple problems when converting Ninja from generic to humanoid :
    - Right hand IK animation resumes before returning to 0 when rifle is stowed
    - feet are stuck on IK (don't move with aniimation)
    - rifle animation is not playing

    How to reproduce :
    - Open "Advanced Animation Rigging: Character and Props interaction" example with Unity 2019.2
    - toggle Ninja rig type from Generic to Humanoid
    - play
     
    nicosuave likes this.
  2. nicosuave

    nicosuave

    Joined:
    Nov 16, 2015
    Posts:
    5
    +1 I'm also seeing this problem. It affects my other tools which rely on using Humanoid Avatars. I also get the following warning in the inspector on the Animator:

    Binding warning: Some generic clip(s) animate transforms that are already bound by a Humanoid avatar. These transforms can only be changed by Humanoid clips.
    <list of armature transforms>

    Then, the entire rig is seemingly transformed in the wrong space. See attached project -- just add the cyclopsAvatar to the cyclops object and hit Play: https://www.dropbox.com/s/xvzqovt2pi4ilxf/rigger.zip?dl=0
     
  3. yanghai

    yanghai

    Unity Technologies

    Joined:
    Mar 30, 2015
    Posts:
    13
    Hi. To be clear, this Ninja example project (animation-rigging-advanced-character-interaction-master.zip) was created to share what we’ve been exploring and the many possibilities that this package offers. The focus of this experiment was advanced generic runtime rigging with props specifically, not Humanoid.

    Having said this, yes, this rig should and does work in Humanoid.
    By default, Humanoid only imports animation from the required joints. In this example, there are extra animated joints (feet effectors & prop animation) that are required/used by the constraints & state machine. This means that simply switching from Generic to Humanoid discards these extra animations. In order to import the animation of these extra joints, Humanoid requires you to define an Avatar Mask. This “Ninja Avatar Mask” already exist in the project (Assets>Content>Characters>Ninja>Animations>Controller folder). If you assign this mask to all animation clips in the “NinjaAnimations” fbx file, the Humanoid version of this character will run properly at runtime.

    Since this is all contained in the “NinjaAnimations.fbx.meta” file, I have updated & attached this file for you.
    - Simply replace your “NinjaAnimations.fbx.meta” in the Assets>Content>Characters>Ninja>Animations>FBX folder with this new attached version.
    - Play.

    The “Binding warning” at runtime should be ignored, we will correct this message, as this is being evaluated properly.

    Hope this helps.
     

    Attached Files:

  4. homnislash

    homnislash

    Joined:
    Oct 19, 2015
    Posts:
    3
    Hi, thanks yanghai for your file, but where can I get the original ninja? I downloaded the animation rigging package, but the ninja does not show up in the assets folder at all.
     
  5. simonbz

    simonbz

    Unity Technologies

    Joined:
    Sep 28, 2015
    Posts:
    295
    Hi,

    Have a look at either of these projects to get the ninja character and more examples making use of it.

    SIGGRAPH 2019 Animation Rigging workshop:
    https://github.com/Unity-Technologies/animation-rigging-workshop-siggraph2019

    Advanced character interaction (https://blogs.unity3d.com/2019/09/05/advanced-animation-rigging-character-and-props-interaction/):
    https://github.com/Unity-Technologies/animation-rigging-advanced-character-interaction