Create the Multi/Sub-Map Material
 
 
 

In this lesson, your objective is to divide the seating in the stadium scene into four distinct groups, and use multi/sub-mapping to assign each group its own color, with red representing the most expensive seats and green the cheapest.

Set up the lesson:

Choose mental ray and group objects by ID number:

  1. On the main toolbar, click (Render Setup).
  2. On the Render Setup dialog Common tab Assign Renderer rollout, make sure the Production field is set to mental ray Renderer.

    The Multi/Sub-Map is a mental ray feature. It is available only when you choose mental ray or the Quicksilver Hardware renderer as your renderer.

  3. Close the Render Setup dialog.
  4. Right-click an empty area of the main toolbar and from the pop-up menu, choose Layers.

    3ds Max opens the Layers toolbar.

  5. On the Layers toolbar, open the layers list and click to hide all layers except Seats.

    Now only the seats objects are visible, making their selection much easier.

  6. Close the Layers toolbar and maximize the Top viewport.
  7. Select any seat object, right-click and from the quad menu, choose Object Properties.

    Notice that in the Object Properties dialog General tab G-Buffer group, the Object ID displays as 0. All objects when they are first created are assigned an ID of 0. Later on, you will change this number in order to assign certain groups of seat objects their own material variations.

  8. Click Cancel to close the dialog, then on the main toolbar, choose the Lasso tool from the Select Object flyout.

  9. Use the Lasso tool to select the seats shown in white in the next illustration.

    Be sure to hold down the Ctrl key when you select additional seats.

    TipIf you select unwanted seats, use the Alt key to deselect them.

  10. Right-click, choose Object Properties from the quad menu, and in the Object Properties dialog General tab G-Buffer group, change the Object ID to 1. Click OK.
  11. Use the Lasso tool to select the seats shown in the next illustration.

    Be sure to hold down the Ctrl key when you select additional seats.

  12. Right-click, choose Object Properties from the quad menu, and in the Object Properties dialog General tab G-Buffer group, change the Object ID to 2. Click OK.
  13. Select the seats shown in the next illustration.

  14. Right-click , choose Object Properties, and in the Object Properties dialog General tab G-Buffer group, change the Object ID to 3. Click OK.
  15. Select the seats shown in the next illustration, and give them an object ID of 4.

    Now all the stadium seats have an object ID of 1, 2, 3, or 4. With this in place, each seat is ready to receive its own material variation and sub-object maps.

Create a material for the seats:

  1. Continue from the previous procedure, or open the file multi_maps_01.max.
  2. Press M to open the Slate Material Editor.
    TipIf the Compact Material Editor opens instead, then on the Material Editor menu bar, choose Modes Slate Material Editor.
  3. From the Material/Map Browser panel on the left, drag an Arch & Design material into the active View (View1), the empty area in the center of the Slate Material Editor window.

    In the Browser, the Arch & Design material is in the Materials mental ray group.

    A node for the Arch & Design material appears in the active View.

  4. Double-click the Arch & Design material node to display its parameters in the Parameter Editor panel on the right.
  5. Change the name of the material to seats.

  6. On the Templates rollout, open the drop-down list and choose Matte Finish.

  7. In the Top viewport, select all the seats, then on the Slate Material Editor toolbar, click (Assign Material To Selection).

    The matte-finish seats material is assigned to all the seats.

    Now you will add multiple sub-object maps to the seat material’s diffuse color channel.

Define a multi/sub map for the seats:

  1. On the Slate Material Editor, drag a Multi/Sub-Map from the Material/Map Browser panel to the active View.

    You can find the Multi/Sub-Map entry in the Maps mental ray group.

    A node for the Multi/Sub map appears in the active View.

  2. Drag from the output socket of the Multi/Sub-Map node (the round control at the right of the node). 3ds Max creates a wire. Drop the end of the wire on the input socket for the Diffuse Color Map component of the seats material node.

  3. Double-click the Multi/Sub map node to display its parameters.
  4. On the Multi/Sub-Map Parameters rollout, set the Number Of Colors/Maps To Use to 4.

    By default, Switch Color/Map Based On is set to Object ID, meaning that the sub-maps will be distributed among the objects by their ID number. You have already set up the object IDs.

    The Default/Out-Of-Range Color is set to red. This means the material of any object in the scene with an ID other than 1 to 4 will display in red. Red is one of the seat colors we are using, so click this color swatch and use the Color Selector to change this color to a neutral gray.

    NoteIf you were to turn on the Repeat option, all objects with IDs higher than 4 would display the color sequence assigned to objects with IDs 1 to 4.
  5. Click the color swatch labeled Color/Map #1.

  6. On the Color Selector, change the color to a bright red: Red = 0.8, Green = 0.0, Blue = 0.0, then click OK.
  7. Click the color swatch labeled Color #2 and change the color to a blue: Red = 0.275, Green = 0.534, Blue = 0.814, then click OK.
  8. Click the color swatch labeled Color #3 and change the color to a yellow: Red = 0.867, Green = 0.808, Blue = 0.231, then click OK.
  9. Click the color swatch labeled Color #4 and change the color to a green: Red = 0.158, Green = 0.583, Blue = 0.141, then click OK.

    These colors will not show up in the viewports, but they will be visible when you render the image.

  10. Make sure the Top viewport is active, then on the main toolbar, click (Render Production) to render the scene. Keep the rendered frame window open.

    The rendered image shows seats with their sub-map material clearly visible. Seats with an object ID of 1 show the red sub-map applied, seats with an object ID of 2 show the blue sub-map applied, and so on.

  11. Activate the Camera-Seats viewport.
  12. In the rendered frame window’s Viewport list, make sure Camera-Seats is chosen, then click Render to render the scene again.

  13. Close the rendered frame window.

Save your work:

Next

Composite Sub-Maps Onto Objects