Sub topic 9
IK Options: Stretch, Use Tail, Iterations, and Weights
This chapter assumes that you can create an armature, switch to Pose Mode, and add an IK constraint with a target bone. It also assumes a two-bone arm chain such as upper_arm and forearm, with a control bone named hand_ik.
An IK constraint solves a chain so that its end reaches a target. The solver still needs rules for distance, precision, and orientation. The main IK options control those rules.
Preventing or Allowing Stretch
By default, an IK chain tries to preserve its rest-pose lengths. If the target moves farther away than the chain can reach, the chain may stop short. Enabling Stretch allows Blender to lengthen the bones so the chain reaches the target.
Stretch is useful for:
- Cartoon characters.
- Tentacles and flexible limbs.
- Rigs where reaching the target matters more than preserving proportions.
Stretch is usually undesirable for realistic arms and legs. It can make a limb look rubbery when the control moves too far away. Place a distance limit on the control or leave use_stretch disabled.
import bpy
rig = bpy.data.objects["ArmRig"]
forearm = rig.pose.bones["forearm"]
ik = forearm.constraints["IK"]
ik.use_stretch = FalseChoosing the Target End with Use Tail
When the target is another bone, Use Tail determines which point of that target bone becomes the IK destination. With it disabled, the solver uses the target bone's head. With it enabled, the solver uses the target bone's tail.
A control bone is often placed with its head at the desired hand position. In that arrangement, leave use_tail disabled. Enable it when the target bone's tail is the point that should control the chain.
ik.use_tail = FalseThe setting does not change the target bone's position. It changes the point that the IK solver reads.
Accuracy and Performance with Iterations
IK is solved repeatedly. Each pass is an iteration, meaning one attempt to reduce the distance between the chain and its target. More iterations can improve accuracy, especially with long chains, limits, or competing constraints.
More iterations also increase evaluation cost. Start with a moderate value such as 10 or 20. Increase it only when the chain visibly stops short or jitters because the solver has not converged.
Weight and Orientation Weight
weight controls the positional contribution of the IK solution. orient_weight controls how strongly the solver aligns the constrained bone's orientation with the target.
These values differ from influence:
| Setting | Main effect |
|---|---|
| `weight` | Strength of the IK position solution |
| `orient_weight` | Strength of target orientation |
| `influence` | Overall blend of the entire constraint |
ik.iterations = 20
ik.weight = 1.0
ik.orient_weight = 0.0
ik.influence = 1.0A low orient_weight is common for an arm when the target should place the hand but should not fully control its rotation.
Exercise
An arm must keep its real proportions, reach a hand control only when it is within range, and ignore the control's rotation. Which IK options should you use?
Show answer
Set usestretch to False, usetail according to which end of the control bone marks the hand position, use a moderate iterations value, set weight to 1.0, and set orient_weight to 0.0.