Inverse kinematics (IK) is a method of animating that reverses the direction of the chain manipulation. Rather than work from the root of the tree, it works from the leaves.
Using IK to animate a leg
Let's take the example of an arm. To animate an arm using forward kinematics, you rotate the upper arm away from the shoulder, then rotate the forearm, the hand from the wrist and so, on adding rotation keys for each child object.
To animate the arm using inverse kinematics, you move a goal that positions the wrist. The upper and lower arms are rotated by the IK solution which moves the pivot point of the wrist, called an end effector, toward the goal.
In the case of a leg, for example, the foot is constrained to the floor by the goal. If you move the pelvis, the foot stays put since the goal has not moved, and this causes the knees to bend. The entire animation is contained in keyframes for the goal and the root, without keys being applied to the individual chain objects.
With inverse kinematics you can quickly set up and animate complex motions. The basic procedure involves these tasks:
For a continuous-surface model, create a Bones structure or use a biped to animate the skin of the character.
You might also need to move the root of the hierarchy, and you might want to add control objects such as dummies or points at this point.
You can apply constraints to the goals or control objects or to the root of a chain.
You can externally reference IK chains in your scene. An XRef IK chain behaves the same as a non-XRef chain, except that you cannot retarget its XRef controller once it is in your master scene. For more information, see XRef Objects.
You can link a goal or an end effector to points, splines, or dummy objects that serve as quick controls to translate or rotate the end of the chain. These control objects can be linked together as well, or they can be controlled with constraints. You can also use parameter wiring to build relationships between these control objects.
You can wire control objects to manipulator helpers or to custom attributes, creating an easily accessible interface for your animatable model.
You can add further controls to manipulate the elements in the middle of the chain.
Differences Between Forward and Inverse Kinematics
Forward kinematics uses a top-down method, where you begin by positioning and rotating parent objects and work down the hierarchy positioning and rotating each child object.
Basic principles of forward kinematics include:
These principles are fairly forgiving. As long as everything is linked together and the pivots are located at joint locations, you can successfully animate the structure.
Inverse kinematics (IK) uses a goal-directed method, where you position a goal object and 3ds Max calculates the position and orientation of the end of the chain. The final position of the hierarchy, after all of the calculations have been solved, is called the IK solution. There are a variety of IK solvers that can be applied to a hierarchy.
Inverse kinematics starts with linking and pivot placement as its foundation and then adds the following principles:
Because of these additions, IK requires greater thought about how you link your objects and place pivots. Where many different solutions for linking objects may be suitable for forward kinematics, there are usually just a few good solutions for any given IK approach.
Inverse kinematics is often easier to use than forward kinematics, and you can quickly create complex motions. If you need to edit those motions later, it can be simpler to revise the animation if you are using IK. It also is the best way to simulate weight in an animation.
Using inverse kinematics requires that you set parameters for a number of IK components. Brief definitions of these components follow; details are provided in other topics.
Inverse kinematics builds on the concepts of hierarchical linking. To understand how IK works, you must first understand the principles of hierarchical linking and forward kinematics. See Animating with Forward Kinematics and Inverse Kinematics (IK).
Joints control the rotation and position of an object with respect to its parent.