3ds Max 2012 Bible - Kelly L. Murdock [398]
The curve is flat, so the train stops at the station.
7. To adjust the actual position where the train stops, choose the Move Keys Vertical button from the Move Keys flyout, select both keys, and move them up or down until the train's position at the station is correct.
Because the default in and out tangent types cause the curve to flatten out at the keys, the train slows as it reaches the station and then starts out slow and picks up speed as it leaves the station. Anyone who has ever ridden on a train knows that stopping and starting are not always smooth operations. Next, you add a few more keys to make the train shudder to a stop and lurch as it starts out again.
8. Click the Insert Keys button (or right-click and choose Insert Keys), and insert keys somewhere around frames 105, 109, 113, 142, and 150. Use Zoom Region to zoom in on the keys where the train pulls into the station to stop.
9. Change the Move Keys Vertical button back to Move Keys by selecting it from the flyout, and move the keys slightly up or down to send the train backward and forward along the path.
10. As you can see, a little movement goes a long way, so the keys need only to be offset a very small amount. Use the Zoom Values button from the Zoom flyout and the Pan button to help in making the small changes to the animation.
11. Repeat for the keys where the train leaves the station.
The train also needs to slow down to look at one of the famous buildings in “Primitive Town,” the Tubular “building” on the far side of the track.
12. Add a couple more keys somewhere around frames 18 and 50. Lower the second of the new keys until the curve is shallower but not horizontal. Again, adjust the train's position on the track (Percent along the path) by raising or lowering the two new keys.
13. Adjust the Out tangent handle of the very first key and the In tangent handle of the very last key to produce a smooth looping animation.
Figure 37.11 shows the final curve after you've completed the editing, and Figure 37.12 shows the monorail along its path.
FIGURE 37.11
The finished Percent curve for the train's position along the path
Drawing curves
If you know what the curve you want is supposed to look like, you can actually draw it in the Key pane with the Draw Curves button enabled. This mode adds a key for every change in the curve. You may want to use the Reduce Keys optimization after drawing a curve.
Tip
If you make a mistake, you can just draw over the top of the existing curve to make corrections. •
Figure 37.13 shows a curve that was created with the Draw Curves feature.
FIGURE 37.12
The monorail and “Primitive Town”
FIGURE 37.13
Drawing curves results in numerous keys.
Reducing keys
The Keys⇒Reduce Keys menu command enables you to optimize the number of keys used in an animation. Certain IK (inverse kinematics) methods and the Dynamics utility calculate keys for every frame in the scene, which can increase your file size greatly. By optimizing with the Reduce Keys command, you can reduce the file size and complexity of your animations.
Using the Reduce Keys command opens the Reduce Keys dialog box. The threshold value determines how close to the actual position the solution must be to eliminate the key. Figure 37.14 shows the same curve created with the Draw Curves feature after it has been optimized with a Threshold value of 0.5 using the Reduce Keys feature.
FIGURE 37.14
The Reduce Keys feature optimizes the curve by reducing keys.
Working with tangents
Function curves for the Bézier controller have tangents associated with every key. To view and edit these tangents, select the Display⇒All Tangents menu command. These tangents are lines that extend from the key point with a handle on each end. By moving these handles, you can alter the curvature of the curve around the key.
You can select the type of tangent from the Key Tangents toolbar. These can be different for the In and Out portion of the curve. You can also select