Thông tin tài liệu:
CREATING GAME ART FOR 3D ENGINES- P6: Iwish to thank the editing team at Charles River Media (Emi Smith,Karen Gill, Jennifer Blaney, and Jenifer Niles) for their help in gettingthis book publish-ready. Thanks, too, to my technical editor, MikeDuggan. Also deserving recognition are the guys who make the TorqueGame Engine available, GarageGames, who directly or indirectly madethis book and the accompanying CD possible. In particular, I want tothank Joe Maruschak at GarageGames for the great articles and forumanswers that have helped me and many others get a handle on this engine.I...
Nội dung trích xuất từ tài liệu:
CREATING GAME ART FOR 3D ENGINES- P6128 Creating Game Art for 3D EnginesANIMATING THE HEALTH PATCH Animating the health patch is a little more involved because it consists of three com- ponents, and it uses IFL animated textures. First, you must parent the pulse and exhaust meshes to the main body of the health patch. You do this with the Select and Link tool. The location of the Select and Link button is shown in Figure 5.4. This figure also points out the location of the Affect Pivot Only button, in the Hierarchy panel. Once the meshes have been linked and pivots adjusted (if necessary), the main body of the health patch can be animated by using Auto Key. FIGURE 5.4 Select and Link creates parent-child relationships. Adjusting Pivot Points with Affect Pivot Only Carefully place pivot points for any object that is going to rotate. You can move the pivot point for any object by selecting the object and then turning on Affect Pivot Only from the Adjust Pivot rollout in the Hierarchy panel. Normally, you would just use the Move tool to move the pivot point until it is exactly over the area you want. Check at least two or three orthographic viewports to verify that the position is what you think it is; mesh positions can be deceptive in the user and perspective view- ports. When the pivot point is in the position you want, turn off the Affect Pivot Only button. Chapter 5 Animating Game Art 129 Creating Parent-Child Relationships The Select and Link tool in the Standard toolbar is useful for connecting two objects so that when one moves, the other does, too. The health patch you are animating in this chapter requires such a linkage so that when you animate the main body of the model, the other mesh objects come along with it. Normally, the main mesh or model is the parent, and other objects that are linked to it are the children. Using a car as an analogy, the chassis of the car is the parent, and the body, wheels, and en- gine are the children. If you want to attach a wheel to the chassis, you could say you are going to parent the wheel to the chassis. Then you could say that the chassis and the wheel have a parent-child relationship. The Unlink Selection breaks any linkage to the selected object. If you want to see what types of relationships are in your scene, click the Select by Name button on the Standard toolbar, and check the Display Subtree check box at the bottom left side of the dialog box. You can also use the Schematic View button in the Standard toolbar to graphically see parent-child relationships throughout the scene. To parent the pulse and exhaust meshes to the main health patch mesh (healthpower2), press the Select and Link button, and then click-drag from the child to the parent. In the case of the health patch, drag from pulse to healthpower2, and then drag from exhaust to healthpower2. Because all health patches are rotated by the Torque Game Engine by default, animate a slight up and down motion to give the impression that the health patch is hovering over the ground. In this figure, frame 0 has been cloned to frame 80 so that the animation ends up at the same place it started, creating an effective loop. Notice here that the time configuration settings have been adjusted so that there are only 80 total frames. Setting the total number of frames to the length of the loop will give you a better sense of how the loop will look in the game when you play the animation. Because IFL texture animations are involved, try to coordinate the number of frames in your hovering animation so that the IFL animations divide into that num- ber of frames. This way, the IFL animation cycle is not interrupted at the end of the hovering animation cycle. The health patch and all related files are available in ON THE CD FilesHealthPatch on the companion CD-ROM.ANIMATING THE WEAPON The weapon requires no animation, but there is great potential for weapons anima- tions. The crossbow weapon in the default starter.fps game is a good example of what is possible regarding weapons animations. The sequences available are activate, fire, reload, noammo, and deactivate. These sequences and the instructions for imple- menting them are discussed in more detail in Chapter 6, “Exporting Game Art.” ...