Houdini 21.0 Nodes APEX nodes

rig::TwoBoneIK

Solves a two-joint IK chain.

On this page
Since 20.0

This IK solver calculates the position and orientation of a root, mid, and tip joint. The root joint is positioned at rootdriver, and the tip joint attempts to reach the goal position.

If the distance from the root joint to the goal is less than the length of the IK chain, the IK chain will bend. The mid joint, where the bend occurs, sits in the rotation plane whose orientation is determined by twist.

If the distance between the root joint and the goal is greater than the length of the joint chain, the joint chain will straighten out, with the tip's position reaching as far as possible in the direction of the goal. If stretch is set to True, the joints will stretch (scaling along their axes) until the goal position is reached.

Inputs

root: Matrix4

The root joint’s transformation matrix.

mid: Matrix4

The middle joint’s transformation matrix.

tip: Matrix4

The tip joint’s transformation matrix.

rootdriver: Matrix4

The position of the root joint.

twist: Matrix4

The orientation of the rotation plane in which the joints bend.

goal: Matrix4

The target position for the tip joint.

stretch: Bool

If set to True, the root and middle joints will stretch beyond their initial lengths to reach the goal's position, scaling their transforms along their joint directions.

blend: Float

Blends the effect of the IK solve. A value of 1 means the effect is completely on, and a value of 0 means the IK solve has no effect.

Outputs

rootout: Matrix4

The output world space transform of the root joint.

midout: Matrix4

The output world space transform of the middle joint.

tipout: Matrix4

The output world space transform of the tip joint.

APEX nodes