CHAPTER 18

Creating Compound Materials and Using Material Modifiers

IN THIS CHAPTER

Creating and using compound materials

Using material IDs to apply multiple materials

Working with material modifiers

Displacing surface with a bitmap

Now that you've learned to create materials using the Standard material type, you get a chance to see the variety of material types that you can create in Max. You can select all the various Max materials from the Material/Map Browser. Open this browser automatically by selecting Rendering image Material/Map Browser.

Although many of these materials are called compound materials, they are really just collections of materials that work together as one. Just like a mesh object can include multiple elements, materials also can be made up of several materials. Using material IDs, you can apply multiple materials to the subobject selections of a single mesh object. The chapter concludes with a quick look at the various modifiers that are applied to materials.

Using Compound Materials

Compound materials combine several different materials into one. You select a compound object type by double-clicking the material type from the Material/Map Browser. Most of the entries in the Material/Map Browser are compound objects.

Compound materials usually include several different levels. For example, a Top/Bottom material includes a separate material for the top and the bottom. Each of these submaterials can then include another Top/Bottom material, and so on. The links between these different submaterials are clearly visible in the View Node panel.

Each compound material includes a customized rollout in the Parameter Editor for specifying the submaterials associated with the compound material.

Cross-Reference

Some of the material types work closely with specific objects and other Max features. These materials are covered in their respective chapters. The Advanced Lighting Override and Lightscape materials are presented in Chapter 45, “Working with Advanced Lighting, Light Tracing, and Radiosity”; the raytracing and various mental ray material settings are covered in detail in Chapter 47, “Rendering with mental ray and iray”; and the XRef material is covered in Chapter 25, “Building Complex Scenes with Containers, XRefs, and the Schematic View.”

Blend

The Blend material blends two separate materials on a surface. The Blend Basic Parameters rollout, shown in Figure 18.1, includes separate nodes for each of the two submaterials. The check boxes to the right of these buttons enable or disable each submaterial. The Interactive option enables you to select one of the submaterials to be viewed in the viewports.

The Mask button (which appears below the two submaterial buttons) lets you load a map to specify how the submaterials are mixed. Gray areas on the map are well blended, white areas show Material 1, and black areas show Material 2. As an alternative to a mask, the Mix Amount determines how much of each submaterial to display. A value of 0 displays only Material 1, and a value of 100 displays only Material 2. This value can be animated, allowing an object to gradually change between materials.

FIGURE 18.1 The Blend material can include a mask to define the areas that are blended.

image

The Mixing curve defines the transition between edges of the two materials. The Upper and Lower spinners help you control the curve.

Composite

The Composite material mixes up to ten different materials by adding, subtracting, or mixing the opacity. The Composite Basic Parameters rollout, shown in Figure 18.2, includes buttons for the base material and nine additional materials that can be composited on top of the base material. The materials are applied from top to bottom.

FIGURE 18.2 Composite materials are applied from top to bottom, with the last layer placed on top of the rest.

image

You enable or disable each material using the check box to its left. The buttons labeled with the letters A, S, and M specify the opacity type: Additive, Subtractive, or Mix. The Additive option brightens the material by adding the background colors to the current material. The Subtractive option has the opposite effect and subtracts the background colors from the current material. The Mix option blends the materials based on their Amount values.

To the right of the A, S, and M buttons is the Mix amount. This value can range from 0 to 200. At 0, none of the materials below it will be visible. At 100, full compositing occurs. Values greater than 100 cause transparent regions to become more opaque.

Cross-Reference

You can learn more about compositing and the Video Post interface in Chapter 49, “Compositing with Render Elements and the Video Post Interface.”

Double Sided

The Double Sided material specifies different materials for the front and back of object faces. You also have an option to make the material translucent. This material is for objects that have holes in their surface. Typically, objects with surface holes do not appear correctly because only the surfaces with normals pointing outward are visible. Applying the Double Sided material shows the interior and exterior of such an object.

The Double Sided Basic Parameters rollout includes two buttons, one for the Facing material and one for the Back material. The Translucency value sets how much of one material shows through the other.

Multi/Sub-Object

You can use the Multi/Sub-Object material to assign several different materials to a single object via the material IDs. You can use the Mesh or Poly Select modifier to select each subobject area to receive the different materials.

At the top of the Multi/Sub-Object Basic Parameters rollout, shown in Figure 18.3, is a Set Number button that lets you select the number of subobject materials to include. This number is displayed in a text field to the left of the button. Each submaterial is displayed as a separate area on the sample object in the sample slots. Using the Add and Delete buttons, you can selectively add or delete submaterials from the list.

FIGURE 18.3 The Multi/Sub-Object material defines materials according to material IDs.

image

Tip

You can set the number of materials that are included by default in the Multi/Sub-Object material using the Options image Preferences dialog box. Nodes for each material are also included by default when a Multi/Sub-Object material node is created, but you can ensure that no extra material nodes are included by enabling the Empty Sub-Material Slots option in the Preferences dialog box.

Each submaterial includes a sample preview of the submaterial and an index number listed to the left, a Name field where you can type the name of the submaterial, a button for selecting the material, a color swatch for creating solid color materials, and a check box for enabling or disabling the submaterial. You can sort the submaterials by clicking the ID, Name, or Sub-Material buttons at the top of each column.

After you apply a Multi/Sub-Object material to an object, convert the object to an Editable Mesh or Poly, or use the Mesh or Poly Select modifier to make a subobject selection and match the Material IDs in the Surface Properties rollout to the material for the subobject selection. In the Material section for this subobject selection, choose a material ID to associate with a submaterial ID or select the material by name from the drop-down list.

Tutorial: Creating a patchwork quilt

When I think of patches, I think of a 3D Max object type, but for many people “patches” instead bring to mind small scraps of cloth used to make a quilt. Because they share the same name, this example uses Max patches to create a quilt. You can then use the Multi/Sub-Object material to color the various patches appropriately.

Cross-Reference

You can learn more about modeling with patches in Chapter 13, “Modeling with Polygons.”

To create a quilt using patches, follow these steps:

  1. Open the Patch quilt.max file from the Chap 18 directory on the DVD.

    This file contains a quilt made of patch objects that have been combined into one object.

  2. Open the Material Editor by choosing Rendering image Material Editor image Slate Material Editor (or press M), and double-click on the Multi/Sub-Object material in the Material/Map Browser panel.

    The Multi/Sub-Object material node loads into the Node View, double-click the new node to make the Multi/Sub-Object Basic Parameters rollout appear in the Parameter Editor panel. Click the Set Number button and enter the value of 10.

  3. Double-click the Standard material in the Material/Map Browser to create a separate node for each materials included in the Multi/Sub-Object material. Then drag from the output socket of each Standard material node to the input socket in the Multi/Sub-Object node for each of the sub-materials.
  4. In the Multi/Sub-Object Basic Parameters rollout, click the color swatches to the right of the Material button to open the Color Selector. Select different colors for each of the first ten material ID slots.
  5. Drag the Multi/Sub-Object material node's output socket and drop it onto the patch object in the viewports. Close the Material Editor.
  6. In the Modify panel, select the Patch subobject and scroll to the bottom of the Modify panel to the Surface Properties rollout.
  7. Assign each patch a separate material ID by clicking a patch and changing the ID number in the rollout field.

Figure 18.4 shows the finished quilt. Because it's a patch, you can drape it over objects easily.

FIGURE 18.4 A quilt composed of patches and colored using the Multi/Sub-Object material

image

Morpher

The Morpher material type works with the Morpher modifier to change materials as an object morphs. For example, you can associate a blushing effect with light red applied to the cheeks of a facial expression to show embarrassment. You can use this material only on an object that has the Morpher modifier in its Stack. The Morpher modifier includes a button called Assign New Material in the Global Parameters rollout for loading the Material Editor with the Morpher material type.

Cross-Reference

Discover more about the Morpher modifier in Chapter 35, “Using Animation Layers, Modifiers, and Complex Controllers.”

For the Morpher material, the Choose Morph Object button in the Morpher Basic Parameters rollout lets you pick a morpher object in the viewports and then open a dialog box used to bind the Morpher material to an object with the Morpher modifier applied. The Refresh button updates all the channels. The base material is the material used before any channel effects are used.

The Morpher material includes 100 channels that correlate to the channels included in the Morpher modifier. Each channel can be turned on and off. At the bottom of the parameters rollout are three Mixing Calculation options that can be used to determine how often the blending is calculated. The Always setting can consume lots of memory and can slow down the system. Other options are When Rendering and Never Calculate.

Shell

The Shell Material consists of an original material and a baked material. For each of these materials, you can specify which appear in the viewport and which are rendered.

Cross-Reference

More on baked materials is found in Chapter 34, “Creating Baked Textures and Normal Maps.”

Shellac

The Shellac material is added on top of the Base material. The Shellac Basic Parameters rollout includes only two buttons for each material, along with a Color Blend value. The Blend value has no upper limit.

Top/Bottom

The Top/Bottom material assigns different materials to the top and bottom of an object. The Top and Bottom areas are determined by the direction in which the face normals point. These normals can be according to the World or Local Coordinate System. You also can blend the two materials.

The Top/Bottom Basic Parameters rollout includes two buttons for loading the Top and Bottom materials. You can use the Swap button to switch the two materials. Using World coordinates enables you to rotate the object without changing the material positions. Local coordinates tie the material to the object.

The Blend value can range from 0 to 100, with 0 being a hard edge and 100 being a smooth transition. The Position value sets the location where the two materials meet. A value of 0 represents the bottom of the object and displays only the top material. A value of 100 represents the top of the object, and only the Bottom material is displayed.

Tutorial: Surfing the waves

There's nothing like hitting the surf early in the morning, unless you consider hitting the virtual surf early in the morning. As an example of a compound material, you apply the Top/Bottom material to a surfboard.

To apply a Top/Bottom compound material to a surfboard, follow these steps:

  1. Open the Surfboard.max file from the Chap 18 directory on the DVD.

    This file contains a surfboard model and an infinite plane to represent the ocean.

  2. Apply the Ocean Surface material, which is already created in the Material Editor, to the plane object by dragging the material node's output socket from the Material Editor to the Plane object.
  3. In the Material Editor, select and double-click the Top/Bottom material to create a new material node.
  4. Select the new material node and name it Surfboard. Then click the Top Material node, name the material Surfboard Top, and change the Diffuse color to White. In the material drop-down list, select Surfboard and then click the Bottom Material node. Give this material the name Surfboard Bottom, and change the Diffuse color to Black.
  5. Then drag this material node's output socket to the surfboard object.

Figure 18.5 shows the resulting image.

FIGURE 18.5 A rendered image of a surfboard with the Top/Bottom compound material applied

image

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 can have a unique material applied to it.

Using material IDs

Sometimes you may 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 also can 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 you'll use the Multi/Sub-Object material instead.

To create a die model, follow these steps:

  1. Open the Pair of dice.max file from the Chap 18 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 double-click on the Multi/Sub-Object material from the Material/Map Browser. Then select the material node and name the material Die Faces.
  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 the right that is currently labeled None to open the Material/Map Browser. Select the Standard material type and click OK. Then click the material button again to view the material 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 again, and double-click the Bitmap map type. In the Select Bitmap Image File dialog box, choose the dieface1.tif image from the Chap 18 directory on the DVD and click Open.
  5. Back in the Material Editor, 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.

Because the cube object used in this example is a box primitive, you 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 18.6 shows a rendered image of two dice being rolled.

Tip

If you enable the Views image Show Materials in Viewports As image Standard Display with Maps menu command, then the subobject materials are visible.

FIGURE 18.6 These dice have different bitmaps applied to each face.

image

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. For example, if you have a Multi/Sub-Object material with 10 materials and the scene only uses 3 of the materials, then the other 7 materials aren't needed and can be eliminated.

You can locate and eliminate unused submaterials in the scene using the Clean MultiMaterial utility. This utility can be accessed from the Utility panel in the Command Panel by clicking the More button or from the Utilities menu in the Material Editor.

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.

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, Disp Approx, and Displace Mesh (WSM) modifiers in the Surface category, and the Vertex Paint modifier in the Mesh Editing category. In this section, you get a chance to use several material-specific modifiers.

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, you 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 Marquee Lights.max file from the Chap 18 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 double-click the Multi/Sub-Object material from the Material/Map Browser. Give the material the name Random Lights.
  3. Double-click the Multi/Sub-Object material node and 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 select the Standard material type, and in the Material name field give the material the name Light On. Select the material button in the Multi/Sub-Object Basic Parameters rollout and set the Diffuse color to yellow and Self-Illumination to yellow. Then double-click again on the main material node.
  4. Name the second material Light Off, and click the material button to right of the name field and select the Standard material type. Then click the material button again and select a gray Diffuse color. Then click the Multi/Sub-Object material node.
  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 18.7 shows the marquee with its random lights. (I've always wanted to see my name in lights!)

Tip

If you want to have the lights randomly flash, then simply animate the changing Seed value.

FIGURE 18.7 This marquee is randomly lighted, thanks to the MaterialByElement modifier.

image

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 Parametric Deformers menu). The Displace modifier lets you specify a bitmap and a map to use to alter the object's geometry. Black areas on the bitmap are left unmoved, gray areas are indented, and white 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.

Note

Max also supports Vector Displacement maps, which are found in the Maps category of the Material/Map Browser. Vector Displacement maps require the mental ray renderer and they allow displacement in any direction and not just along surface normals like other displacement methods. Autodesk's Mudbox provides a good way to create this type of map saved using the EXR file format.

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 Surface image 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-Reference

More details on working with maps are covered in Chapter 17, “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 Surface image 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.

Note

The Displace modifier requires a dense mesh in order to see the results of the displacement map, but the Disp Approx modifier creates the required density at render time.

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 of 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 Standard Primitives image Plane menu command. Then set the Length and Width Segments to 150 for the left plane object and to 20 for the right plane object.

    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 Parametric Deformers image 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 Tulip logo.tif file from the Chap 18 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 the Bitmap option in the Material/Map Browser, and load the same Tulip logo.tif file from the Chap 18 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 Surface image Displace Mesh (WSM) menu command. In the Displacement Approx. rollout, enable the Custom Settings option and click the High subdivision preset.

Figure 18.8 shows the resulting displacement on both plane objects.

FIGURE 18.8 Objects can be displaced using the Displace modifier or a displacement map.

image

Summary

This chapter introduced several compound materials that you can create in Max. The chapter presented various material types, including compound and Multi/Sub-Object materials. The chapter also showed off a number of key material modifiers including the Displace Mesh and Vertex Paint modifiers.

The following topics were covered in this chapter:

  • Various compound material types
  • Applying multiple materials to an object with material IDs
  • Exploring several material modifiers, including the Material and MaterialByElement
  • Comparing the different displacement methods

In the next chapter, you gain some experience with using cameras to create and capture a unique view into the scene.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.17.12