CAP 201a - Computer Animation I

Lesson 4 - Chapter 7, Materials and Mapping (part 1)


This lesson introduces you to the Material Editor and several techniques for using it. Objectives important to this lesson:

  1. Materials and the Material Editor
  2. Mapping a pool ball
  3. More mapping

We will cover this chapter in two parts. This lesson will cover topics through page 332.

The chapter begins by discussing materials and mapping.

A material is like a coating that is applied to objects in a scene. You can think of it like paint or contact paper that can cover any object you want it to cover. A material can be a simple graphic image that defines a color, but it can be much more. A defined material can have several useful properties, like transparency, texture, and glossiness, which are discussed in the chapter.

Mapping is the activity of applying materials to objects, giving them a simulated detail that does not exist in their actual surface.

Your book uses the word texture without defining it. We might define it two ways:

  • the physical composition, appearance, and feel of a surface (real world)
  • the end result of a material (making a material seem like the real world)

The authors explain that the brick wall image illustrated on page 296 was done with a texture map. Maps are what we add to a material in 3DS Max to give the material a specific appearance and simulated feel. There are two categories and several types of maps. The two categories are bitmaps and procedural maps. Essentially, bitmaps are any kind of raster image (which get blurry when scaled) while procedural maps are vector images that can be scaled without losing detail. We will see some of each, working with 3DS Max.

Most materials will have some common characteristics. Three of them are listed on page 297:

  • ambient color - the surface color of an object when it is exposed to indirect light
  • diffuse color - the surface color of an object when it is exposed to direct light
  • specular color - the color of reflections (highlights) on an object

Think about that for a moment. In the example on the right, the pool ball illustrates all three concepts, and more. Ignore the black and white parts of the ball for now.

  • The ambient color of the ball (where the light is not shining) is a deep red.
  • The diffuse color (where the light is shining, but not reflecting) is a brighter red.
  • The specular color, in this case, is the color of the white circle at about 11 o'clock on the ball's surface, where the light source in the scene is actually being reflected by the ball. That white circle is called the specular highlight. The size of that area is determined by the material's glossiness property.
  • There is also a falloff area around the specular highlight. In that area the specular color fades into the diffuse color.

The text turns to discussing the main tool you will use to manage materials: the Material Editor. It can be used to assign and/or create materials for your scenes. As is usual, the authors give you a menu command to open the Material Editor. Most people who use 3DS Max would not use this command, however. The hotkey command to open the Material Editor is the letter M. If you were going to use a mouse, you would probably click the Material Editor button on the main toolbar. The authors do not mention this until the project starts on page 294.

The Material Editor is a complex tool, with many unlabelled buttons. You will need to learn the function of many of the controls in this tool by using them. This section of the text may seem long and drawn out, but it is in fact a brief introduction to this tool.

A common configuration for the Material Editor is shown on page 299. Note the six material sample slots at the top of the window. You actually have three choices for how many slots are shown at the same time: 3x2, 5x3, or 6x4. (See the menu illustrated at the bottom of page 298, and the sample slot arrangements shown on page 324.) As noted on page 325, you can use more than 24 materials in a scene. You just can't display more than 24 slots at once.

When a new scene is started, the Material Editor will not have any materials loaded in its sample slots. The slots all contain what 3DS Max calls a default material. You can load a material into a slot (for use in the scene) by first clicking a slot, then clicking the Get Material button, which is the first button on the left of the Material Editor's horizontal toolbar. (There is also a vertical toolbar. You can see both of them in the illustration on page 299.) Alternatively, if you only wanted to add a color to the default material in a slot, you could follow the procedure at the bottom of page 297 to set a custom color based on RGB (Red, Green, Blue) values or HSV (Hue, Saturation, Value) values.

The text describes the function of most of the buttons in the Material Editor, but it is unlikely that you will remember them until you use them. I will describe some of the concepts from that section here, with the understanding that you will learn the details about these concepts as you use them:

  • library - There is a materials library that comes with 3DS Max, to which you can add materials that you make, and materials that you harvest from scenes that you load.
  • show map - There is a show map in viewport button that toggles between showing the texture map for a material in the viewport, or only showing it when the scene is rendered. This is not important for materials that do not use maps. You should be aware of it because you may wonder why you do not see a map that you assign to a material.
  • hierarchy - Materials can have channels (parts) that can be arranged in a parent-child hierarchy.
  • material type - Setting a material's material type sets the properties that it has.
  • shader type - Setting a material's shader type determines how it reacts to and reflects light.
  • map buttons - The diffuse and specular color swatch buttons on the Materials Editor have map buttons next to them that you can click to browse for a texture map to apply to the material.
  • specular level - The brightness of the specular highlight.
  • glossiness - The size of the specular highlight.
  • self illumination - A large value here means that the material does not show shadows well, and that it does not require lighting.
  • opacity - High opacity means the material is more opaque, low opacity means that it is more transparent.

The text goes on to discuss material types. The list begins at the top of page 303. Note that the Material Editor has a material type button. It is not labeled as such. The name of the type of the currently selected material is displayed on the button. In the illustration on page 299, the button says Standard. In the illustration on page 303, the button says Blend. To change types for a material, click this button and make a choice. Why would you do so? Some types are better for modeling specific materials, and several types have different sets of properties.

Material types:

  • standard - the default material type; has ambient, diffuse, and specular properties
  • blend - used for blending two materials together
  • composite - used for blending up to ten materials together; has additive color, subtractive color, and opacity mixing
  • double sided - used for models that must have different materials on two opposing sides
  • ink 'n paint - used for scenes that need a cartoon look (see an example on page 286); not a great name, since not all cartoons look like this
  • matte/shadow - allows the object to receive shadows, but it is transparent to light
  • multi/sub-object - used to apply different materials to different parts of an object (as opposed to different sides)
  • raytrace - produces accurate reflections and refractions of light sources in the scene; this material requires more time to render, can be used for materials that glow.
  • shellac - puts a glossy surface on another material
  • top/bottom - used to put two kinds of material on the same object; allows you to adjust the dividing line
  • Architectural - (not mentioned in your text) material is useful for scenes in which you can state actual properties of real materials.
  • Arch & Design - (not mentioned in your text) material is only available with the Mental Ray renderer; used for more detailed surfaces, like the Architectural material.

This is the last topic before we begin the project for this lesson. Shader types affect the way light is reflected from an object (several types are named for the people who developed them):

  • Anisotropic (uneven) - gives asymmetric reflections and highlights; suggested for brushed metal. Read this discussion of the effect as seen on water, on multiple reflecting surfaces, and on grainy surfaces.
  • Blinn - the default shader type; gives a round highlight, good for most materials
  • Metal - good for smooth metal material
  • Multi-layer - has two anisotropic parameters, to be set differently; recommended for shiny material like silk
  • Oren-Nayar-Blinn - a softer version of Blinn, good for cloth and skin
  • Phong - supports a shader from older versions of the program; similar to Blinn, highlights are not as round
  • Strauss - simple shader, not clear when to use it
  • Translucent - allows light to pass through it, can simulate self-illumination

Project: pool ball

The chapter turns to a project, creating a model of a pool ball.

Project Exercise 1: Starting the ball 

This exercise starts on page 294. You should try creating the ball from scratch as the authors suggest. However, you will need a texture file later in the project. We can discuss importing that file when it is needed.

  1. Open a new scene file and create a sphere. The text states the size is unimportant.
  2. Open the material editor by any of the three methods that have been mentioned
    Question 1: What are the three methods of opening the Material Editor?
  3. Select a sample slot. The first one is probably the best choice.
  4. On the Blinn Basic Parameters rollout (sounds like something from a Harry Potter story...), click the color swatch for the Diffuse color. The color swatch is the large rectangle to the right of the word Diffuse. The map buttons are the square buttons to the right of the color swatches.
  5. If you have opened the color swatch button, you will see a color selection screen. Choose any color for now, and click the OK button on that screen. (Note: the color has not been applied to your sphere yet.)
  6. Save the file incrementally.

Project Exercise 2: Choosing a surface type

Before we apply the material to the ball, we will work with it. This is going to be a pool ball. Like the image above, it should be shiny. (Unless it was an old, dirty pool ball, but we won't go there today.)

  1. Make the settings given in the text for the Specular Highlight values: Specular Level to 98, and Glossiness to 85. As you do this watch the changes that take place immediately in the sample slot. The sample slot is acting as a preview window.
  2. Once the settings have been made, drag the material in the sample slot to the sphere and drop it. The appearance of the sphere will change immediately, but it may not match the sample material. This is normal. To see what it would look like in a render at this stage, click the Quick Render button, which is the last button on the right hand side of the toolbar. (If you can't see that button, drag the toolbar to the left until you can. Dragging the toolbar back and forth is often necessary on systems using a 4:3 format monitor.)
    Note that once your material was used in the scene, its sample slot had triangles appear its corners. Gray triangles mean that the material is being used on some object in the scene. White triangles mean that the material is being used on the currently selected object.

The text goes on to discuss the fact that the working image of the scene and the rendered scene will almost always look different. The working environment will always be less finished than the rendered environment.

Project Exercise 3: Mapping the pool ball 

The next topic is mapping the pool ball. The authors mean to add surface details that will make the ball look more realistic. The authors' description of a pool ball is a bit vague, but they have the right idea about having to add details. Adding a diffuse map that has those details will replace the diffuse color. (Makes you wonder why we set a color for the object, then a color for the material, when both are going to be ignored.) The map you will use for this project is illustrated on page 317. The authors tell you that this map was made in Photoshop, but that it could have been a bitmap created from a photograph or from a scan of a drawing, if that was what the project required. Note the characteristics of the bitmap. (I have reduced its size and reproduced it below as a png file.)

The map has the colors of a number 2 ball. A pool ball has its number on it in two places. The map has been drawn so that it can be wrapped around a cylinder, and the broken 2 above will become whole when the edges of the map meet. This tiling element of the map is a common feature: the edges of a map should seem to disappear when the map is applied.

  1. If it is closed, open the Material Editor. Select the sample slot for the material you have already used. Open the Maps rollout to see that maps can be applied to many different aspects of a material. (The map buttons shown in the Blinn Basic Parameters rollout are just a few handy shortcuts.) Click the button beside Diffuse Color.
  2. You can follow the directions in step 2 to browse to the tif version of the file above. (I will try to locate it on the classroom server, in case you did not bring your CD.) Once you have added it to the material, I recommend that you add it to your library.
    Material Editor Horizontal Toolbar
    I have already clicked the Add to Library button (seventh from the left in the image above) and named the collection that I have created PoolBalls. There is only one material in this collection, so far.
  3. As the text explains, this action will put you in the Bitmap Parameters rollout of the Material Editor. The text goes on at great length in this step only to tell you to make no changes. What it should be telling you is that you are in the parameters of a sub-object of your material. More on this in step 5.
  4. As you were warned in another chapter, just because you applied a bitmap to a material does not mean you can see it in the viewports. To see it, click the button that looks like a blue and white checkered cube, called Show Map in Viewport. (It is the ninth button from the left in the horizontal toolbar image above.)
  5. As I noted in step 3, you are looking at parameters for a sub-object of your material. To get back to the parameters for the material itself, click the eleventh button on the toolbar above, Go to Parent. Once you have clicked this button, look at the Blinn Basic Parameters. You will see that there is an M on the previously blank diffuse map button in this rollout, indicating that a material has been assigned to this property. As the text notes, the map has been added as a child to the material.
  6. It would be a good idea to render the ball at this point. Do so, then close the Quick Render window and save incrementally. My pool ball looks like this (the following three images are also reduced from my original renders):

Since the chapter isn't over, let's see what else they have to improve the ball. The next concept is that since a pool ball is glossy, it should reflect its environment. Unfortunately, there is no environment at this point. We could take some time to make a lot more balls, but the authors have another trick to use when that isn't practical. They have prepared a map that shows several pool balls. You may have noticed that there was a place to set a map for reflections in the Map parameters rollout?

Project Exercise 4: Reflection mapping 

  1. If it is closed, open the Material Editor. If the Go to Parent button is not grayed out, click it to go to the parent level. (If it is grayed out, you are at the parent level already.)
  2. Open the Maps rollout, and click the map button for Reflection. Choose bitmap, and click OK. Browse to the same folder where you found the map for the diffuse color, and select the ReflectionMap.tif file.
  3. Do a Quick Render, as the book states, and see an image that has several things wrong with it, something like the image below.

  4. Two of the things that are wrong, we can't fix right now. First, the reflection image should be reversed: it isn't. We could fake that by flipping it horizontally in an art program. (Why would that be a fake, grasshopper?) Second, the reflection image includes a two ball. Are we supposed to believe that there are two two balls on this table? Well, you will make those things less noticeable by compensating for the third problem.
    The third thing that is wrong, is that the ball is too reflective. Go back to the Maps rollout by clicking the Go to Parent button. Change the value of the Amount setting for Reflection. In the image above, I have already changed it to 40%. Still not enough. The text says to change it to 10%. Do that, and render again. It will look more like the image below, which looks pretty nice.

The text tells you on page 323 that you have two options if you want to get rid of a map.

  • If you don't want to use the map at all, right click its name on the Maps rollout button where it appears and choose Clear. (The other choices on the menu that appears are Copy and Cut.)
  • If you just want to make it disappear temporarily, but don't want to lose the information about where that file is, remove the check mark for the property that the map is assigned to. It will disappear from the scene, but you can bring it back by replacing the check mark.
  • There is a third way: drag a map rollout button that says None, and drop it on the button you want to say None. This clears the mapping for that property.

Page 323 also discusses changing the color of the background in a render. You would do this if you want a particular color to be used, but you have not added an actual background to your scene. The instructions at the top of that page can also be used to set a bitmap image to use as a background for renders.

On page 326, the text begins a discussion of other types of map files that you might use in 3DS Max:

  • 2D maps - typical 2D maps are either rasterr/bitmap images or procedural maps (which are generated from vector instructions)
    • Bitmap - this is a general category for any kind of raster image 3DS Max can read, such as tif, gif, jpg, etc.
    • Checker - a procedural type that creates a checkerboard pattern of two specified colors
    • Gradient - a procedural type that flows from from one color into a second, then into a third; these can be defined colors or maps
    • Gradient ramp - a procedural type that flows from and to any number of grayscale colors
  • 3D maps - procedural maps that aree generated in all three dimensions through an object (so you would see in along the new surfaces if you cut or break the object)
    • Marble - creates bands of color similar to patterns found in natural marble
    • Noise - create random variants in an object's color
    • Wood - simulates wood grain

The last topic in this section of the chapter is Opacity Mapping. If you are an artist, you may have seen this idea before, and it may have been called masking. The general idea is that you will be able to see some parts of an image, and you will be able to see through other parts. You should carry out the exercise on pages 331 and 332, showing how to make portions of a map file transparent when it is rendered. The trick is this:

  • The authors provide you with two tif files. The first is a section of chain link fence. The second is the same file reduced to two tones: white for the chain, and black for the space between the chain links.
  • The chain link file is used as the map material for the Diffuse property of a sample slot. Tiling coordinates are set.
  • The black and white version of the file is set as the map material for the Opacity property of the same sample slot, and the same tiling settings are applied.
  • The effect is to produce a fence that you can see through when the scene is rendered. Where the Opacity map is white, the Diffuse map is shown in the render. Where the Opacity map is black, the Diffuse map is not shown in the render, so we see whatever is behind the object this special material was applied to. Screen magic: we can map a fence on an object, and see the fence as well as what is behind the fence.
    • Opacity map white: show the diffuse map.
    • Opacity map black: see through the diffuse map.