Hi all,
I’m trying to extend upon an idea oulined by Andy Nicholas here and here. I’m basically trying to achieve soft-blended stretchy IK in max for future rigs at our company. I’m not huge on maths so it took me a while to sit down and decipher the equation listed at his site and this is what i’ve come up with: ds(1-exp(-(x-da)/ds))+da where ds is the falloff of the soft IK effect, da is full stretch distance minus ds and x is the current distance between the two points.
I’ve set up a simple 2-bone IK system to get the smooth blending working before I move onto the stretchy blending and am getting very mixed results. I made the distance between the bones 20 and wanted the falloff to be 5. I’m working purely off the x axis at the moment in order to better understand the concept. I have 2 point helpers which i’m using to measure the distance, one of which is the soft IK control. I’ve attached the following script to the X position track of the IK controller:
if $point06.pos.x > 15 then 5*(1-exp(-(($point06.pos.x)-15)/5))+15 else $point06.pos.x
After animating point06 in X it appears to work with a subtle falloff until about 99% and then it seems to pop to 100%. I’m not entirely sure if this is a bug with max (which wouldn’t surprise me) and I need to simply limit it to 99% of the effect, or if there’s something wrong with my maths. The curves in the curve editor do look perfectly exponential so I’m leaning more towards it simply being a limitation of max.
I’d also like someone to explain how the equation that I’ve derived works because I’m a little baffled as to the maths behind it. I’m yet to work out a way to make the falloff distance shorter so it has a more accelerated curve too because currently the control point has to travel a long way for it to reach the full extension of the bones.
Anyways, thanks in advance for any guidance in this area. Once I understand this concept, I’ll continue on to make it work with stretchy bones and eventually post a script to enable automated creation.
Cheers,
Sebastian


(with this you just wire the ratio to a multipler of the bones original length, and parent the ik goal directly to your control object, XSI’s goal is based on the length of the bones)