animation: a moving experience - augi · you drag the frame slider, the dummy follows the curvature...

14
Walt Disney World Swan and Dolphin Resort Orlando, Florida 11/30/2005 - 3:00 pm - 4:30 pm Room:N. Hemispheres (Salon A4) (Dolphin) Animation: A Moving Experience If you'd like to advance your knowledge of fundamental animation beyond basic AutoKey techniques, then this class is for you. You'll learn how to use various controllers and constraints to efficiently manage the animation of both cameras and objects in your scene. You'll also investigate the power of Curve Editor and Dope Sheet as visual editing tools for fine-tuning your animations. Attendees must know the 3ds Max or Autodesk VIZ interface and have a working knowledge of fundamental keyframe animation. DV34-1 About the Speaker: Ted Boardman - tbdesign Ted Boardman travels the world training Autodesk VIZ and 3ds Max productivity classes. He has published 7 books on these subjects. Ted also writes a monthly column at www.cgarchitect.com. He is an award-winning AU speaker. [email protected]

Upload: others

Post on 15-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Walt Disney World Swan and Dolphin ResortOrlando, Florida

11/30/2005 - 3:00 pm - 4:30 pm Room:N. Hemispheres (Salon A4) (Dolphin)

Animation: A Moving Experience

If you'd like to advance your knowledge of fundamental animation beyond basic AutoKey techniques, then this class is for you. You'll learn how to use various controllers and constraints to efficiently manage the animation of both cameras and objects in your scene. You'll also investigate the power of Curve Editor and Dope Sheet as visual editing tools for fine-tuning your animations. Attendees must know the 3ds Max or Autodesk VIZ interface and have a working knowledge of fundamental keyframe animation.

DV34-1

About the Speaker:

Ted Boardman - tbdesign

Ted Boardman travels the world training Autodesk VIZ and 3ds Max productivity classes. He has published 7 books on these subjects. Ted also writes a monthly column at www.cgarchitect.com. He is an award-winning AU [email protected]

Page 2: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return
Page 3: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

The basic scene you'll be working with in this exercise is a landscape with a road winding over the hills. The scene also contains a truck and a crane and your task will be to animate the truck moving down the road, stopping at the crane, and driving off over the horizon. It is important to understand that all animation is managed by Controllers/Constraints that you can change and edit for the specific animation control you need. Animation Constraints are very similar to Controllers, except that they require outside information, such as a line or another object to determine the animation. You will learn to use a Path constraint to move the truck down the center of the road and then you will apply Ease Curves to explicitly control the velocity of the truck. While the truck is stopped beneath the crane you'll animate an object being removed from the bed of the truck and then animate the crane swinging it to one side. In this exercise you will learn about Hierarchical Linking and the use of Dummy Helper objects. Using the Link controller, you will learn to transfer hierarchical linking from one object to another. Path Constraint. As mentioned in the introduction all aspects of the animation of objects are managed by Controllers and Constraints. These controllers and constraints can be assigned and adjusted in the Motion panel for transform controllers and constraints, and in the Track View dialogs for all types of controllers and constraints. Most objects that you create in, or import into, 3ds max or VIZ have the Position XYZ controller assigned by default. This controller allows you to freely move objects within the scene and to set up animation using Auto Key or Set Key by repositioning objects at various times and letting the software create the intermediate steps between the keyframes. In this exercise you will learn to change the controller of a Dummy object so that the Dummy follows a path defined by the centerline of the road. It's actually the truck in the scene that we want to have travel down the road but it will make most sense to allow a Dummy object to control the forward motion of the truck, allowing you to create secondary position changes independent of the forward motion. Exercise 1: Animating a Dummy object with Path Constraint Open the file called Ease_Curve01.max. Save the file in your project folder with the new name Ease_Curve02.max. This scene contains a hilly landscape created with a Patch Grid. There is also a 2D line called animation_path that has been draped over the hills using the Object Space PatchDeform modifier. The 2D line has been used as a loft path for the roadway and will be used as the animation path as well. The scene also contains a truck with an object in the back, a crane, and a Dummy object. In the Top viewport, select Truck_Dummy01 that is in the middle of the road near the truck. This is the object that will control all motion along the path. See Figure 1.

Figure 1: The dummy object in the scene will act as a parent object to control motion along the path at the center of the road.

Page 4: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

The default controller on the dummy object is a Position XYZ controller, which allows you to freely move the object anywhere in space. You replaced this controller with a Path constraint and choose the 2D line as the constraint along which the dummy can move. In the Motion panel, Assign Controller rollout, highlight Position: Position XYZ. Click the Assign Controller button and double-click Path Constraint in the Assign Position Controller list. See Figure 2. If you try to move the dummy object in the scene now you can't do it because you've change the controller and you haven't told it which path to use.

Figure 2: You can change the transformation controllers or constraints of objects in Motion panel. Here you will use Path Constraint to control the motion of the dummy object. In the Motion panel, Path Parameters rollout, click the Add Path button and, in the Top viewport, click in the center of the road. You will see animation_path and the number 50 in the Target, Weight list to indicate that the line is being used now to animate the dummy object. The dummy object has also repositioned itself to the start of the line. Scrub the Frame slider, and you will see the dummy travel along the path in the viewports. As you scrub the Frame Slider, you'll notice that the dummy retains its original orientation as it travels down the road. In the Motion panel, Path Parameters rollout, Path Options area, check the Follow option. Now as you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return the Frame Slider to frame 0. Pan in the Top viewport so you can see both the truck and the dummy object. Select the truck, and, in the main toolbar, click the Align button. In the Top viewport, click on the dummy object to call the Align Selection dialog. Choose the Pivot Point radio button in both columns, then check X Position, Y Position, Z Position to match the position of the truck's pivot point to the pivot point of the dummy. In the Align Selection dialog, Align Orientation (Local) area, check the X Axis option to align the truck so it is pointing straight down the road. See Figure 3. Click the OK button.

Figure 3: Use the Align tool to align the pivot point of the truck to the pivot point of the dummy object and to align the X axis orientation of the truck with that of the dummy. The truck points straight down the road. If you scrub the Frame Slider, the dummy moves as before, but the truck just sits there. You have only aligned the truck with the dummy and it has no relationship at this point to the dummy. You will use Hierarchical Linking to link the truck to the dummy. The truck becomes a child of the parent dummy: "where a parent goes the child must go with it" is the simple rule to hierarchical linking. In the main toolbar, click the

Page 5: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Select and Link button. In the Left viewport, click on the truck and dragged the cursor to the Truck_Dummy01 object. As you click and drag you will see the cursor change and a dotted white line, rubber banding from the cursor. See Figure 4. When the cursor changes as you move over the dummy object, release the mouse button, and you will see the dummy object briefly flash white to indicate the link has taken place. Scrub the Frame slider and the truck should move down the roadway following the curve as it changes.

Figure 4: You can hierarchically link one object to another to set up a parent-child relationship. The transformations of the parent are passed to the child object, but the child can have its own transformations. Save the file to your project folder. It has already been renamed Ease_Curve02.max. The Path Constraint is automatically generated to keys for the dummy object in the timeline. One key at frame zero positions the object at the start of the path and be are the key at the end of the animation positions the dummy 100% of the way along the path. 3ds max generates the intermediate keys, resulting in a constant velocity as the dummy travels along the path. Ease Curves. If you have worked a bit with the Auto Key or Set Key animation you may have found that it is sometimes a daunting task to stop and start moving the objects exactly when you want and to control the velocity of the moving object. While the default setting for Path constraint does set your object to constant velocity along the path, you are still usually faced with the task of stopping and starting or simply slowing the object where you want. In this exercise you will learn to use Ease Curves to control the movement of a truck along the roadway, make it stop beneath a crane, and then have it move away and over the hill. It is important to understand that Ease Curves to not create animation, but only allow adjustment of parameters that are already animated. Exercise 2: Applying an Ease Curve to Control Velocity. Open the file called Ease_Curve02.max if you closed it from the last exercise. Set the Frame Slider to frame 18 and you'll notice in the Top viewport that the tank in the truck is positioned at the end of the crane cable. You want the crane to take the tank from the truck and swing it to one side. The first task is to stop the truck in this position at around frame 15 and have it sit still until frame 25 before resuming motion and continuing on over the hill. In the Top viewport, select Truck-Dummy01. In the main toolbar, click Graph Editors and choose Track View-Curve Editor. The Curve Editor displays the percentage change of the dummy along the path in graphical form. As you remember from math classes, a straight line graph represents constant velocity change. See Figure 5.

Page 6: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 5: The Track View-Curve Editor displays the animation of the selected object as a graph. While it's possible to adjust the Percent curve in the editor, it makes more sense to apply an Ease Curve to superimpose any velocity changes over the base animation so that it may easily be removed if something goes wrong. In the pull-down menu of Curve Editor, click Curves and choose Apply-Ease Curve. You probably won't notice any change, however, there is now a plus sign to the left of Percent in the hierarchical list of the Curve Editor. Click the plus sign to expand the list to show Ease Curve. Highlight just Ease Curve in the list and you will see that the graph looks the same except for a new key in the middle of the line. As mentioned before, base animation has been copied into the Ease Curve. Select the key in the middle of the line and enter 25 in the right-hand numeric field at the bottom of the Ease Curve. See Figure 6. Activate Camera01 viewport and play the animation and you will see that now the truck pulls away slowly and gradually builds speed. Where the curve is flat the truck is stopped and the steeper the curve the faster the truck is going.

Figure 6: Move the key at frame 50 of the ease curve to 25% along the path by entering the value in the right-hand numeric field. To stop the truck beneath the crane you must add a key at frame 15 and move the existing key to frame 25 and adjust the curve so it is flat between the two keys. In the Curve Editor, click the Add Keys button and pick on the Ease Curve near frame 15. In the Curve Editor, click the Move Keys button to exit the Add Keys mode. Enter 15 in the left-hand numeric field and 18 in the right-hand numeric field, then set the Frame Slider to frame 15 to insure that truck has stopped at the crane. Select the key at frame 50 on the Ease Curve and enter 25 in the left-hand numeric field and enter 18 in the right-hand numeric field. Play the animation in Camera01 viewport and you'll see that the truck pauses beneath the crane, but has a slight backward motion before taking off. You'll also note that the curve slopes downward into the right slightly between the keys causing the backward motion. Exit you will change the tangency information on the out going side of the key at frame 15 and on the incoming side of the key at frame 25 to Linear tangency in order to stop the truck completely between the frames.

Page 7: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Right-click on the key at frame 25 and click and hold on the In: tangency button and choose the Linear button in the list. See Figure 7.

Figure 7: Set Linear tangency on the In: side of the key at frame 25 to flatten the curve to a straight line. Select and right-click on the key at frame 15 and set the Out: tangency to Linear in the same manner. This ensures that the curve between the two keys is a flat 18% of the way along the path. Play the animation back and you'll see that the truck stops dead at the crane. Stop the animation. Selecting and moving the keys to the left or right will cause the truck to stop earlier or later in time. Selecting and moving the keys up and down will cause the truck to stop farther from for closer to the beginning of the path. You now have explicit control of the velocity and instant feedback from the graphical interface. Close all windows and dialogs and save the file. Inverse Kinematics Inverse Kinematics is an animation process involving hierarchical linking where the end object controls the action. Take, for example, your arm; when animating it with Forward Kinematics you would have to keyframe first the upper arm, then keyframe the forearm, and finally keyframe the hand to create the animation. With Inverse Kinematics, you would simply need to animate the hand and the forearm and upper arm would know how to behave in the system. In Exercise 3 you will learn to set up the Inverse Kinematics to control telescoping doors, where you only need to animate one door in the system and the others behave according to parameters you give it. Note: You'll notice that when you open the exercise files the doors are clustered around the 0, 0, 0 World Coordinate. This is a very important step that will make Exercise 4 easier to set up. In Exercise 4 you will learn to use Wiring Parameters to set up the relationship between a crank and the End Effector controlling the main door. You will be able to open and close the door by rotating the crank. You'll then use hierarchical linking to link the doors and crank to a dummy object. The whole system may then be freely moved and rotated in space, because the IK system will respect the coordinate space defined by the dummy that is the Parent of the whole system. Exercise 3: Using Inverse Kinematics for a sliding door system

Page 8: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Open the file called Linking01.max and save it to your project folder with the name Linking02.max. The scene contains three doors and a crank. In this exercise you will link the doors together in a Parent/Child relationship and apply an IK Solver to control the sliding of each door. Select Door03 in the Top viewport and click the Select and Link button in the main toolbar. Click and drag from Door03 to Door02 and release the mouse button. Door02 will briefly flash white, and the two objects will be linked in a Parent/Child relationship. Use the Select and Link tool to link Door02 to Door01 in the same manner. Door01 is now the grandparent of all doors; where the parent goes, the children and grandchildren must go with it, but the children and grandchildren can be doing their own thing. Click Animation in the main menu, choose IK Solvers, and click HD Solver in the menu. In the Top viewport, select Door03, click Door03, then click Door01. You do not need to click on Door02 for this operation and you will see a rubber band attached to the pivot point of Door03 as you move the cursor. A system of Bones, will appear after you click Door01. See Figure 8.

Figure 8: After linking the doors hierarchically you can apply the HD Solver which is the only solver that allows you to control Sliding Joints in an animation system. In the Top viewport, select Door01, and in the Hierarchy panel, IK panel, Rotational Joints rollout, clear the Active checkbox for each rotation axis. See Figure 9. Repeat this step for Door02 and Door03. This is an important step when setting up IK systems to avoid unwanted rotations. You can always go back and activate the rotation axes later, if necessary.

Page 9: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 9: Clear the Active state for each rotational axis for each door to avoid unwanted rotations. In the Top viewport, select Door03. In the Hierarchy panel, Sliding Joints rollout, X Axis area, check both Active and Limited checkboxes and enter 4'9" in the To: numeric field. See Figure 10. Repeat the process for Door02. This restricts the movement of the doors from the current position to a maximum of 4'9" in the positive X axis of the World Coordinate System. Click the Select and Move button in the main toolbar and in the Perspective viewport, select Door03 and try to move it. Door03 and Door02 will only slide to the right a limited amount. See Figure 11. Right-click to cancel the move operation or click Undo to return the doors to their original position.

Page 10: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 11: Restricting the Sliding Joints of Door03 and Door02 and setting a limit of 4'9" creates a telescoping system of doors. What you are actually moving is the End Effector of the HD Solver. Save the file. It should already be named Linking02.max. The HD Solver created a system of Bones within your hierarchically linked doors that allowed you to set specific parameters for both the rotational and sliding behavior of the doors. This can be used to control any type of telescoping system from antennas to stadium roofs. Wire Parameters Wire Parameters will be used in this exercise to cause the rotation of the crank to control the movement of Door03. Wire Parameters can be applied to any object parameters that can be animated, for example the radius of a teapot might control the color of a box or the position of the max dummy object might control the rotation of the wheel. In the next exercise the rotation of the crank in the scene will control the sliding of the doors. Exercise 4: Using Wire Parameters to Control the Behavior of One Object with Another Open the file that you saved in the last exercise called Linking02.max. Save it with the name Linking03.max. In the Top viewport, a dummy helper object and use the Absolute Transform Type-in fields to center the dummy on 0, 0, 0 World Coordinate. See Figure 12.

Figure 12: Create a dummy object and center it on the 0, 0, 0 World Coordinate. In the Top viewport select the End Effector . In the Motion panel, IK Controller Parameters rollout, click the Link button in the End Effector Parent area and pick the dummy object in the Top viewport. See Figure 13. This will link the Bones End Effector to the dummy object. Then, in the Top viewport, select the crank and Door01 and use Select and Link to link them both to the large dummy. This large dummy will be used to reposition the whole system in space.

Page 11: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 13: The End Effector must be linked from the Motion panel, and not with the Select and Link tool. Select the End Effector in the Top viewport. Click Animation in the main menu, then choose Wire parameters, and Wire Parameters again in the drop-down menu. Select Transform, Position, X Position in the menus that appear. See Figure 14.

Figure 14: Use Wire Parameters to choose X Position for the End Effector. Move the cursor with a rubber band line and click the Crank object in the Top viewport. Choose Transform, Rotation, Y Rotation from the menus. See Figure 15.

Page 12: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 15: Choose the crank in the Top viewport and choose the Y Rotation parameter. The Parameter Wiring #1 dialog will appear. The Door03 is in the left pane and the Crank is in the right pane. Click the left pointing arrow button between the panes to set the control direction from the crank to the door. See Figure 16. The rotation of the crank will control the position of the door. Click the Connect button to complete the connection between the two parameters.

Figure 16: The direction of control is set with the three buttons between the panes. You want the rotation of the crank to control the position of the door. In the main toolbar, click the Select and Rotate tool. In the Perspective viewport, select the crank and rotate it about its y-axis. Rotating clockwise will move the door slowly to the right and rotating counterclockwise will bring it back. However, the action is rather slow and it's difficult to move the door very far. In the Parameter Wiring #1 dialog, edit the expression Y_Rotation to read Y_Rotation*10. See Figure 17. This applies a multiplier of 10 to the distance move with 1° of rotation. Click the Update button to update the wiring. Close the dialog.

Page 13: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return

Figure 17: You can edit the expression and click the Update button to change the behavior of the Wire Parameters. In the Top viewport, select the dummy object and move it and rotated so it is no longer oriented with the World Coordinate System axes. The other objects in the scene, i.e. the children, move and rotate with the dummy. In the Perspective viewport, select the crank. Set the Reference Coordinate System to Local and rotate the crank on its Y-axis. The telescoping doors behave as you would want them to. This is only possible because the Parent dummy determines the coordinate system used by the crank and doors. Summary Learning to use a hierarchical linking and dummy objects in conjunction with the IK system allows you to create flexible animated systems that are much easier to control than trying to animate each object individually. IK Solvers create a system of Bones in hierarchically linked objects that have both sliding and rotational parameters that can be limited in order that the animated system exhibits a particular behavior. Wire Parameters can be used to set up a mathematical relationship between two objects to control the behavior of most animatable parameters.

Page 14: Animation: A Moving Experience - AUGI · you drag the Frame Slider, the dummy follows the curvature of the path and keeps itself oriented perpendicular to the path as it curves. Return