stretchy ik global scale fix

For the people who are already familiar with setting up a stretchy arm setup using utility nodes(or expressions) this example will show how to fix the problem of double transformation when the character global control is scaled.After interacting with a couple of students who are pursuing their animation course I came across the query regarding the double transformation problem.

The usual approach to create a stretchy ik handle is by creating a distance dimension node and calculate the scale factor by dividing the increased distance by the default distance.This works as long as the scaling is not changed.But once we scale up the global control the distance between the locators  (dist between shoulder locator and wrist locator in the case of arm control)which are grouped inside the master control  increases(since they are either grouped or constrained to the controls which are inside the master global control).So this leads to a increased distance value being passed to the condition node.

increased distance = distance * globalScale

and hence scale factor, which is given by

increased distance/default distance becomes   distance*globalScale/distance= globalScale.

so here we can observe that the wihout even moving the ik control itself the scale factor increased, which is not what we want.We want the increase distance to change only when the control is moved past the limit.

so we have to compensate the effect of scale by dividing the distance passed to the condition node by the globalscale value

This can be achieved by inserting a multiplyDivide node inbetween the distancedimension node and the condition node as shown below.

1. connect distanceDimensionShape.distance to  multiplyDivide.input1X.

2.connect globalControl. scaleY (or even scaleX or scale Z) to  multiplyDivide.input2X.

3.connect multiplyDivide.outputX to conditionNode.firstTerm and conditionNode.colourIfTrueR.

4.set multiplydivide.operation to divide.


You can download the example here

I have included two arm ik setups in the scene.Left one with utility nodes and using translate for getting the stretch and the other with expressions using scaling of the joints for achieving the stretch.


6 thoughts on “stretchy ik global scale fix

  1. leeor

    hey man thanks for that
    im really like that setup with the control of how much stretch you want but it not work with scale ……..i know you put the scale fix but its totaly different setup
    its disconnect the stretch attribute and its stretchy all the time which is not sow good hope maybe you have fix for that


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s