### CAP 202 - Computer Animation II

#### Lesson 16 - Mapping Coordinates

##### Objectives:

This lesson discusses using 2D maps with 3D objects. Objectives important to this lesson:

1. UVW maps
2. UVW mapping coordinates
3. UVW mapping types
4. Using the UVW Map modifier
5. Using the Unwrap UVW Map modifier
6. Using Render to Texture
##### Concepts:

The text does not define what a UVW map is. This is not unusual, our text for CAP 211 does not appear to define it either. For a more informative discussion of the subject, follow this link to a tutorial on the UVW Unwrap modifier. For those who don't want to follow the link, I will do what I can here.

Maps are colors, patterns, or other coverings that we put on the surfaces of objects. In the last lesson we looked at maps that were applied to a drum and to stone blocks. In this lesson, we will look at tools to use the UVW coordinate system on maps.

In general, U, V, and W are just the three letters that come before X, Y, and Z in the English alphabet (and others). So what? Well, the letters correspond to an artificial coordinate set. If X, Y, and Z are the Cartesian coordinates of a 3D object, U, V, and W are the coordinates we would use to measure the surface of that object if we peeled the surface off and laid it out flat. As you might imagine, a flattened pattern for a complex object will have a very unusual appearance. As such, we will use some special tools in 3DS Max to manipulate maps for 3D objects.

3DS Max uses the UVW Map modifier to apply maps to objects more precisely. The text lists several map types that apply to classic object shapes:

• planar - for flat surfaces
• cylindrical - for cylinders, with or without flat ends. If the cylinder has flat ends, we can use the Cap option to apply a planar map to the ends.
• spherical - meant for spheres (ball-shaped objects). Note the limits stated in the text: the edges of a map will form a seam on one side of the sphere, and at the poles (points where the top edge meets itself, and where the bottom edge meets itself)
• box - a classic six-sided figure, that may or may not be a cube
##### Exercise Notes and Questions

Work through the exercises and turn in your answers to all questions below as part of the homework for this assignment.

Before we begin, let's remember two words you should know, but most people misunderstand. Defuse means to make harmless, as in to defuse a bomb. Diffuse means to spread out, as in to use soft, diffuse lighting instead of harsh, direct lighting. In these exercises, and others, a diffuse map means the map that is spread over the surface of an object.

Exercise 1: The only odd part of this exercise is steps 10 and 11. You will find it easiest to set the width and height values if you type them in. instead of using the spinners.
Question 1: After you complete step 14, try this. What happens if you set the the height and width of the map to 12?

Exercise 2: In the exercises for this scene, remember that you can select any object from the Select Objects dialog.
Question 2: What is the keyboard command to open the Select Objects dialog?
As I did this exercise, I could not do step 5. The Fit button was grayed out on my 3DS Max 2009 implementation. This did not affect the rest of the exercise.
Question 3: In step 9, you are told to select both Fuel Boxes. Fuel Box 1 is already selected. What is a quick way to select the second box as well?

Exercise 3: In this exercise, you continue applying mappings, this time to a sphere.
Question 4: Step 11 is concerned with rotating the sphere to hide seams in the map. I did not see any seams. Did you?

The text turns to the Unwrap UVW modifier, which presents a 2D view of the surfaces of an object. Some theory about creating a custom map is discussed. The text advises us that we don't want to stretch or warp the map. We want, instead, to make a map that fits the polygons of the object it is for. In the next exercise you will unwrap a surface, move polygons on a map (changing what part of the map is applied to them), and size them to fit the map better.

Exercise 4: This exercise shows you something about the Unwrap UVW modifier.
Select the required faces of the object carefully. In step 11, you will want to pan as well as zoom to get the view you need. It should look like the image on the right when you complete step 13.
Question 5: At the end of step 13, you are working in the Front viewport. Glance at the Camera01 viewport. What faces of the object have you not selected?

At step 16, my window did not look like the picture in the text. To get it closer to that state, wait until you get to step 23. You can't do step 23, can you? Fix the problem like this:

1. Zoom out in the Editor, then move/drag the selected faces down the screen. You want the editor to look something like the image on the right.
2. Once the faces you are moving are clear of the wheel-shaped structure, you will be able to select the "upper cluster" as instructed in step 23. (Watch the colors change in the Camera01 viewport as you move selected clusters throughout the exercise.)
3. Continue with the rest of the steps in the exercise, and save incrementally when you are done.

The text continues with a lesson on textures. We learn that texture baking is saving a map that includes texture and lighting features from a particular scene. Think of it as a way of saving the effect of several maps and conditions in a new map. Use the Render to Texture command to make a map like this.

Render to Texture works on objects that have an Unwrap UVW modifier, and on objects for which you use Render to Texture's automatic unwrap feature. The text warns that the automatic unwrap feature may not unwrap the clusters in a logical way, making it harder to use a map. The text also warns that Render to Texture will not work if there are overlapping clusters. (In the cluster exercise above, recall that the clusters shown in red above were overlapping the ones shown in blue.)

The text leads into the next exercise by introducing a normal map. The idea is to have a map with lots of detail on it applied to an object with fewer polygons than were used to create the map. This approach gives the appearance of an object with a lot of polygons to an object with fewer polygons. Such an object renders faster than an object with more polygons.

Exercise 5: Open the file as instructed. It gives you a pre-made object with lots of polygons to use as a source for a normal map, and a low poly object to apply the map to.
Question 6: The text tells us we need to use projection mapping to make a normal map. What do you turn on in step 5 to make it possible?
Question 7: In step 5, what do you do to make the cage fit the high poly tire?
Continue with the steps in the exercise, and save incrementally when you are done.