Applying Multiple Materials


Most complex models are divided into multiple parts, each distinguished by the material type that is applied to it. For example, a car model would be separated into windows, tires, and the body, so that each part could have a unique material applied to it.

Using material IDs

You may sometimes want to apply multiple materials to a single part. Selecting subobject areas and using material IDs can help you accomplish this task.

Many of the standard primitives have material IDs automatically assigned: Spheres get a single material ID, boxes get six (one for each side), and cylinders get three (one for the cylinder and one for each end cap). In addition to the standard primitives, you can assign material IDs to Editable Mesh objects. You can also assign these material IDs to any object or subobject using the Material modifier. These material IDs correspond to the various materials specified in the Multi/Sub-Object material.

Note 

Don't confuse these material IDs with the material effect IDs, which are selected using the Material Effect flyout buttons under the sample slots. Material IDs are used only with the Multi/Sub-Object material type, whereas the effect IDs are used with the Render Effects and Video Post dialog boxes for adding effects such as glows to a material.

Tutorial: Mapping die faces

As an example of mapping multiple materials to a single object, consider a die. Splitting the cube object that makes up the die into several different parts wouldn't make sense, so we'll use the Multi/Sub-Object material instead.

To create a die model, follow these steps:

  1. Open the image from book Pair of dice.max file from the Chap 22 directory on the DVD.

    This file contains two simple cube primitives that represent a pair of dice. I also used Adobe Photoshop and created six images with the dots of a die on them. All of these images are the same size.

  2. Open the Material Editor, and select the first sample slot. Name the material Die Faces, and click the Type button. Select the Multi/Sub-Object material from the Material/Map Browser. In the dialog box that opens, select to discard the current map and click OK.

  3. In the Multi/Sub-Object Basic Parameters rollout, click the Set Number button and enter a value of 6.

  4. Name the first material face 1, and click the material button to open the parameter rollouts for the first material. Then click the map button to the right of the Diffuse color swatch to open the Material/Map Browser, and double-click the Bitmap map. In the Select Bitmap Image File dialog box, choose the dieface1.tif image from the Chap 22 directory on the DVD and click Open.

  5. Back in the Material Editor, click the Go to Parent button twice to return to the Multi/Sub-Object Basic Parameters rollout and repeat Step 4 for each of the die faces.

  6. When the Multi/Sub-Object material is defined, select the cube object and click the Assign Material to Selection button.

Note 

Because the cube object used in this example is a box primitive, we didn't need to assign the material IDs to different subobject selections. The box primitive automatically assigned a different material ID to each face of the cube. When material IDs do need to be assigned, you can specify them in the Surface Properties rollout for editable meshes.

Figure 22.12 shows a rendered image of two dice being rolled.

image from book
Figure 22.12: These dice have different bitmaps applied to each face

Tip 

If you enable the Show Map in Viewport option in the Material Editor, then the subobject materi-als are visible; you also can enable them using the Views image from book Activate All Maps menu command.

Using the Clean MultiMaterial utility

All compound materials have submaterials that are used to add layers of detail to the material, but if these submaterials aren't used, they can take up memory and disk space. You can locate and eliminate unused submaterials in the scene using the Clean MultiMaterial utility. This utility can be accessed from the Utility panel or from the Utilities menu in the Material Editor. For example, if you create a Multi/Sub-Object material with seven submaterials but later as you are modeling find that you need only five, the two unneeded submaterials can be cleaned.

Clicking the Find All button finds all submaterials that aren't used and presents them in a list where you can select the ones to clean.




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net