UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

assets

[Mecanim] Custom Bones Ignored by Humanoid Avatar Rig

Solution

animationfbxmecanimrigging

Unity 2019.x - Unity 6.3.x

Published 1 days ago

Issue

 Integrating character models with additional bones into a Humanoid Avatar rig often results in those nodes being ignored. When the Avatar definition is copied from a source model, standard configurations exclude non-humanoid nodes like weapon slots or accessory points, preventing independent animation of AvatarMask elements and limiting character functionality.

When custom bones are ignored by a Humanoid Avatar, an AvatarMask must be used to manually include these additional nodes within the animation hierarchy.

Explanation

To ensure that custom bones are properly recognized and animated by a Humanoid Avatar rig, an AvatarMask must be configured and applied. An AvatarMask allows for selective inclusion or exclusion of specific bones in an animation. This addresses scenarios where bones beyond the standard Humanoid definition, such as weapon attachment points or accessory slots, are not being processed by the animation system.

The process involves:

  1. Create a new AvatarMask asset in the Project window.
  2. Within the AvatarMask editor, navigate to the Transform tab.
  3. Import the hierarchy of the character and enable the checkboxes for all nodes intended for animation. For instance, if your custom bone or your accessory bone is present, it should be located and enabled.
  4. Save the AvatarMask asset.

Finally, the created AvatarMask must be applied to the animation clips or the AnimatorController. When importing animations, locate the animation clip in the Project window, open its Rig tab, and apply the AvatarMask in the Mask property of the clip’s Import Settings. Alternatively, an AvatarMask can be assigned to individual layers within an AnimatorController to control which parts of the rig are affected by specific animation layers.

Additional Tips

  • Ensure the Avatar is correctly mapped before applying the AvatarMask.
  • Check for naming consistency between the source model and the AvatarMask hierarchy to avoid transform mismatches.
  • Use the Import Skeleton button in the Transform tab if the hierarchy does not automatically populate.

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.