Page 1 of 1

Mental Ray Instancing

Posted: Thu Nov 29, 2007 12:36 am
by misterasset
I really hate the other CG forums, I've been spoiled by this one, and Mental Ray doesn't have its own.

Does Mental Ray support instancing from inside 3DS Max? I can't figure out how. We have a scene with alot of trees and it keeps crashing while trying to render (my comments about how "Maxwell could do this now" aren't helping my boss's fustration).

Any help would be greatly appreciated.

Posted: Thu Nov 29, 2007 1:03 am
by Bogdan Coroi
Of course Mental Ray supports instancing. It's transparent for the user. It simply render instanced geometry if there is any in the scene AND can be used as instanced geometry, because some modifiers like Compound Scatter applied on some geometry doesn't produce instanced geometry.
You can check what I've just said by a simple test. Make an instance of a teapot, set your render to Mental Ray and in the render options (Processing Tab, Translator Options rollup Export to .mi group), render the scene to a .mi file. Open the .mi file using Notepad or such, and look for your instanced teapot name (that would be Teapot02 if you kept the default names) and you'll find it on an instance group. Render the same scene but with 2 normal teapots and compare the .mi files.

My guess is that your scene contains some alien modifier with some instanced geometry that Mental Ray can't translate as instanced geometry and you run out of RAM trying to export it as normal geometry. Or simply the alien modifier crashes Mental Ray. Which isn't a big surprise in 3dsmax's world. :)

Just my 2 cents.

PS. Btw, Scanline Renderer or Maxwell don't crash when trying to render the scene? :)

Posted: Thu Nov 29, 2007 1:10 am
by JCAddy
I don't think Mental Ray supports true instancing.

If you're thinking of like Vray instances or the Vray mesh option than the answer is NO mental ray can't do this.

Sure you can instance an object in your scene so that if you make a change to it it will change the other object as well, but it's not a memory saving instancing feature.

Posted: Thu Nov 29, 2007 12:13 pm
by martgreg
lol i was just gonna post a question about the VRAY and MENTAL RAY..

so i am going to hop into this thread and save some server space :)

what are the differences between them ??

Posted: Thu Nov 29, 2007 4:46 pm
by misterasset
Bogdan Coroi wrote:Of course Mental Ray supports instancing. It's transparent for the user. It simply render instanced geometry if there is any in the scene AND can be used as instanced geometry, because some modifiers like Compound Scatter applied on some geometry doesn't produce instanced geometry.

Scanline Renderer or Maxwell don't crash when trying to render the scene? :)
When you say "instanced" are we talking about the same "instancing" as Maxwell can do? They are Xfrog trees that are all reference/instances of each other. They have been moved by hand into the correct locations so no modifiers are used. I tried this with a simple box that I cranked up to 6000 polys and I copyed (instance) it to a new location and the rendering window said the scene now had 12000 polys. Perhaps I'm missing something.

Haven't tried Scanline Renderer on it and my boss is pretty anti-Maxwell. He claims it takes too long, even though by the time he runs photon maps, final gather maps, and a small enough edge length to make the displaced grass look decent, they are more than comparable.
JCAddy wrote:Sure you can instance an object in your scene so that if you make a change to it it will change the other object as well, but it's not a memory saving instancing feature.
That's what I was afraid of.

Posted: Thu Nov 29, 2007 6:05 pm
by rivoli
JCAddy wrote: Sure you can instance an object in your scene so that if you make a change to it it will change the other object as well, but it's not a memory saving instancing feature.
not really, as bogdan says mental ray definitely supports instanced geometry. it's very easy to find out, just try rendering a scene with loads of copied objects and take a look at your memory usage, then re render the same scene but with instances this time. there should be quite a difference, especially with large amount of geometry.
I just did a quick comparison, a scene with 1000 copies of the same heavy object used roughly 1 gig of memory, 1000 instances not even 300 megs.

the latest vray build does the same, you no longer have to export and load proxies, just like maxwell it automatically recognizes instanced geometry and treat it dynamically.