Material Modifiers


Of the many available modifiers, most modifiers change the geometry of an object, but several work specifically with materials and maps, including the Material, MaterialByElement, UVW Map, UVW XForm, Unwrap UVW, and Vertex Paint modifiers. In this section, you get a chance to use several material-specific modifiers. The Surface modifiers set includes several modifiers for working with materials.

CROSS-REF 

Find out more about the modifiers that apply to maps in Chapter 23, "Adding Material Details with Maps." Another common texture-applying technique uses the Vertex Paint modifier, which is covered in Chapter 25, "Creating Baked Textures and Normal Maps."

Material modifier

The Material modifier lets you change the material ID of an object. The only parameter for this modifier is the Material ID. When you select a subobject and apply this modifier, the material ID is applied only to the subobject selection. This modifier is used in conjunction with the Multi/Sub-Object Material type to create a single object with multiple materials.

MaterialByElement modifier

The MaterialByElement modifier enables you to change material IDs randomly. You can apply this modifier to an object with several elements. The object needs to have the Multi/Sub-Object material applied to it.

The parameters for this modifier can be set to assign material IDs randomly with the Random Distribution option or according to a desired Frequency. The ID Count is the minimum number of material IDs to use. You can specify the percentage of each ID to use in the fields under the List Frequency option. The Seed option alters the randomness of the materials.

Tutorial: Creating random marquee lights with the MaterialByElement modifier

The MaterialByElement modifier enables you to change material IDs randomly. In this tutorial, we reproduce the effect of lights randomly turning a marquee on and off by using the Multi/Sub-Object material together with the MaterialByElement modifier.

To create a randomly lighted marquee, follow these steps:

  1. Open the image from book Marquee Lights.max file from the Chap 22 directory on the DVD.

    This file includes some text displayed on a rectangular object surrounded by spheres that represent lights.

  2. Open the Material Editor, and select the first sample slot. Then click the Type button, and select the Multi/Sub-Object material from the Material/Map Browser. Select to discard the current material, and click OK. Give the material the name Random Lights.

  3. In the Multi/Sub-Object Basic Parameters rollout, click the Set Number button and change its value to 2. Then click the Material 1 button, and in the Material name field, give the material the name Light On. Set the Diffuse color to yellow and Self-Illumination to yellow. Then click the Go Forward to Sibling button to access the second material.

  4. Name the second material Light Off, and select a gray Diffuse color. Then click the Go to Parent button to return to the Multi/Sub-Object material.

  5. Select all the spheres, and click the Assign Material to Selection button to assign the material to the spheres.

  6. With all the spheres selected, open the Modify panel and select the MaterialByElement modifier from the Modifier List drop-down list. In the Parameters rollout, select the Random Distribution option and set the ID Count to 2.

Figure 22.13 shows the marquee with its random lights. (I've always wanted to see my name in lights!)

image from book
Figure 22.13: This marquee is randomly lighted, thanks to the MaterialByElement modifier

Disp Approx and Displace Mesh modifiers

You can change the geometry of an object in several ways using a bitmap. One way is to use the Displace modifier (found in the Modifiers image from book Parametric Deformers menu). The Displace modifier lets you specify a bitmap and a map to use to alter the object's geometry. White areas on the bitmap are left unmoved, gray areas are indented, and darker areas are indented a greater distance. Several controls are available for specifying how the image is mapped to the object and how it tiles, and buttons are available for setting its alignment, including Fit, Center, Bitmap Fit, Normal Align, View Align, Region Fit, Reset, and Acquire.

Another way to displace geometry with a bitmap is to use a displacement map. Displacement maps can be applied directly to Editable Poly and Mesh, NURBS, and Patch objects. If you want to apply a displacement map to another object type, such as a primitive, you first need to apply the Modifiers image from book Surface image from book Disp Approx modifier, which is short for Displacement Approximation. This modifier includes three default presets for Low, Medium, and High that make it easy to use.

CROSS-REF 

More details on working with maps are covered in Chapter 23, "Adding Material Details with Maps."

One drawback to using displacement maps is that you cannot see their result in the viewport, but if you apply the Modifiers image from book Surface image from book Displace Mesh (WSM) modifier, then the displacement map becomes visible in the viewports. If you change any of the displacement map settings, you can update the results by clicking the Update Mesh button in the Displacement Approx. rollout.

Tutorial: Displacing geometry with a bitmap

When faced with how to displace an object using a bitmap, Max once again comes through with several ways to accomplish the task. The method you choose depends on the pipeline. You can choose to keep the displacement in the Modifier Stack or on the material level. This simple tutorial compares using both these methods.

To compare the Displace modifier with a displacement map, follow these steps:

  1. Create two square-shaped plane objects side by side in the Top viewport using the Create image from book Standard Primitives image from book Plane menu command. Then set the Length and Width Segments to 150 for both plane objects.

    Tip 

    When displacing geometry using a bitmap, make sure the object faces that will be displaced have sufficient resolution to represent the displacement.

  2. Select the first plane object and apply the Displace modifier with the Modifiers image from book Parametric Deformers image from book Displace menu command. In the Parameters rollout, set the Strength value to 2 and click the Bitmap button. In the Select Displacement Image dialog box, select the image from book Tulip logo.tif file from the Chap 22 directory on the DVD.

  3. Select the second plane object and open the Material Editor by pressing the M key. In the Material Editor, open the Maps rollout, set the Displacement Map Amount value to 10, and click the Displacement map button. Then double-click on the Bitmap option in the Material/Map Browser, and load the same image from book Tulip logo.tif file from the Chap 22 directory on the DVD. Then apply the material to the second plane object by pressing the Assign Material to Selection button, and close the Material Editor.

  4. With the second plane still selected, choose the Modifiers image from book Surface image from book Displace Mesh (WSM) menu command.

Figure 22.14 shows the resulting displacement on both plane objects.

image from book
Figure 22.14: Objects can be displaced using the Displace modifier or a displacement map




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