Chapter

With the character textured and looking good, you can start the animation process. The easiest way to animate the Hicks character is to add a structure of bones underneath the skin mesh. Then you can animate him by simply moving the bones into position, causing the skin mesh to deform along with the underlying bones. In this chapter, you will

■ Start to add a biped to the scene

■ Position the biped within the center of the skin mesh and move and scale all the bones to align with the skin mesh

■ Apply the Skin modifier to the skin mesh and select all the bones to use to control the mesh

■ Adjust the Skin modifier's envelopes for each bone to determine which skin vertices move with each bone

■ Set the character in a default root pose

By installing a bones and skeletal weighting system, you ensure that the mesh will deform properly during animations. Any 3D video game's character that is capable of performing any type of movement contains a bones structure—invisible to the game world—that resides inside of and is attached to the mesh. The bones can consist of anything from a set of inverse kinematically linked primitive objects, like boxes, to a special Biped object that comes with a modifiable joint system. After you design and place a skeletal system, you can animate the bones. Then, after you create an animation sequence, the Torque exporter can export the sequence. In the game, the sequence will drive the bones system, which in turn animates the character mesh.

When you're finished with your mesh, the animated bones take care of the rest. It's up to you, however, to design animation sequences that the game engine can call during gameplay. For instance, if the user presses the Run Forward key, the Torque engine calls the player_forward.dsq animation, and the mesh deforms accordingly. (That is, the left and right leg bones move in a running motion.) For every action that is required of your character in a game, you must develop a sequence that drives it. Thankfully, however, the Torque engine and many others come with default character animations that you can use to drive the skeleton you create. (See the "Adding and Attaching a Biped" section that follows.)

Note

In many games, you can blend animation sequences, as is the case when a character is running and firing a weapon at the same time.

0 0

Post a comment