Improper IK stretching

I have this annoying problem when it comes to IK stretching. It seems like the IK bones scale down if the IK chain is bent leading to shorter limbs. This also prevents me from setting up a seamless IK/FK switcher.

Here’s a comparison:

With both the target and the pole target in the same positions, the leg is shorter when stretching is turned on with a stretch value of 0.0001. Does anyone know how to fix this?

I looked around blendswap for some rigs with limb stretching and apparently they all have the same problem as well. I’m guessing this is an inherent problem with how blender does IK stretching, so I’m looking for a workaround now. I’m thinking of setting up a driver that turns the stretching on and off depending on the IK controller’s distance from the start of the IK chain. For this, I would need a tool that measures the distance between two points and allows me to use its distance property as a driver. Something similar to Maya’s distance tool. Does Blender have any measuring tools that can do this?

Each bone has an option called “inherit scale” – deselect it

All inherit scale checkboxes are deselected. I don’t think inherit scale does anything for IK stretching since I’ve tried turning them on and off with nothing happening.

post a blend

Here it is. Stretching is on on one leg and off on the other to show the difference.


Rig.blend (526 KB)

the stretch to constraints have non identical rest lengths between the right and left. match them. Then Click the reset button.

Thanks for the suggestion, but I tried it and it didn’t work. The stretch to constraints were applied to the deformer bones. The IK bones themselves shrink when the limbs are bent, and the scale of the IK bones is what controls the stretching of the deformer bones. Even if the deformer bones are removed completely, the IK bones will still shrink if bent when stretching is enabled in the IK constraint.

My bad. Why are you using stretch to?

IK stretching scales the IK bones in all axes as far as I know, so I used a stretch to constraint. It also has controllable volume preservation so I can change it depending on what is needed in a shot.

but why do you want the legs to stretch period? I understand a little bit of squash and stretch is thoroughfare in cartoon animation - but normally not extreme, such that its’ usually preferred to manually key the stretch/squash of a characters limbs than do an automated aproach?

All of the stretchy rigs I have worked with have this setup. It’s far easier to work with than having to key the scale of the bones for every action especially when animating quick, cartoony motions. For the project I’m working on , that’s pretty much all the time.

I think I figured this out. I’m posting the solution just in case anyone else has the same problem.

This setup uses the distance between two empties as a driver for the stretch checkbox of the IK constraint. This requires the measure panel addon.

1.Setup your IK chain as usual.
2.In the bone properties panel, set the stretch value that you want under the inverse kinematics tab.
3.In the bone constraints panel, make sure that the stretch checkbox of the IK constraint is unchecked.
4.Add a driver to the stretch checkbox.
5.Create two empties. Snap and parent one of them to the root bone of the chain and the other to the target bone. The distance between these two empties will be driving the stretch checkbox.

We need to get the length of the IK chain when it is completely straight. Since an IK chain needs to be slightly bent to behave properly, we need to measure the lengths of each of the bones and add them together. This is where the measure panel comes in.

6.Create as many empties as there are bones in the IK chain.
7.Snap these empties to each of the bones in the chain
8.In the properties panel, open the measure tab, hit the “Activate” button and make sure that the draw distance checkbox is checked. Now if you select two objects, the distance between them will be shown in the properties panel and in the viewport.
9.Measure and take down the length of each bone by selecting the empties that correspond to the root and tip of the bone.
10. Add together the lengths of the bones to get the length of the chain when it is completely straight.

Setting up the drivers

11.Open the graph editor and set the mode to drivers.
12.Select the driver for the IK stretch and set the type to scripted expression in the properties panel.
13.In the Expr box, put “var>[total length of the bones in the IK chain]”
14.Set the driver variable type to “distance”
15.For Ob/Bone 1 and 2, set the empty that is parented to the IK target and the empty that is parented to the root of the chain. The IK chain should now only stretch when the distance between the two locators is greater than the total length of the IK chain. The bones won’t shrink anymore when the chain is bent.

Note: There is a visible “jump” in the rotation of the bones when the stretching gets activated. The more bent the rest position of the IK chain is, the more noticable the jump is.

If anyone has a better or simpler method of achieving the same thing, please do post it. For now, I’ll mark this thread as solved.