Other Animation Skills Graphics Lab. Korea Univ. Change the View Port Configuration • Click right on “Perspective” in the low er right viewport. • Select “Configure” and “Layout”. • Choose the fourth layout from the top left. • Open “Track View” and adjust the new window to expose most of the lower viewport. Create a Box • Use the “Create” button on the Command Menu to make a box of L=50, W=100, H=50. • Click left then right on “Select and Move” on the main toolbar, to bring up the “Move Transform Type In” Dialog box. • Enter zeros for the absolute world coordinates of x, y and z in the dialog box so that the box will be centered on the origin. • Open the “Objects”, “BOX01” and “Transform” nodes in track view. Make Controllers Visible • Click left on “Filters” on the left side of the track view toolbar. • Check the box labeled “Controller Types”. • Now Max shows you the controllers for position, rotation and scale in track view. The controller for each track is indicated next to the track name. Creation of Keys in Track View • Click on “Edit Keys” and “Add Keys”. • Put keys at frames 0, 25, 50 and 100. • As you place each key, you may adjust the frame number by typing in the slot at the bottom of the track view window Edit Keys Create Keys Frame Type In Editing a Key Value • Click right on the key at frame 50. • Enter a value of 100 for X in the dialog box. • Put the dialog box away. Function Curves • Click on “Function Curves” on the top of tr ack view. • Click on “Zoom Value Extents” at the lower right of track view, to center the curves. • Red is X, Green is Y and Blue is Z. • Notice that the X curve rises to meet the ke y value at frame 50. • Notice that the X curve undershoots at first and overshoots later on. Overshoot Undershoot What went wrong? • Max is using a cubic Bezier spline to interpolate our four position keys. • Max assumes we want the curve to be smooth, i.e., continuous first derivative. • The box’s motion in the X direction cannot start and stop instantly. • Click on “Play Animation” at the lower right of the Max window to see the effect. Fixing the Problem • Click right on the key at frame 25 to open a dialog box. • Click on the “In” button and select the last choice. • Adjust the tangent handle to flatten out the curve. • Use the dialog box left arrow to go back to the key at frame 0, and do the same thing using the “Out” button. • Now play the animation. The curve has been flattened out from frames 0 to 25 by adjusting the tangent handles at those two frames. Unlocking Tangent Handles • Select the key at frame 25 and open the key’s dialog box. • Click left on “Advanced” set the X derivative values at this key to zero, if they are not quite exactly zero. • Try unlocking the “In” and “Out” tangent handles for the X curve. • Move the “Out” handle and observe that the “In” handle remains fixed. • Use the “Undo” button on the top left of the main toolbar to relock the tangent handles and flatten the curve. “In” Derivative Tangent Handle Locks Type In “Out” Derivative Type In Making the Box Rest • Create a new key at frame 75 and use the key dialog box to set its X value to 100, the same as the key at frame 50. • Notice that the box does not remain at rest between frames 50 and 75. • Use the “In” button on the key at frame 75 to select the “Piecewise Constant” option. • Notice that the box now stays fixed from frame 50 to frame 75. • Notice that Max adjusted the slope into frame 50 and out of frame 75 to make the motion smooth. • Try changing this using tangent handles, and them use “Undo” to make the motion smooth again. The “Piecewise Constant” option on the “In” button has made the curve flat from frames 50 to 75, and smooth at these two points. Ease In and Ease Out • Play the animation. • Notice that the box stops suddenly at the end. • This occurs because the slope of the X function curve is not zero at frame 100. • Open the key dialog box for the key at frame 100, and choose the “Ease In” (second to last) option on the “In” button. • This forces the slope to be zero at frame 100. The “Ease In” option on the “In” button has made the curve flatten out at frame 100. The “Animate” Button • Move the “Time Slider” bar to frame 35. • Click right on the big “Animate” button. • Click left on “Select and Move” on the Main Toolbar. • Restrict to move along the X axis. • Move the box a little to the right. Notice that a new key was created at frame 35. • Move the Time Slider to frame 100. • Move the box a little to the right once again. Notice that the old key at frame 100 has moved. • Turn off the Animate button. Move the box once again. Notice that the whole graph moves. • Undo (only) the last move operation. Track view after adding a key at frame 35 and changing the key at frame 100. Active Time Segment and Out of Range Function Curves • Click right on the “Play Animation” button to open the “Time Configuration” dialog box. • Set the length of the “Active Time Segment” to 400. • Play the animation and notice that the box does nothing after frame 100. • Click on “Parameter Curve Out of Range Types” on the Track View menu bar. • Select “Relative Repeat” (out of range above). • Play the animation and notice that the box repeats its motion, offset a bit to the right on each cycle. Relative Repeat Above Click left on “Zoom Horizontal Extents” to see the function curves over the entire Active Time Segment. TCB Position Controller • Reinitialize Max using the “File” and “Reset” menu items. • Select the “Top” viewport in the upper left corner • Use the “Min/Max Toggle” button at the lower right corner of the screen to expand the size of the Top viewport. • Use the “Time Configuration” button to set the active time segment to (0…120). TCB Position Controller • Create a sphere at (x,y)=(-100,100), using the “Move Transform Type In” dialog box. • Open track view and select the sphere’s position track. • Make controllers visible using the “Filters” button. • Use the “Assign Controllers” button to assign the “TCB Position” controller to the sphere’s position track. • Use the “Animate” button to create position keys at 0, 20, 40, 60, 80, 100, 120, at positions (-100,100), (100,100), (100,-100), (-100,-100), (-100,100), (100,100), (100,-100). • Use the “Time Configuration” button to set the active time segment to (20…100). Tension, Continuity and Bias • Tension determines whether the sphere makes a sharp turn (at slow speed) or a wide turn (at high speed). • Continuity determines whether the tangent to the sphere’s path is continuous or makes sudden jumps (clockwise or counter clockwise). • Bias determines whether the sphere swings outside the square before of after the turn. Tension, Continuity and Bias • Select any sphere position key and click right to bring up the position key dialog box. • Use the dialog box to systematically vary tension (T), continuity (C) and bias (B) of all seven keys in unison. • Play the animation. • Select the sphere and click on the “Motion” tab of the Command Panel to see the trajectory. • Use the “Snapshot” facility under “Tools” on the Max Main Menu. T = 25 C = 25 B = 25 T = 25 C = 25 B = 25 T = 25 C = 25 B = 25 T = 25 C = 25 B=5 T = 25 C = 25 B=5 T = 25 C = 25 B=5 T = 25 C = 25 B = 45 T = 25 C = 25 B = 45 T = 25 C = 25 B = 45 T=5 C = 25 B = 25 T=5 C = 25 B = 25 T=5 C = 25 B = 25 T = 45 C = 25 B = 25 T = 45 C = 25 B = 25 T = 45 C = 25 B = 25 T = 25 C=5 B = 25 T = 25 C=5 B = 25 T = 25 C=5 B = 25 T = 25 C = 45 B = 25 T = 25 C = 45 B = 25 T = 25 C = 45 B = 25 Spline Conversion • Reset Max and configure viewports to show Front and Top views (as done previously.) • Open track view and place it above the Top viewport. • Use the “Filters” menu item in track view to show “Controller Types”. • Create a sphere in the lower viewport and put it anywhere. • Select the sphere’s position track and use the “Assign Controllers” to assign the track a “Position X, Y, Z” controller. Spline Conversion (Cont’d) • Use the “Create” tab and “Shape” button on the Command Panel to make a horizontal line in the bottom part of the lower viewport. • Use the “Modify” tab and “SubObject” button on the Command Panel, along with the “Move Transform Type In” dialog box to make the two end vertices of the line have the same Z value. • Leave SubObject model and select the sphere. Converting the Line into a Trajectory • Click left on the “Motion” tab on the Command Panel and press the “Trajectories” button. • Click left on the “Convert From” button and then click left on the line object in the lower viewport. • You have converted the line into a trajectory for the sphere. • Go to track view, select the X position track, and turn on the “Function Curves” button. • Notice that X is a linear function of time. • Notice that the tick marks on the trajectory are equally spaced. • Play the animation. The sphere should move at a uniform velocity. Edit Keys on the Trajectory • In track view, select the sphere’s “Position” track. • Use the “Assign Controller” button to assign a “Bezier Position” controller to the track. • Notice that keys have appeared on the trajectory. • Press the “SubObject” button on the Motion Panel to get access to the trajectory keys. • Click “Select and Move” and “Restrict to X” on the Main Toolbar. • Select and move trajectory keys leftward in order to create an acceleration. • Play the animation and observe the acceleration. Path Animation • Reset Max and set up the same viewport configuration as before. • Create a small cone object in the upper (Top) viewport. • Draw an ellipse object in the lower (front) viewport. • Open track view, show controllers, and assign a “Path” controller to the position track of the cone. • Expand the position track to see three new tracks beneath. Path Animation • Select the cone and go to the Motion tab on the Command Panel. • Press the “Parameters” button and the “Pick Path” button. Then click left on the ellipse. • Move the Time Slider Bar to see that that cone moves along the ellipse. Editing the Path • Select the ellipse. • Go to the Modify tab on the Command Panel. • Click right on the Edit Stack icon and select “Convert to Editable Spline”. • Press the SubObject button. • Select and move ellipse vertices. • Observe that that the cone follows the modified ellipse. • Use the Undo button to restore the ellipse to its original shape. Making the Cone Rotate Around the Elliptical Path • Select the cone and go to the Motion tab on the Command Panel. • Check “Follow”, “Allow Upside Down” , and “Z” axis on “Path Options”. • Observe that the cone rotates as it moves around the ellipse. • The major axis of the cone is always tangent to the ellipse. Adjusting the Rate of Motion Along a Path • Play the animation and notice that the cone slows down near the apexes of the ellipse. • Check the “Constant Velocity” box plan the animation again. Now the cone moves at a constant speed. • Go to Track View and edit the “Percent” track under the cone’s Position track. • Add a key at frame 50, and adjust the tangent handles at frames 0, 50 and 100 so that the cone will slow down at the apexes of the ellipse.