Legacy Reference

Animation-Driven IK

Lumberyard supports animation-driven IK that can retarget limbs on the fly and that is controlled by the animation. You begin by controlling and animating the blend weight of this IK in your DCC tool.

An additional _IKTarget bone and _IKBlend weight bone inside a character's skeleton defines the IK target and the blend weight. These weights ensure that a limb reaches a specific destination regardless of animations in higher layers that modify the skeleton. For example, you might create a weapon reload animation that always brings the character's hand to the pocket at the belt, regardless of upper body animations rotating the torso and arms. You can also blend from one IK target to another, such as blending the left hand from a weapon to the magazine and back again.

Animation-driven IK can save memory and asset creation. For example, you can use the same aim pose for different guns by simply moving the IK target to the correct location on the new weapon.

You define the IK solver for a character inside the .chrparams file. Each entry in the file specifies which solver (2-bone, 3-bone, or CCD IK) to use with a chain of bones, the _IKTarget bone, and the _IKBlend weight bone.

You can animate both the _IKTarget bone and the _IKBlend weight bone. If the _IKBlend weight bone indicates that the IK should be blended in, Lumberyard uses the _IKTarget bone to apply the IK solver listed in the .chrparams file to the bone chain.

The end effector of the bone chain is aligned with the target bone and matching its rotation. In this way, you can also control hand orientation.

Blend weight is determined by the distance (in centimeters) of the _IKBlend weight bone from its parent along the x-axis. The distance is limited to values from 0 to 100 to avoid potential problems from blending multiple animations that might affect the same blend bones.

For best visual results, animate the character to get the end effector close and use the IK only to fix the deviation instead of doing all movement with the IK bones alone.

To make Lumberyard aware of the new IK bones and link them to a solver, open the .chrparams file and add a new line for each to the <Animation_Driven_IK_Targets> section, which lists every bone-controlled IK setup the character uses, as shown in the following example:

<Animation_Driven_IK_Targets> <ADIKTarget Handle="LftArm01" Target="Bip01 Chin_IKTarget" Weight="Bip01 Chin_IKBlend"/> </Animation_Driven_IK_Targets>

Each entry to the <Animation_Driven_IK_Targets> section specifies which bones to use for the target and the blend weight and includes a handle that points to an IK solver. These handles are listed in the <LimbIK_Definition> section of the .chrparams file, which links a solver and a bone chain.


You cannot retarget animations between different skeletons.

Bones without rotation controllers are ignored for optimization purposes.