Animating Real- Time Game Characters-P12 pps

30 236 0
Animating Real- Time Game Characters-P12 pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Chapter 8 Using Motion Capture 321 Adding layers on top of each other when making corrections to an animation is much the same as adding modifiers to the modifier stack. It isn 't mandatory, but in case you have to go back and delete or alter one of the changes you 've made, it gives you the ability to delete layers if necessary. This gives you an extra level of protection. Select the right foot and hit the Set Key button for Frame 11 and Frame 18. Then, at Frame 13, rotate it and move it along the Z-axis so that it is perfectly flat on the ground plane. Do the same at Frame 15 (Fig- ure 8.37). FIGURE 8.37 The right foot needs to be on the ground plane and be flat when planted. Select the left foot next, and give it the same treatment. Add a Layer, look for where you need to apply Set Key to keep the desired part of the animation, and adjust the rotation and placement. In this case, the only adjustments are minor. Click on Set Key for Frames 24 and 27, and then rotate and move the foot flat at Frames 25 and 26. The last Layer you need to add resolves an issue with the torso straightening slightly near the end of the animation. Create another Layer, select the first Spine object, and hit Set Keys for Frames 21 and 29. Then go to Frame 25 and rotate the Biped Spine -5 degrees along the Z- axis (Figure 8.38). Collapse the stack of layers and move to the Front viewport to fix one last problem (Figure 8.39). In the Front viewport, step through the animation while watching the left foot. From Frame 24 to 26, it needs to be moved and slightly ro- tated so that its inner edge is along the main grid line at 0, 0, 0. There's no need to use a Layer—just start at Frame 24 and move and rotate the foot accordingly. 322 Animating Real-Time Game Characters FIGURE 8.38 Rotate the Spine object to overcome a slight straightening at the end of the loop. FIGURE8.39 The Collapse Stack button compresses all the animation layers. When you rotate a Biped object with the Animate button active, you can only do so using the Local axis coordinate system. When you go to move the Biped object after rotating it, the coordinate system will also go to the Local coordinate system. If it does, just change back to the View Coordinate system (Figure 8.40). Now you can see how your fine-tuning has affected the animation. While it's a great way to view your animations by keeping the Biped in Chapter 8 Using Motion Capture 323 FIGURE 8.40 Rotation transforms are restricted to the Local coordinate system view, just using the default In Place mode doesn't give you an accurate playback for the animation if you're viewing it anywhere but from a side view. If you want to more accurately see the animation, put the Biped back in In Place mode, but this time choose In Place Y mode (Figure 8.41). FIGURE 8.41 Hold down the fly- out menu and click on the In Place Y mode. Now the character will move slightly from side-to-side as it goes through the run animation—an important secondary motion to any run or walk. Change your Time Configuration to an End Time of 32 to get a smooth playback of the animation (Figure 8.42). The last step to adjusting the animation is to manually move the Biped to the origin point. While In Place mode is a great tool to use dur- ing the review and tweaking stage, it's helpful to manually center the Biped as a finishing move on your animations for looping motions like a run or walk. Do this by selecting the COM, turning In Place Y mode off, and going frame by frame to move the Biped back to 0 along the Y-axis using the View coordinate system. Of course, the best way to move it is to 324 Animating Real-Time Game Characters FIGURE 8.42 With the adjustments complete, there's only one more step to finishing the animation. bring up your Move Transform Type-In menu and enter 0 for the Ab- solute: World value (Figure 8.43). FIGURE 8.43 The Transform Type-In menu is always useful. While it's true that bringing up Track View and deleting all the Horizontal keys for Bip01 will keep the COM at 0, it deletes both X- and Y-axis translation. Since side- to-side movement in the X-axis is crucial during animations like runs and walks to simulate balance and weight transferal, manually moving the animation to 0 in the Y-axis is a preferable solution. Once you get the Biped moved to 0 for all the frames of the loop, save the animation using Save Segment. Click on the Active Time Segment but- Chapter 8 Using Motion Capture 325 ton to the right of Start Frame to automatically set the segment to the cur- rent animation range. Save the new Biped file as Myrun.bip (Figure 8.44). FIGURE 8.44 The Active Time Segment button sets the Start and End frame to match Time Configuration. As an experiment, try loading Myrun.bip into the Motion Capture Conversion Parameters menu. Don't use Footstep Extraction, and do use Key Reduction. Uncheck the Loop checkbox, because you don't need it, and also uncheck the Body Horizontal, Body Vertical, Body Rotation, Left Leg, and Right Leg tracks under Key Reduction Settings (Figure 8.45). Play around with the Tolerance and Minimum Key Spacing values, and include the Legs and Body in the reduction pass to see if you can smooth the animation even further. CREATING A DEATH ANIMATION Shotdrop.csm is an animation of a character looking down the barrel of a gun to see why it's jammed. The idea was for a sort of blooper series of animations for a game project. The idea was never implemented but the data was still captured. If the first chunk of the data is removed, and the overall orientation changed, shotdrop.csm has strong potential for being a great death animation. Using the Motion Flow Editor to Rotate the Biped Create a new Biped or keep the one you've been using for the run ani- mation. Load the Shotdrop.bip file you saved earlier after converting it 326 Animating Real-Time Game Characters FIGURE8.45 Use the Motion Capture Conversion Parameters menu to optimize the upper body during the animation. from a GSM file. If for some reason you don't have it, load the original Shotdrop.csm file from the Chapters directory on the CD-ROM that came with this book into the Motion Capture Conversion Parameters menu and convert it. After you've loaded the file, go to the Front viewport (Fig- ure 8.46). There's no rule that says motion capture has to be done in any par- ticular front, back, or side orientation. It can be at an angle, left, right, or facing the opposite direction. This particular data was captured facing the wrong way. One way you can turn him around is to apply a Layer and rotate the COM so that the character faces forward. However, using Mo- tion Flow mode offers a better way. Chapter 8 Using Motion Capture 327 With the Biped selected, go to the General rollout menu for Biped and click on the Motion Flow mode button (the one with the curvy, Z- shaped icon) found to the right of the Footsteps button (Figure 8.47). FIGURE8.47 Using the Motion Flow Editor is a quick way to reorient motion capture data. Nothing really happens when you click on the Motion Flow Editor button—you have to first input mocap files into the editor using Motion Flow Graph and Motion Flow Script. Think of the Motion Flow Editor as a separate program within character studio. It gives you the ability to combine and alter BIP files to create longer (or just different) animations. To use the Motion Flow Editor, you first have to click on the Show Graph button in the Motion Flow rollout menu (Figure 8.48). FIGURE 8.46 Obviously somebody is facing the wrong way. 328 Animating Real-Time Game Characters FIGURE 8.48 The first step in using the Motion Flow Editor is clicking the Show Graph button. This brings up the Motion Flow Graph window. Click the Clip button active and then click once anywhere in the background space of the window with the funny-looking arrow cursor (Figure 8.49). FIGURE8.49 The Motion Flow Graph is where the motion clips are created. After you've placed clipl in the window of the Motion Flow Graph, open the Motion Flow Script rollout menu, and click on the Define Script button (Figure 8.50). After you click on the Define Script button, character studio waits for you to tell it which clips to enter into the list of clips that are defined by the Motion Flow Script. Click once on the clip1 script you created in the Motion Flow Graph. It turns red to show it's been added to the Motion Flow Script and the script itself now has an entry (Figure 8.51). Create Chapter 8 Using Motion Capture 329 FIGURE8.50 The Define Script button allows you to establish a connection between motion clips. FIGURE8.51 Clicking on clipl in the Motion Flow Graph enters it into the Motion Flow Script. Now right-click twice on the red clipl; this will bring up the clipl di- alog so you can load a biped file into it. Notice that the Define Script but- ton goes off. This happens because you've effectively told character studio you're through defining the script (Figure 8.52). FIGURE8.52 Right-click on the motion clip icon to load a BIP file into it. Click on the Browse . . . button and choose Shotdrop.csm from the Chapter8 directory on this book's CD-ROM. Click OK and close the Mo- tion Flow Graph. Loading a file into the Motion Flow Editor has no effect whatsoever on the current animation loaded into your Biped. If you turn Motion Flow Editor off, it keeps all 330 Animating Real-Time Game Characters settings and files loaded until you return, even if you save your 3ds max scene and exit the program. The next time you load that file, you 'll find that the data in Mo- tion Flow are still there. Now let's do what you came here to do: rotate the orientation of the data to face forward. Go over to the Motion Flow Script rollout menu and enter 200 in the Start Rotation field (Figure 8.53). FIGURE 8.53 Entering 200 in the Start Rotation field rotates the character 200 degrees along the Z-axis. This rotates the orientation along one axis—the Z-axis. The character is now facing front. Scrub the Time Slider to make sure the re-orientation is correct, and then save the altered BIP file by clicking on Save Segment. Click on the Active Time Segment button to change the Start and End frame. Then, since you're only interested in the part of the animation where the character falls down, enter a value of 110 for Start Frame. Call the new animation Deathanim.bip (Figure 8.54). Quit out of Motion Flow mode by clicking on the Motion Flow mode button again, and load the newly rotated Shotdrop.bip into your Biped by clicking on the Load File button in the General rollout menu (Fig- ure 8.55). There are many more reasons to use the Motion Flow Editor and there is much more functionality to it than illustrated here. It will be covered more fully in the next chapter when you learn how to combine a series of animations to create an animation set. For now, it's enough to know how to use Motion Flow Editor to do a simple rotation re-orientation. [...]... the file reflected the segment that was saved in the Motion Flow Editor Open Track View and 332 Animating Real -Time Game Characters slide all the keyframes over so the animation begins at Frame 0 (Figure 8.56) FIGURE8.56 Saving the animation in the Motion Flow Editor requires a little key-tweaking Change your Time Configuration to end at Frame 100, and add a Layer using the Create Layer button in the... 344 Animating Real -Time Game Characters FIGURE 8.74 Betty rocks back with the force of the gun going off Moving the Recoil Closer With the shot having been fired, you can now put to use the animation you loaded into the Biped earlier However, first you need to select the feet and snapshot them for reference for when you move the recoil animation closer to the firing animation (both in terms of time. .. Chapter 8 Using Motion Capture FIGURE 8.60 Rotate the arm to make the fall seem less anticipated FIGURE 8.61 Untucking the leg and making it kick out improves the effect of the fall 335 336 Animating Real -Time Game Characters FIGURE 8.62 View the difference the Layer makes by clicking on the Previous Layer button Click the Next Layer button (the arrow pointing upward) to return to the animation layer,... requiring some sort of impact REPURPOSING A MOCAP FILE Motion capture data often come in handy for reasons other than those for which they were intended Combined with keyframe animation, even 338 Animating Real -Time Game Characters FIGURE8.65 You can almost hear the jarring impact of the character hitting the floor the most unlikely data can be turned into something useful and interesting To illustrate this... tracks for the COM, choose Body Rotate Also, choose Body Rotate before selecting all Biped objects Otherwise, selecting a track manually will cause all objects to be unselected (Figure 8.68) 340 Animating Real -Time Game Characters FIGURE 8.68 If there has to be just one track for the COM, choose Body Rotate Loading the Getting-Hit Animation Click on the Load File button in the General rollout menu, go to... positioning a character's COM, but nothing happens when you enter a value into the Move Type-In Transform menu, click either the Body Vertical or the Body Horizontal button and try again 342 Animating Real -Time Game Characters FIGURE 8.71 Using the coordinates you noted earlier, move Betty back into position Now, bring up Track View and copy the column of keys at Frame 0 to Frames 1,9, 10, and 30 This... 8.57 8 Using Motion Capture Rotate the torso back to emphasize the motion of being hit by something FIGURE 8.58 Twist the Spine objects to begin lessening the anticipation of the fall 333 334 Animating Real -Time Game Characters character is facing his attacker with some sort of disbelieving look Rotate the head about 35 degrees at Frame 45 to give a lull to the head as the character falls back, making... FIGURE 8.75 Snapshot the feet to use as a reference for the recoil positioning FIGURE 8.76 Move the "recoil" keys closer to the point where Betty fires the gun 8 Using Motion Capture 345 346 Animating Real -Time Game Characters button on, and select COM (Betty ) Make sure the Select and Move button is the active transform button, and apply Set Keys for the COM at Frames 35 and 100 You want the motion... but ignore Frames 91 to 94 and 96 to 99 for the same reason Go through the animation in the Right viewport as well, moving the COM at each frame where the foot doesn't line up, taking into 348 Animating Real -Time Game Characters FIGURE 8.80 Move the COM over at Frame 90 until the right foot matches upas well consideration the bouncing motion from Frame 45 to 55 (just move the COM along the Y-axis) (Figure... Frame 45 and rotate the head down so it faces forward The head will always beat the body to recovery like this because the eyes are always looking forward or at the target Scrub through the 350 Animating Real -Time Game Characters FIGURE 8.82 Rotate the head, spine, and arms so Betty is facing forward more FIGURE 8.83 Pose the upper body so Betty starts to regain her balance for another shot . off, it keeps all 330 Animating Real -Time Game Characters settings and files loaded until you return, even if you save your 3ds max scene and exit the program. The next time you load that file,. Y-axis using the View coordinate system. Of course, the best way to move it is to 324 Animating Real -Time Game Characters FIGURE 8.42 With the adjustments complete, there's only one . run ani- mation. Load the Shotdrop.bip file you saved earlier after converting it 326 Animating Real -Time Game Characters FIGURE8.45 Use the Motion Capture Conversion Parameters menu to

Ngày đăng: 01/07/2014, 17:20

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan