Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Humanoid Rigs and Transform Masks do not work together, but Unity tutorials say otherwise.

Discussion in 'Animation' started by Kalificus, Mar 21, 2021.

  1. Kalificus

    Kalificus

    Joined:
    Sep 4, 2020
    Posts:
    11
    Hello,

    Several forum posts claim that humanoid rigs are unable to utilize animation transform masks. This is the option in question:
    upload_2021-3-21_1-6-24.png

    The forums describe the same problem that I have: Transform Masks on Humanoid rigs have no effect. However, Unity documentation states:

    "This option allows you to specify a mask based on the individual bones or moving parts of the animation. This gives you finer control over the exact mask definition, and also allows you to apply masks to non-humanoid animation clips."

    To me, this wording indicates that it should work with a Humanoid rig. Furthermore, the Unity youtube tutorial for animation masks uses an example:

    "Imagine you have a humanoid rig with a tail... On other layers, it might be a good idea to have the tail bone transforms unselected to be unmasked."

    So clearly, the intention is that Humanoid Rigs should work with transform masks. I am hesitant to call this a bug, but at the same time I have tried many different variations of the masks / rigs and none of them can get a Humanoid rig to work with Transform masks. Switching the rig to Generic makes it work as intended...

    Just tested this with a fresh scene. This illustrates the problem:

    https://thumbs.gfycat.com/FondReliableLiger-mobile.mp4

    (First half is the Humanoid Rig, second half is when I change it to Generic rig. The extra bones (wings and head spike) animate fine on the generic rig, but not the humanoid version.)

    I would upload the scene + assets maybe, but not sure how. Double checked the masks and humanoid rig to make sure it was all set up properly. Im at a loss for how to make this work, as it is integral to many of my models.
     
    Last edited: Mar 21, 2021
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,554
    Yeah, I'd say it's likely not a bug. The example of a humanoid with a tail would probably only work because the tail isn't one of the bones mapped by the humanoid avatar.

    Though to be sure, make a duplicate of your model (Ctrl + D) so that you can enter Play Mode with one Generic and one Humanoid in the scene at the same time. There are some things in the animation system that don't like to be changed while the game's running so the Rig change might not have been properly applied.
     
  3. Kalificus

    Kalificus

    Joined:
    Sep 4, 2020
    Posts:
    11
    I would expect that too, but the Wings that I added to the armature arent / werent mapped to the default Humanoid configuration. In fact, I just tested the armature again, and unparented the wings and skull spike to make sure they werent interfering with the default Humanoid configuration (They are independent, standalone bones now.). The result is the exact same, the transform masks have no effect.

    Here is the setup. Left model is set up as Generic, right one is Humanoid. Both are using equivalent transform masks.

    https://thumbs.gfycat.com/OrderlyAthleticDwarfrabbit-mobile.mp4
     
    Last edited: Mar 22, 2021
  4. Kalificus

    Kalificus

    Joined:
    Sep 4, 2020
    Posts:
    11
    Bump. It would be a big help if anyone could provide some insight, or at least confirm if this is a bug or not.
     
  5. Kalificus

    Kalificus

    Joined:
    Sep 4, 2020
    Posts:
    11
    Update: Unity Staff have replied to my bug request:

    "This isn't a bug, on human characters, transform masks will only be applied to transform bones (extra bones that are not in the human description) that have been imported separately for the character. You have to set these bones per animation in the Model Importer in the Animation tab:

    • Select the animation clip you wish to customize.
    • Under mask, set definition to “Create from this model”
    • Under transform add the transform you wish to import for this animation clip.

    That said, if you have further questions, please feel free to contact us."