592 11. Animation Systems
One solution to this problem is to use IK to correct for any sliding in the
feet. The basic idea is to analyze the animations to determine during which
periods of time each foot is fully in contact with the ground. At the moment a
foot contacts the ground, we note its world-space location. For all subsequent
frames while that foot remains on the ground, we use IK to adjust the pose
of the leg so that the foot remains fi xed to the proper location. This technique
sounds easy enough, but gett ing it to look and feel right can be very challeng-
ing. It requires a lot of iteration and fi ne-tuning. And some natural human
motions—like leading into a turn by increasing your stride—cannot be pro-
duced by IK alone.
In addition, there is a big trade-off between the look of the animations
and the feel of the character, particularly for a human-controlled character.
It’s generally more important for the player character control system to feel
responsive and fun than it is for the character’s animations to look perfect. The
upshot is this: Do not take the task of adding foot IK or motion extraction to
your game lightly. Budget time for a lot of trail and error, and be prepared to
make trade-off s to ensure that your player character not only looks good but
feels good as well.
11.11.5.5. Other Kinds of Constraints
There are plenty of other possible kinds of constraint systems that can be add-
ed to a game animation engine. Some examples include:
- Look-at. This is the ability for characters to look at points of interest in
the environment. A character might look at a point with only his or her
eyes, with eyes and head, or with eyes, head, and a twist of the entire
upper body. Look-at constraints are sometimes implemented using IK
or procedural joint off sets, although a more natural look can oft en be
achieved via additive blending. - Cover registration. This is the ability for a character to align perfectly with
an object that is serving as cover. This is oft en implemented via the ref-
erence locator technique described above. - Cover entry and departure. If a character can take cover, animation blend-
ing and custom entry and departure animations must usually be used
to get the character into and out of cover. - Traversal aids. The ability for a character to navigate over, under, around,
or through obstacles in the environment can add a lot of life to a game.
This is oft en done by providing custom animations and using a refer-
ence locator to ensure proper registration with the obstacle being over-
come.