Add IK Pole targets without inducing popping

If I add a pole target to an IK chain, there is often popping when I turn the IK constraint on and off.
For purposes of auto-rigging, I wish to be able to insert a pole target without inducing a popping effect.

I have found a way of doing it manually, but I don’t understand why it behaves this way, nor would it be easy to script.

Here’s how it works:
Say I have two bones in my arm, upperarm_Bone and forearm_Bone. They are targeting the hand’s IK control. Now, I wish to add a pole target. I create a bone named pole_Target, align it to the base of upperarm_Bone. I set the transform orientation to “Normal” and I move the pole target bone along one of its local axes, either X or Z. Then, I set the IK constraint’s roll to a multiple of 90 degrees (either -90, 0, 90, or 180).

So, I’ve described 8 possible setups. I can offset pole_Target along the local X or Z, and I can set the roll to -90, 0, 90 or 180. I’ve found that for a given IK setup, only one of the eight combinations works. Different combinations work for different setups, and I am unable to predict which one.

So, does anyone know what is going on?
Could anyone direct me to any sort of documentation on how Blender’s default IK algorithm functions?

Anyone?
:frowning:

Not sure about your solution – but have you checked the riggify script – Nathan put in code to ‘snap’ IK to FK (and vice versa) so that they are in the same position when you animate the transition seamlessly.

I believe you must setup your axis correctly when placing the bone initially for the pop to go away.

@ daren

Cool! Where can I find the code?
I have the rigify add-on, so does that mean I have the code in a folder somewhere on my computer already?

I’ve written an IK->FK matching script before, but I didn’t know how the IK math worked so I ended up having to write a search algorithm. It’s sort of hacky because the results aren’t exact, but it’s good enough for an animator to use without complaint.

@ thedaemon
What axis? And what is the correct way?

You can turn on the Axis in the armature properties panel under View, the same location where you choose the type of bone display, like Box, Stick, wire and so on. Just check the box for Axis and all the bones in the 3D window will display their axses. You can the see if one of your bones is out of wack. To correct it you can go to the armature menue and choose roll, or use Ctrl N with the bone selected and recalculate the roll.

Hope that helps

Along which axis for which bone (IK chains have at least two bones) is the target supposed to lie?

I think I’ve got it.

Placing the target along the positive X axis of the basal bone seems to result in no pop, when the roll value is set to 0 degrees.

Thanks for for the link, randy.