Creating mr Proxy Objects
 
 
 

mr Proxies are useful when you want to fill a scene with instances of objects that have a high polygon count, such as 3D trees. Proxy objects save you time and free up memory because they do not need to be converted to mental ray format and their source objects do not need to be present during render time.

In this lesson, you convert trees to .mib format so they can be used as mr Proxy objects.

Set up the lesson:

Render the scene:

  1. Zoom and pan so the tree objects fill the viewport.
  2. Render the scene.

    The eight trees in the scene show foliage from four different seasons: winter, spring, summer, and fall. The trees in the front row are oaks, and the trees in the back row are elms.

    These trees were created and textured using the methods described in the lesson Creating Billboard Tree Maps. The only difference is that there was no need to center each trees in a viewport and render it: The mr Proxy method works with referenced geometry instead of with rendered bitmaps.

  3. Close the Rendered Frame Window.

Save the materials to a library:

The tree materials that you saw in the rendering will need to be reused for the mr Proxy objects. The best way to do this is to save the materials in a library, so you can access them for use in various scenes and situations.

  1. Open the Slate Material Editor.
  2. On the Material/Map Browser panel at the left, scroll down so you can see the Scene Materials group. (It helps to drag the edge of the Browser panel to make the Browser wider, too.)

    The four Tree materials are the ones you want to save.

  3. Right-click the Tree-Fall entry and from the pop-up menu, choose Copy To Temporary Library.

    3ds Max Design creates a Temporary Library group that appears at the bottom of the Browser panel. The Temporary Library has a copy of the Tree-Fall material in it.

    ImportantA Temporary Library such as this one lasts only as long as the current 3ds Max Design session.
  4. Right-click the Temporary Library label, and from the pop-up menu, choose Save As.

    3ds Max Design opens a file dialog. On the file dialog, navigate if you need to to the \materiallibraries subfolder of your Project Folder, then enter mytrees as the library name (the file name extension for a material library is MAT), and then click Save.

  5. At the top of the Browser panel, click (Material/Map Browser Options). This opens a pop-up menu. On the pop-up menu, choose Open Material Library.

    3ds Max Design opens another file dialog. In the \materiallibraries subfolder, choose the library you just created, mytrees.mat, and then click Open.

    3ds Max Design opens a group for mytrees.mat at the very top of the Browser panel. (The Temporary Library remains visible at the bottom of the panel.)

  6. In the mytrees.mat group, right-click the Material #0 entry and from the pop-up menu, choose Rename.

    3ds Max Design opens a Rename dialog. Change the material name back to Tree-Fall, then click OK.

  7. In the Scene Materials group, right-click the Tree-Spring material entry. On the pop-up menu, choose Copy To mytrees.mat.
  8. In the mytrees.mat group, use Rename to name this material Tree-Spring once again.
  9. Copy Tree-Summer and Tree-Winter to mytrees.mat as well. Each time, change the name of the material back to its original name.
  10. Right-click the mytrees.mat label, and on the pop-up menu, choose the first entry, C:\Users\...\mytrees.mat Save.
  11. Close the Slate Material Editor.

    Now you have a library of materials to use for the proxy objects. The next task is to create those proxies.

Save source objects in mr Proxy file format:

  1. On the Create panel, click (Geometry), then open the Objects drop-down list and choose “mental ray.”
  2. On the Object Type rollout, click “mr Proxy” to turn it on.
  3. Drag in the viewport to create an mr Proxy object.
  4. Go to the Modify panel. On the Parameters rollout, in the Source Object group, click the Source Object button (initially labeled “None”).

    In the viewport, click the Elm-Winter tree object.

  5. In the Parameters rollout Source Object group, click Write Object To File.

    3ds Max Design opens a file dialog. If you need to, navigate to the \sceneassets\renderassets folder. Name the file My_Elm_Winter (it has a file name extension of MIB), and then click Save.

    3ds Max Design opens an “mr Proxy Creation” dialog. On this dialog, click OK to accept the default values.

    NoteIf your tree object were animated, you would use the “mr Proxy Creation” dialog to save the object as a sequence of frames, with one .mib file created per frame. You specify the time segment to save in the Geometry To Write group.

    3ds Max Design briefly displays a small Rendered Frame Window while it renders the proxy geometry.

    In the viewport, 3ds Max Design displays the mr Proxy object as a point cloud.

  6. In the Parameters rollout Display group, change the Viewport Verts value from 128 to 512, and press Enter.

    The object outline becomes more apparent as more points are displayed, but a denser point cloud can affect viewport performance.

  7. Change the Viewport Verts value back to 128, then turn on Show Bounding Box to display the extents of the tree proxy.

    3ds Max Design displays the proxy surrounded by a complete bounding box.

  8. With the proxy object selected, repeat steps 4 through 7 for the Elm-Spring tree object.

    When you’re done, you should have an .mib file for Elm-Spring.

    If you were working from scratch, you would repeat the steps for every tree in the scene, but to speed things up a little, we have created .mib files for all the tree types. These are saved in the \sceneassets\renderassets folder. You will use these proxies in the next lesson.

  9. Do not save the current scene file.

    The work you needed to save is contained in the MIB files and their associated bitmaps.

Next

Loading Proxy Files Into a Scene