How to Properly Rig Your Characters for Animation
Once your character is modeled, you’ll need to get it ready for animation. This process is called rigging. The goal of rigging is to add a skeleton and controls to your model so that an animator can manipulate and animate the character. A properly built skeleton can be quickly and easily manipulated to attain any pose. Once the skeleton is built, it can deform the character in a way that will, ideally, make the rendered character look alive to the audience.
A good character rigger is part animator, part programmer, and part interface designer. The rigger needs to understand how animators work and translate that into an efficient setup. The perfect setup allows animators to have as much control over the character as they need while automatically managing the parts of a character that animators don’t have to think about.
Hierarchies and Character Animation
Most 3D packages organize information about your character into a hierarchy. Essentially, the hierarchy tells the computer that the foot bone’s connected to the shin bone, the shin bone’s connected to the thigh bone, and so on. The hierarchy looks a bit like a tree, with each connection forming a branch. It’s very similar to the nested directories found on your computer. Once you’ve chosen a means of animating your character, you can make a decision about how to set up the hierarchy.
The root of a character’s body is almost always the hips or pelvis. The pelvis is close to the center of gravity of the human body, which makes it a good candidate. More importantly, it is the center of weight distribution for the entire body. The pelvis supports the spine and the entire upper body, passing this weight down through the legs to the ground. Finally, almost all motions in a character start with the hips—yet another reason to have them as the root of your character’s hierarchy.
Most single-skin characters are deformed using a skeleton made up of bones and joints. As with the human skeleton, the rigid bones are connected by joints. In most 3D packages, bones are helper objects that don’t render. They sit inside the skin of a character and act as a guide for the deformation utility that actually deforms the mesh of the character.
There are differences, however, between real bones and the virtual bones in a 3D application. Virtual bones exist simply to help the skeleton deform a mesh. They may not have to match a real skeleton exactly. The few dozen bones in the spine, for example, can usually be represented by a handful of virtual bones. There may also be places in a virtual skeleton where additional bones are required to help deform the mesh properly.
To build a skeleton, you’ll place the bones within the mesh and then assemble them into a hierarchy that can be animated. Once a skeleton is assembled, there are two strategies for manipulating and animating a skeleton: forward kinematics and inverse kinematics.
Forward kinematics (FK) is the default method for manipulating hierarchies or skeletons. It is rotation based, which means that you position the joints by rotating them around each other. This is essentially the way human joints actually work, and it provides a good simulation of reality.
If, for example, you want to place a character’s hand on a coffee cup, you first rotate the shoulder, then the elbow, then the wrist and fingers, working your way from the top of the hierarchy on down. Each rotation brings the hand closer to the cup.
Since forward kinematics is rotation based, you can’t simply pick up the hand and place it on the cup. This would merely move the hand to the cup, leaving the wrist behind.
Inverse kinematics (IK) works the opposite way; it’s translation based instead of rotation based. Inverse kinematics is easy to use: you place the character’s hand on the coffee cup, and the rest of the arm automatically follows. This simple action is more complex than you might think, because the software must solve the rotations for all of the joints in the arm so that the bones remain connected to each other and look natural.
To make things more complicated, there can be many ways of orienting a character’s arm so that the hand rests on the cup. The computer doesn’t know how the joints of the body are supposed to move—if it’s just as easy to bend the elbow backward or sideways to make the arm meet the cup, that’s fine with the computer. This problem can be resolved to some degree by using parameters such as rotation limits, but IK can still be unpredictable, particularly when used on limbs with a large range of motion, like arms.
The Parts of an IK Chain
An IK chain consists of a group of joints whose rotations are manipulated by an object called an effector. The first joint in an IK chain is known as the root of the chain. It’s also the root of the hierarchy, but may not be the root of the entire skeleton. This joint may also contain data that helps position the chain, depending on the software. Moving the root of the IK chain moves everything below it in the hierarchy.
The tip of the last joint of the chain is called the effector. This element controls the position of the end of the IK chain. The software will always try to position the chain so that it runs between the root and the effector.
Bones (connected by joints) lie between the root and the effector and act as articulated points in the chain. An arm would have one joint—the elbow—while a spine may have many joints.
Manipulating a Chain
You manipulate the IK chain using the effector. As you move the effector, the joints of the chain rotate accordingly. This makes posing and animating a character easy, because you need to consider the position of only a single effector, rather than the rotation of many joints.
What happens when you pull the effector beyond the limits of the joints? Most software keeps the joints at a fixed length, so the fully extended chain simply aims itself at the effector. Some software, however, can allow the joints to stretch, expanding the length of the entire chain to meet the effector. This sort of effect can be used for cartoony squashing and stretching motions.
At the other end of the chain, translating the root typically moves the entire chain. If the IK effector is outside of this hierarchy, the end of the chain will stay locked to the world. The effector can also be connected to another object via hierarchies, or to a constraint to make the joints follow another object. If a character is riding a bike, for example, effectors at the hands can keep the arms locked to the bike’s handlebars.
To prevent joints from bending the wrong way, you may need to inform the software exactly what the limits are for a specific joint. Most packages allow for these limits to be configured on a joint-by-joint and axis-by-axis basis. Some packages have different types of joints and let you specify a joint as either hinged (two-dimensional) or ball and socket (three-dimensional).
Rest Positions and Goals
Many packages have incorporated the idea of a default joint position, also known as a rest or goal position, for a series of skeleton joints. Setting a default position forces the chain to return to the default shape when the effector is moved to its default position. The default position is usually the one in which the joints were originally created, but some packages allow for it to be redefined at any time.
This feature helps animation considerably because it makes the behavior of the skeleton quite predictable. It is also exceptionally good for chains with many joints, like an animal’s tail.
Controlling IK Chain Direction
You’ll also need to consider the overall direction of the chain itself. The knees are a good example: a character’s knees can point either straight ahead or out to the sides. Both of these solutions are acceptable, but manipulating that angle requires some extra control. Depending on the software, several methods can be used to specify how the joint should bend. The angle is often a separate attribute that can be modified or animated. Another method is to create a constraint in the form of a helper object. Under this method, the knee would point at this helper object, and you would animate the object to control the angle of the knee.
Mixing Forward and Inverse Kinematics
While IK is almost always used for legs, it’s not always the best option for other parts of the body. Since forward kinematics is based on rotations, its default motion causes the joints to move along rotational arcs, which looks more natural because it is the way real skeletons work. This is much more desirable than IK’s default motion, which is a straight line. Of course, there are many times when you will need IK to lock down the hands, but when the hands are free, FK can be much easier to animate.
In order to meet these differing needs, most advanced packages offer some method of switching between FK and IK, often by letting you change the influence of the IK effector. When it’s at 100 percent, IK is fully engaged; change that influence to zero and FK is fully engaged.