Massively Instance Geometry With Proxy Objects
By Neil Blevins
Created On: Mar 27th 2012
Modified On: Dec 17th 2013

Go here to read this tutorial in Russian.

Say you have a hires model like my Mortuary Robot (3 million faces once subdivided once)...

But now you're told they want to have a shot in the film at a Mortuary Robot factory, and they want to see a room with hundreds of these guys in it.

You can use instancing to save on memory, but at such high numbers, even normal max instancing won't do what you need. Your render will certainly run out of memory. And forget about displaying them in the max viewport.

Many renderers have a Proxy Object feature, which lets you bake out your geometry, and the result is something that looks just like your original geometry, but that takes up far less memory and renders far faster. For this tutorial, I'll show you how to use the mr Proxy Object in mentalray, but other renderers have similar features.

3dsmax's mr Proxy Object in mentalray Renderer

NOTE: All of these tests are done in Max 2011

Lets start with the mortuary robot. And now lets duplicate it 10 times using max's standard instancing. Even to duplicate the object this many times, I need to go into box mode in the max viewport to avoid an OpenGL crash...

Hit render. 30 million faces, memory consumption is at 2 Gigs, render time on my machine was 3min 30 seconds at a res of 600x400. Not horrible, but if you want to fill the room with these things, your computer may explode, especially considering this is just pure geometry, we haven't gotten textures or lights in there yet.

Now lets replace our objects with mr Proxy Objects.

1) First, mr Proxy Objects only work with single objects, so if you have a more complex model with multiple objects, attach the objects together before trying to convert them into a mr Proxy Object. Also, reset the object's xform using the reset xform utility.
2) Go to Create in the command panel, mentalray, mr proxy.
3) Use the align tool to align your mr Proxy Object with your original object.
4) Go to the modify panel. Under Source Object, select your robot model. Now click "Write Object To File" and give it a path. This where it will write out the proxy object, it's a cache file that contains the geometry of your object.
5) Once the object has been written out to the cache file, hide your original geometry (technically, you can delete the original object, since its been saved to the cache file, but since you can't edit a cache file, you may need the original geometry around to edit later on and then re-cache.)
6) Under Display, consider turning up the number of "Viewport Verts" if your preview is too sparse. I turned this one up to 10,000.

7) mr Proxy Objects don't inherit the materials from your original object. So assign your original object's material to the new mr Proxy Object.

Now make 10 instances of your mr Proxy Objects, notice how your viewport doesn't get slow, and you don't need to switch to bounding box view.

Hit render.

30 million faces, memory consumption is at 0.5 Gigs, render time on my machine was 14 seconds. Yes, that's right, the rendertime went from 3.5 minutes to 14 seconds. And a big memory win. Wow, what a difference. Now your dream of 100 robots isn't as far fetched as it used to be.

300 million faces, memory consumption is at 0.6 Gigs, 1200x600, render time on my machine was 22 seconds.

So definitely consider using mr Proxy Objects (or their equivalent in your favorite renderer) the next time you need to render a lot of similar geometry, it'll save you boatloads of time and memory.

This site is ©2013 by Neil Blevins, All rights are reserved.
Back to