Inspired 3D: Creating and Understanding Skeletons and Kinematics
When you move the IK handle, joint1s root remains in place. The distance between the IK handle and joint1 grows larger and smaller when you move the IK handle, causing rotations on joint1 and joint2 (see Figure 18). Changes in this distance tell the solver how to bend the joint chain.
Thats it. Almost automatically, you have one of the most effective ways to create realistic motion in your characters. One other thing you should know is that once you place IK on a joint chain, manipulating the joints by using the IK handle will always maintain the current length of the joint. This can be very useful when youre using a joint chain to deform a surface but do not want the surface to stretch abnormally.
What Is Happening to My IK?
When youre working with IK solvers, you will inevitably come across situations in which the IK appears to flip 180 degrees for no apparent reason. Actually, there is a really simple and predictable cause for this behavior. Its called a pole vector. A pole vector is basically an axis that defines which plane the joints should lie in that is, where your knee or elbow will point. The problem starts with the fact that there are an infinite number of solutions for your joints based solely on the starting positions of the joints. To limit the number to a single solution, the IK solver uses the pole vector as a method of selecting the plane for the joints.
In order to create the hinge joint type of motion found in elbows and knees, IK systems rotate the first bone on one axis and within that plane, as shown in Figure 19. As you can see, the joint always remains in that plane, no matter how the skeletal system orients itself. When you move the IK handle, however, you run the risk of creating situations in which the IK solvers solution is not what you want usually an abrupt flipping of the orientation of your joints. Joint flipping is caused by the IK handle moving past the solvers pole vector, as shown in Figure 20. The solver flips because the flipped orientation is appropriate based on the new position of the IK handle.
Pole Vectors
One of the best ways to fix your flips is by creating a node to which the pole vector of your characters arm or leg will try to orient itself. In most packages, this is called an up vector or pole vector constraint. Pole vector constraints are also great for helping you quickly create poses for arms and legs that you dont get automatically. They allow you to control the flipping region, or pole vector, and move it out of the way of an IK handle. In other words, when an IK handle nears the flipping region, you can move the pole vector to change the orientation of the region.
Most of the time, your pole vectors move with the body of the character and will always remain close to the back or front of the character.
The pole vector isnt a plane. Its a vector or an axis. When you modify a pole or an up vector, you are telling the solver to solve for your primary rotations first (the bending of the joints inside the rotation plane) and the pole says what direction to orient the joints on that axis.
![[Figure 18] The IK handle translates in Y, creating rotations on the joints.](http://www.awn.com/files/imagepicker/1/i3DSetup18_fig18.jpg)
![[Figure 19] The pole vector (blue arrow) defines the plane (in purple) in which the joints will rotate.](http://www.awn.com/files/imagepicker/1/i3DSetup19_fig19.jpg)
![[Figure 20] As the IK handle moves through the pole vector, the joint flips its orientation.](http://www.awn.com/files/imagepicker/1/i3DSetup20_fig20.jpg)























Post new comment