Weighted Mask Layers

Unity's inbuilt AvatarMask system allows you to control which bones each layer affects as demonstrated in the Layers samples, however it's limited to entirely enabling or disabling bones. Animancer's WeightedMaskLayers component instead allows you to control the Weight of each individual bone, including fading them over time.

How to Use

  1. Add a WeightedMaskLayers Component:

  1. Click its Edit button in the Inspector to open a window where you can configure it.

  1. Use the ? column to enable the bones you want to include in the mask.
  2. Use the Add Group button down the bottom to add as many groups as you want.
  3. For each bone and group, enter the Weight you want the bone to have when that group is active.
  • 1 is the same as including that bone in an AvatarMask, i.e. Layer 1 will fully control the bone.
  • 0 is the same as excluding that bone from an AvatarMask, i.e. Layer 0 will fully control the bone.
  • Values in between will interpolate between both layers.
  1. In code if you want to change the current Weight group you can get a reference to the WeightedMaskLayers component and call SetWeights(groupIndex) or FadeWeights(groupIndex, fadeDuration).

Known Limitations

  • It only supports 2 layers (Base + 1).
  • It only supports override blending (not additive).
  • These limitations could be removed with further development if enough users request it.