Multi/Sub-Map Shader (mental ray)
 
 
 
Command entry: Material Editor Any material Click a map button Material/Map Browser Maps mental ray Multi/Sub-Map
Notemental ray shaders appear in the Browser only if the currently active renderer supports them.

The Multi/Sub-Map shader provides the ability to assign different colors or maps to a single parameter of a material. For example, you could create an array of pebbles on a terrain and assign a single Arch & Design material to all of the pebbles. To introduce color variation, place a Multi/Sub-Map shader in the Diffuse slot of the material. In doing so, you would maintain the same BRDF properties for all pebbles, varying only the diffuse color. Judicious use of Multi/Sub-Map can vastly reduce the required number of materials in complex scenes.

Multi/Sub-Map can vary the assigned color or map at random, or based on object, material, or smoothing group ID. You can define up to 20 colors or maps to different IDs and for higher IDs you can repeat the assignment cycle or specify an out-of-range color or map.

Left: Auditorium seat colors vary by object ID

Right: Colors vary at random

NoteThe Multi/Sub-Map shader does not display correctly in shaded viewports. In general, it is recommended that you leave Show Map In Viewport off for materials that use the shader as the Diffuse map.

Interface

Switch Color/Map based on

Choose the basis on which to assign a color or map:

  • Object IDUses the Object ID value. Objects whose ID is 1 are assigned Color/Map #1, and so on.
    NoteObjects whose ID is 0 (the default), or, if Repeat is off, with an ID value higher than the upper limit as determined by value of Number of Colors/Maps to Use, are assigned the Default/Out-of-range Color (or map).
  • Material IDUses the Material ID. Faces whose Material ID is 1 are assigned Color/Map #1, and so on.
    NoteIf Repeat is off, faces with an Material ID value higher than the upper limit as determined by value of Number of Colors/Maps to Use are assigned the Default/Out-of-range Color (or map).
  • Smoothing GroupUses the smoothing group ID. Faces in smoothing group 1 are assigned Color/Map #1, and so on. For faces assigned to multiple smoothing groups, Multi/Sub-Map uses the highest assigned value.
    NoteFaces that don’t belong to any smoothing group, or, if Repeat is off, with a smoothing group ID value higher than the upper limit as determined by value of Number of Colors/Maps to Use, are assigned the Default/Out-of-range Color (or map).
  • RandomAssigns colors or maps at random. The randomization is fixed and does not change upon re-rendering the scene or reassigning the material.
Default/Out-of-range Color

The color or map assigned to objects or faces whose ID does not fall within the specified range (1 to Number of Colors/Maps). Does not apply to the Random option.

Number of Colors/Maps to Use

The highest ID value to use. If Repeat is off, IDs higher than this value (or set to 0) are assigned the Default/Out-of-range Color. Range=1 to 20.

Repeat

When on, the assigned colors/maps cycle through values higher than the Number Of Colors/Maps To Use setting. For example, if Number Of Colors/Maps To Use is set to 7, objects or faces with ID 8 or 15 would use Color/Map #1, IDs set to 9 or 16 would use #2, and so on.

When off, any IDs outside the specified range (1 to Number of Colors/Maps) use the Default/Out-of-range Color.

Color/Map #1-20

For each Color/Map parameter, specify a color or map to use. If you assign a map, it overrides the color unless you disable the map using a check box on the Maps rollout.

To assign a map, click the map button to the right of the color swatch and choose a map from the Material/Map Browser.

Maps rollout

This rollout provides check boxes for enabling and disabling the map/color assignments and buttons for assigning maps.