12th January 2010

Blending between stretchy IK and FK Arms with ICE

As well as being a rather nifty effects-device, ICE also has a lot to offer as a tool for rigging, particularly for those more inclinded to the art side of things. It offers a visual apporach to scripting compared to more traditional operators or expressions. Being able to drag in object and riffle through their available parameters makes for a very organic (if occasionally cluttered) working method.

In this post I’ll be explaining how I made the stretchy arms for my Masters Project rig (see the final thing in action here) using ICE. In theory there’s nothing stopping you from following the same process with an expression but, well, why waste a shiny new tool?!

What we’ll be doing here is creating an ICE Tree for each stretchy bone and setting Data on it’s self.length parameter. For this to all work we’ll need the following ‘ingredients’:

  • An IK/FK arm (obviously)
  • The length of both arm bones (in this case it’s 5.67)
  • The length of the unstretched bone (3.17 for this example)
  • A DisplayInfo Custom Parameter on the bone to create the FK stretch (make sure that the default value is 1)
  • An IK/FK blend DisplayInfo Custom Parameter on the IK control (a float between 0 and 1)

First we’ll see how to make a basic FK stretch. It’s really, really easy: it just involves multiplying the bone’s length by the Custom Parameter and setting the Data.

See? Easy!
See? Easy!

Then, to make the IK stretch it’s just a case of getting the distance between the arm’s root and the IK control. If it’s longer than the full length of the arm we’ll need to add a value onto the bone’s length. First we find out just how much more we need to add on by taking the arm’s length off of the distance we need. Then we divide that number by two (as we’ll be giving a bit to each bone to preserve the ratio) and add it onto the original length. We can set the self.length data with that value.

...like so.
…like so.

So now we have two values – one for the amount for the FK stretch, one for the IK. The easiest way to blend between the two is to use the IK/FK value (which I presume you have anyway as part of the Arm IK/FK setup). We can one of the stretchy values by this to smoothly turn it on and off (so if we’re adding, say, 2 to the arm’s length we’ll be timesing it by a value between 0 (for off) and 1 (for on)). At the same time we can multiply the other stretchy value by the inverse (to get this simply do a ’1 – value’ calculation) to provide a smooth blend.

Should make things clearer!
Should make things clearer!


Comments and Feedback

  1. Carlos
    September 14th, 2010 at 1:39 pm

    In a 2 bone chain, when the first bone strech, the position of the second bone should fallow, how did u manage to do that. Mine do not fallow. By the way thank a lot for this little tutorial, really helpfull!

  2. Peter Agg
    September 26th, 2010 at 7:54 pm

    Hi Carlos,

    Really sorry for not replying sooner, been a bit snowed under for the past couple of weeks and your post passed me by.

    Don’t know if you’re still having problems with this, but out of interest how are you setting up the chain? If they’re 2 seperate bone chains then it might be worth looking at how they’re connected – if the second bone/root is parented or constrained to the first bone object then the length won’t be affecting it. You’d either need to draw the chain as a single series of bones or have the second bone underneith the effector of the first for it to correctly calculate the position.


Leave a Reply