When an IK chain extends towards its full length, it will tend to snap into it’s final position. To prevent this from happening, it is possible to give the appearance that the IK chain is stiffening as it extends towards it’s full length. This technique isn’t new and similar functionality is already implemented in Cinema 4D.

In XSI, we need a way of allowing the chain to gradually fall behind the position of the effector. This stops the effector from snapping the chain into the final position, and gives rise to a much more natural motion (as seen below).

(Note: If you are unable to view the GIF animation, you may need to change settings in your Firewall. For example, in Zone Alarm, you need to disable Privacy->Ad Blocking)

The snap effect visible in the top chain isn’t due to some inaccuracy in the IK calculation, but is just down to a simple geometrical effect. It can be shown mathematically (see diagram below) that as the effector pulls the chain into the final position, the velocity of the bones towards their final position tends towards infinity! This is obviously not desirable and can make the animation look jerky and artificial.(click to enlarge)

To achieve the type of motion shown in the lower chain, we need to add an extra object which is used to drive the IK chain effector. A scripted operator links the two objects and we use a mathematical expression to give the desired result. The only bits of information the operator needs are the total chain length, and something I call the “Soft Distance”. This represents the distance from the chain’s full extension that the effect starts to work.

There is one downside with this approach, as it means you can’t fix the end point of the chain in position. However, this can be solved as long as you are willing to put a small amount of extra work to animate the Soft Distance parameter.

The soft effector object has a custom property to allow you to easily control the operator.

To make things easier for you, the Chain Length is calculated by an expression which sums the length of each bone in the chain. This allows you to change the length of a bone, and still have the Soft IK work.

In the diagram below, the Soft Distance is represented by the distance between the green and the red lines (actually, they’re circles, but too large to see). As soon as the effector reaches the green line, our scripted operator starts to lag the chain effector behind our soft effector. This is done while making sure that we have no jerkiness in the motion of the chain effector.

(Note: If you are unable to view the GIF animation, you may need to change settings in your Firewall. For example, in Zone Alarm, you need to disable Privacy->Ad Blocking)

The equation used to create this effect is shown below:

(click to enlarge)

For a chain length of 3 and a soft distance of 1, this equation looks something like this:

(Note that this also features the Stretchy Bone Chain extension shown in Part 2 of this article)

To install the plugin, just download the zip file, unzip the script, and copy it to a “Plugins” folder. So for example, you can use your “C:\users\username\Softimage\XSI\Application\Plugins” folder, or one in your workgroup.

To use the Soft Effector, create a 2D or 3D Skeleton Chain, select any part of the chain, and go to “Model->Create->Skeleton->Apply Soft Effector”.

17 Responses to “Soft IK in XSI”

It”s not more simple to play with the blend slider of the position constraint from the cube to the effector. I mean, just applying an expression that decrease the constraint strength when the distance between chain root and effector is close to the sum of the length of the two bones of the IK chain ? It”s just a question, nice work anyway.

I just tried playing with that, and I don”t think it helps. Try creating a 2 bone chain and add a null with the effector pose constrained to it. Now set the blend weight to something small like 0.1 and animate the null moving away from the chain at a constant speed. You”ll still get the “snap” effect, and even worse, the chain won”t always be pointing at the null because of the iterative way that XSI solves the blended constraint . I don”t think adding an expression to the blend weight will make much difference.

I wouldn”t take my word for it though, give it a go and let me know if you have more success than I did!

Cool technique! Another trick that I use is to never build the bones in a straight line. (i.e. when the leg geometry is straight the knee joint is at a 5 degree angle.) It softens that snapping motion a lot but you can still lock it into position without drift. Then you just have to set a rotation limit to keep the knee or whatever from “breaking” the other way.

Hi,I downloaded the script, followed your instructions, but I don´t see it appearing in my Xsi 7. Must I do an extra step, configure something -somewhere-? I even dragged and dropped the .js as a button but it doesn´t run on my bone chain.

Hi ı am using a quadruped that created from a quadruped guide. I want to use this soft ik plugin on that rig but it doesnt effect my rig. Is there a way to apply this soft effect to the already built up rigs?

[...] because the speed of that joint non-linearly increases as we are close to straight. Good sources here and here (softimage blog). My solution for non stretchy is exactly the same as that blog post- [...]