This is an update about the soft IK video I made almost 10 years ago. I got a question from an audience about adding stretchiness on top of it. While the original source of explanation for Softimage is gone, I had better jot it down before forgetting again.

Here is the updated scene file Soft_IK_END2.ma.

For anyone who haven’t heard of soft IK, it is about “softening” the pop when the ikHandle moves from fully extended to un-extended position. The solution here is to limit the ikHandle’s position such that the joint chain never go straight no matter how far the control goes. We need the equation below.

When x → infinity, y → 1 but never equal to 1

See the graph below. We use a variable soft to define a starting point Ds = D * (1-soft), which is slightly smaller than D.

When the ctrl is moving away from the root joint, and reaches Ds ( along x-axis ), the ikHandle starts to slow down ( along y-axis ), moving toward but never equal D.

You could test and play with the graph interactively at https://www.geogebra.org/calculator. Download and Unzip my graph SoftIK_graph.zip. Load it by Open > LOCAL FILE.

Below is the expression in the scene file. Stretchy works by multiplying the scaling ratio to both joints’ scale x and the offset for the joint softJ_end. You may also note that I’m using D * (1-s) instead of D – s in the old version. It seems that the result would be more consistent for characters of different size.

float $D = 9.715;
float $soft = foot_ctl.soft;
float $d = distanceDimensionShape1.distance;
float $Ds = $D * (1-$soft);

float $stretchy = foot_ctl.stretchy;
float $scaling = (max($d / $D,1) - 1) * $stretchy + 1;

if ($d > $Ds)
	  softJ_end.translateX = $scaling * $D * (1-$soft * exp( -($d-$Ds)));
else
	  softJ_end.translateX = $d;

joint1.scaleX = $scaling;
joint2.scaleX = $scaling;

In my own autorig they are all done with utility nodes. But it seems handful to keep the expression scene as it is faster to experiment with ideas and equation. There are some free plugin solutions which should be more efficient. But I think this is not too difficult and is worth learning if I could apply it somewhere else in the future.