πŸ”ΈLayered Blending

This page explains how animation layering works in CAS.

Overview

Component

Layered Blending Component.

Layered Blending combines the main Animator output with the Overlay.

  • Global Weight β€” controls the overall influence of the component.

  • Always Animate Poses β€” evaluates Overlays every frame. Disable to process them once for better performance.

  • Link Animator Parameters β€” updates parameters in the current Overlay Animator Controller using values from the main Animator.

  • Apply Root Motion β€” toggles root motion.

circle-info

Tip: Click "Generate Layered Blends" when skeleton hierarchy is updated - it will re-create Layered Blends elements.

Layering

Layered Blends define which body parts are affected and which float parameters drive the blending.

Layered Blends.

Generated bone chains (by default):

  • Lower Body (legs and pelvis)

  • Spine

  • Head

  • Left Arm / Right Arm

  • Fingers

circle-check

Each blending layer exposes three weights:

  • Base Weight β€” mixes Base Pose vs. Overlay on this layer

  • Additive Weight β€” scales additive motion on this layer

  • Local Weight β€” blends the Overlay in local space (useful for fingers/toes; sometimes arms)

All layering parameters are Animation Curves that are attached to an Overlay clip. At runtime, Animation Clips update their values, hence telling the system how to blend them with the main Animator output.

circle-check

Overlay Parameters

You can propagate custom float parameters from the base Animator to Overlays using Overlay Parameters. Each overlay parameter acts as an additive offset that CAS applies on top of the base value at runtime.

  1. Add a parameter and bind a float Add a float parameter to the Overlay Parameters list. At runtime, CAS will add this float to the current value of the corresponding Animator parameter.

  2. Example: Disabling IK while climbing To disable hand IK when the character is climbing:

    • In your climbing animation, add a float parameter named Enable_HandL_IK.

    • Set its value to -1.

    • Add Enable_HandL_IK to the Overlay Parameters list in CAS.

    When the climbing overlay is active, CAS adds -1 to the current Enable_HandL_IK value, effectively masking it out (disabling the IK for that hand).

This mechanism lets the base Animator drive the parameter while Overlays locally adjust or override it.

Curve Property Editor

Adding Curves

To add layering properties to an Animation Clip, right-click on the animation and select "Edit Curve Properties":

Curve Property Editor.

Use "+" to add, and "-" to remove a property.

The toggle box is used to switch between the slider and free-range property. The latter is useful when a value has to be specifically out of [0;1] slider's range.

All custom float properties are added to Animation Clips as curves. It's possible to edit the curve directly, instead of using the float field or slider. Right-click on the parameter and select "Curve Mode":

Different editing modes.

Curve Mode means the property will be represented as a curve.

Value Mode means that the property will be a constant curve with a value assigned in the slider or float field.

Blending Parameters

Layered Blending provides these float properties by default:

  • Layering_LowerBody

  • Layering_Spine

  • Layering_Head

  • Layering_Arm_R

  • Layering_Arm_L

  • Layering_Fingers

These additional floats are available for use with Procedural Animation and IK:

  • Mask_Procedural_Animation

  • Weapon_Bone_Weight

  • Mask_Look_Rotation

  • Mask_Attach_Hand

  • Enable_HandR_IK / Enable_HandL_IK

  • Enable_FootR_IK / Enable_FootL_IK

Each new blending parameter is authored as a float curve in the animation clip and bound to a corresponding public float property. At runtime, Unity creates and resolves these bindings, allowing clips to drive our layering properties. Those values are then forwarded to the Layered Blending component.

Unity has an important limitation: it does not automatically reset curve-bound values each frame. As a result, if an animation clip sets Enable_HandR_IK to 1, that value can persist even after the clip stops playing. These β€œstale” values may continue influencing blending and lead to incorrect results.

To prevent this, manually reset the layering curves in your main Animator Controller:

  1. Create a new default layer (first in the layer order).

  2. Drag the Curves_Default clip from CAS into that layer.

Drag this clip as a default state.
circle-info

Tip: This ensures all blending parameters are driven back to 0 every frame, eliminating issues caused by lingering values.

Custom Properties

Prefabs

Assign the Character Prefab to add a public float field or property from a component:

Drag&Drop your character prefab here.

Click Add Custom Parameter and select the desired property:

Select a float property.

Once selected, it will appear in the parameter list and Animation Clip:

Successfully added custom parameter.
Float parameter curve in the Animation Clip.

Animator Controller

Assign the controller reference to select a float parameter from an Animator Controller:

Assign Animator Controller here.

Last updated