### CAP 203 - Computer Animation III

#### Chapter 7: Animation

##### Objectives:

This lesson covers material from chapter 7 of the text. Objectives important to this lesson:

1. Creating and animating gears
2. Animation paths
3. LookAt Constraint
4. Other exercises
##### Concepts:

In the text, the author provides one method for creating gears. On the DVD, she provides another. We will use her video lesson to create a set of gears, and we will refer to her mathematical notes in the text as well. Interlocking parts in a scene, such as gears, should be designed with some math in mind, so the animation looks reasonable:

• The author tells us to make gears with a number of teeth that will divide evenly into 360. This may not be possible in some assignments, but if you are creating the scene from your imagination, you can easily set this limit on your models.
• The cylinder method from the video lesson is both quick and easy. Use it for this exercise.

Before you begin these exercises, copy the Maps folder and the Scenes folder from the DVD's CD_FILES\ANIMATION folder to your data drive. You may want to copy the Video folder to your data drive as well, to make it easier to view the video for the first exercise.

As we go from one chapter to another, you will find it easier if you copy that chapter's scene files to one working Scenes folder, and that chapter's map files to one working Maps folder.

Gears Exercise

This exercise is on pages 138 and 139, but you should follow the directions in the video on the DVD, with some additions from the text at the end.

1. In a new scene, make a cylinder that will become a gear.
2. On the Modify panel, set the sides to 12, the cap segments to 2 (she says 1 in the video, but she means 2), and the height segments to 1.
3. In the video, she seems to add an Edit Poly modifier. Look closely, and you will see it is actually something different. She right clicked the object name in the Modify panel, and a context menu appeared that let her choose to convert to an Editable Poly. This has the same result as converting to an Editable Poly with the quad menu. Try her method to make this conversion.
4. Note her technique of selecting all the edges around the cylinder with a marquee selection. Use her technique, but make sure you have turned off Ignore Backfacing or this will not work.
5. Switch to Polygon subobject mode, and use the exact same marquee selection to select all the polygons on the circumference of the cylinder. Note: 3DS Max will remember both selection sets.
6. Click the Bevel Settings button. In the Bevel Polygons dialog box, click By Polygon, and play with the settings: Height sets the height of each gear tooth, Outline Amount sets the size of the end of each tooth. A small negative value may be useful, but a large value, negative or positive, will cause the edges to overlap, distorting the figure.

Don't make the Outline amount so small that the teeth become like knife blades. Do make the teeth a little taller than you might think. Maybe a lot taller, since the teeth have to engage the teeth of another gear. You can scale the entire gear shortly.

7. Click the Edge subobject button. The edges you selected before are still selected. That's good, since it would be hard to select them now. Click the Chamfer Settings button, and increase the Chamfer Amount until you have a substantial gap between each gear tooth. Note the this will decrease the effective height of each tooth. If you did not make them tall enough, undo a couple of times, make the bevels taller, then repeat this step.
8. You can follow her instructions to select Vertex subobject mode and remove the inner cap segment.
9. You may be able to select the Edge subobject mode, select both edges of the hub of the gear, and click the Bridge button. This will probably be easier (and more likely to work) if you are in Border mode instead, because your chamfer operation probably led to many edges instead of two. Use whichever mode leads to a good result, healing the wound on the model.
10. Repeat the entire process to make another gear with 15 teeth.
11. Her gear teeth do not actually engage very well. You may want to scale the polygons on the ends of the teeth of each gear to make it look like they engage properly.
12. Follow her instructions to place the gears in the scene, and to set a keyframe for each gear rotated one tooth's worth at frame 10. One tooth's worth? Use the inherent math. How many degrees does each tooth represent if you have 12 teeth on a circle? How many for 15 teeth?
13. Follow her instructions to use the Track View-Curve Editor, to set a relative repeat for one of the gears. Note that this will not place more keyframes on the timeline, but it will cause repetitions of the rotation. Repeat this for the other gear. Sweep the time indicator across the timeline to check the magic.
14. See the instruction in step 10 in the text to correct the fact that the animation is not smooth. It will look much better with linear transitions.
15. Save your file. Render an animation of the gears rotating, and show it to me.

Path Exercise

This exercise is on pages 140 and 141.

1. Open the PathStart.max file. When you do, you will probably be warned that some of the texture images are not found. Note what files are not found, and browse to each of them to add the path to them before working on the scene.
2. In step 1, the author indicates she wants you to draw a curving path for the camera. (The camera is already in the scene). To draw this spline, select the Create panel, the Shapes tab, Splines (on the dropdown list), and click the Arc button. She implied all of this with the word "Arc" in her instruction. Do this a few times until you are comfortable with the path.
3. Click the Modify panel before selecting the camera as instructed in step 2. Follow the instruction to select Animation, Constraints, Path Constraint. It will be a little hard to click the arc you drew, but the mouse pointer changes when you are over it, so it is possible to do just what the text says.
4. Scrub the time slider as instructed. Note that the scene already knows to uniformly move the camera for the length of time on the timeline.
5. Convert the arc to an Editable Spline, and select Vertex subobject mode. You will see new vertices to adjust the curve. Make sure to read the note on page 141 about converting the vertices to other vertex types. Bezier Corners would be good for customizing the path. Use this technique, render the Camera01 view to a movie, and show it to me.

Constraint Exercise

This exercise is on pages 142 and 143.

1. You will need this knowledge in the next chapter. Open the LookAtStart.max file. The dog is already in the scene, and has lots of parts. Open the Select from Scene/Select by Name dialog box, and take a quick survey of what the author has already made for you.
2. Follow the instructions in the text to create a Dummy object. Its size is not important. It may help to place it directly in front of the dog. On the other hand, placing the dummy object directly behind the dog may be a better position. If one location gives you undesirable results in the steps below, try the other.
3. Select one of the eyes of the dog as instructed. Link its behavior to the dummy object with the Animation, Constraints, LookAt Constraint command. This will bring up the rollout shown on page 142.
4. The text is correct: you will probably have to switch the LookAt Axis from X to Y. Click each of the three axis buttons to see the effect it has on the the dog's eye, then make sure you select the right one.
5. Set up a LookAt Constraint for the other eye, then move the dummy object to enjoy the effect.
6. Save your work and show it to me in class.

Pick Exercises

1. Pick two more exercises from the chapter.
2. Explore them in class to find what works and what does not. Particularly, find what you need to do that the author did not tell you. This author assumes you know something about 3DS Max. This is your third term with it, so she should be right.
3. Write up your findings about those exercises, and be ready to discuss them in class. Hand in your write up for credit.