Blender's IK system let's you assign targets (called Pole Vectors) which lets you control the orientation of the bend in the IK chain. But there's a common problem...
You need to be able to control the orientation of the elbows, and you do this using IK pole vectors.
But there's a catch, isn't there? When you add the pole vector, your binding pose breaks! That's bad. When you are rigging, Thou shalt honour the bind pose and keep it holy. Preserve it, pure, sanctified and unscathed.
How do we fix this?
Notice that Blender's IK constraint requires that you specify a Pole Angle. By varying this value, you can rotate the elbow around the arm's axis. What value should you put in there? Well, that's the problem. Yes, you can vary it by hand until the elbow is roughly in the binding pose, but if you do it this way, you won't get it exactly right.
To fix this problem, you need to understand exactly what the pole angle is. Check out my diagram.
Line A is the x-axis of the upper arm bone. Line B is drawn from the Pole Target and intersects the IK axis at 90°. The Pole Angle is the angle the IK system will put between lines A and B.
In other words, if the Pole Target is located exactly on the upper arm's positive x-axis, setting the Pole Angle to 0° will put the IK arm into the rest pose.
This is how you can set it up:
- In pose mode, make sure your entire rig is in its rest pose (select everything, hit alt-S, then alt-R, then alt-G)
- In edit mode, duplicate the upper arm bone. This will become your elbow target.
- Keeping the duplicate bone selected, go into pose mode. Move the bone a distance of your choosing along its positive local x axis. Don't get this wrong - it has to be the the local x-axis in the positive direction.
- Go to menu Pose -> Apply -> Apply Pose as Rest Pose
- Add the IK constraint to the forearm bone as normal. Use the new bone as a pole vector. Set the Pole Angle to 0°.
Some other notes:
- You don't have to use a pole angle of 0°. If the Pole Target is on the negative local x-axis, set the Pole Angle to 180°. Put the Pole Target on the positive local z-axis and set the Pole Angle to 90° - whatever it is you need to do.
- What if you have 3 or more bones in the IK chain? Well, Blender uses the x-axis of the basal-most bone when using the Pole Angle. In a 2 bone arm setup, the upper arm is the basal-most bone.