PDA

View Full Version : Faster Mental Ray renders


TheAtheist
10-18-2006, 12:50 PM
I am in real need of speeding up a mental ray render of a room. Are there any simple things i can do to make it render more quickly without losing too much quality? I am using a Sun and an MR Omni (set to 'diffuse only' within the room) and Final gather to light the scene. Any help would be greatly appreciated?

Thanks in advance

slebed
10-23-2006, 01:45 AM
The speed of mental ray is mainly controlled by your sampling settings, your contrast sampling, and your bsp settings. You might start by doing test renders on a small image and adjust your bsp setting up and down. I usually make a chart with bsp size across and bsp depth down. I then run the same render over and over adjusting the values by 5, up and down, and writing in the render times. You would be surprised by how much you can alter your rendering just by changing those number.

TheAtheist
10-27-2006, 12:40 PM
Cheers for the help slebed, i do have a few questions though:

1. where would i find the contrast sampling and bsp settings?
2. Are the final gather samples settings and Max Depth, Refractions and reflections settings directly proportional? If I increase one do i need to increase the others? I only ask this as I have had issues with black spots appearing in my renders when i increase these settings.

3. I currently only use final gather with a skylight and sometimes have caustics on. Should I be using Global illumination too? I am trying to get a good balance between realistic quality and speed?

Thanks again

KV99
10-27-2006, 02:56 PM
Mental Ray is one of the most versatile rendering systems out there, if not the most versatile rendering system. But it will quite literally suffocate you when you've not suffered through few years of learning it's nooks and cranes.

The thing about mental ray is that it uses basically three things to calculate lighting distrubution in the scene. First is the amazing photon mapping, used by GI and Caustics. Second is Final Gather which distributes lighting per finalgather light points on the scene. They are intended to work together, while they can work well separately and you can definetly get a good result, there are things Final Gather cannot do without photons, like reflective and refractive photons and light intensity the way photons handle it. And then there is ambient occlusion which, though physics purists may disagree, can be used to add shadow details to the scene which would otherwise only be possible through very very high GI and finalgather settings.

If you want a good quality without too long rendering times, Ambient Occlusion is a must. Don't entirely ditch Global Illumination either, throw into a scene couple hundred thousand photons, it can help.

Anyways, with Ambient Occlusion, take into account how much detail you want it to add, For a one or two room interiors I usually don't exceed 8cm distance from AO. Though usually I stick with 4. Ambient Occlusion helps bring out small and tight areas on the image which otherwise would kill you in render settings and sampling.

Also, mental ray is intended to be step-by-step setup and not all at once. First you should set up global illumination, do few test renders on lesser settings, then Ambient Occlusion to bring out subtle details, and then final gather. You don't even have to overdo final gather settings, you can easily deal even with 500 samples thrown out per point. Default settings usually work, since ambient occlusion would deal with your little details.

Next up is samples themselves during rendering. Glossy materials require high samples, and if your scene has materials which have no separate samples setting, then I suggest you render these glossy reflective objects out in Mitchell 64-256 samples in separate pass and composite later on, and the rest in far lesser settings (4-16 recommended).

Next up is of course the question, what are you looking in quality? VRay like visually good looking image that's not so physically accurate yet is good for archviz, or photorealism quality? The more you look for vray like interiors, use more ambient occlusion.

Also don't forget gamma settings and linear workflow. If you aim for photorealism, go through proper gamma materials and rendering output. Post editing for glare and color correction or details also helps.

Anyways, it's quite a long topic, but simple answer would be the easiest way to cut down on rendering time without losing too much quality, is to use less resource intensive settings (anything that has got to do with samples or photons) and more faking methods (like ambient occlusion).

Hope some of what I wrote down help.

TO answer your questions:

1. Where would i find the contrast sampling and bsp settings?
Under Renderer tab in Rendering settings. Set sampling to Mitchell and samples are the top-left corner if I remember right. BSP is below if I remember correctly.

2. Are the final gather samples settings and Max Depth, Refractions and reflections settings directly proportional? If I increase one do i need to increase the others? I only ask this as I have had issues with black spots appearing in my renders when i increase these settings.
I don't exactly know what you mean here, I'd be interested to see those black spots (and know render settings) to better understand what's going on.

3. I currently only use final gather with a skylight and sometimes have caustics on. Should I be using Global illumination too? I am trying to get a good balance between realistic quality and speed?
Global Illumination and Caustics are part of the same thing basically. They are intended to be there together, and they are there together in real life. Global Illumination deals with diffuse light dispersion in the scene, while Caustics deals with reflective/refractive light dispersion in the scene. Caustics however can be only a suble effect in a scene that has not many glass or intense reflective objects thus Caustics is usually turned off to save rendering time.

The best quality-vs-time render could be achieved solely by finalgather and ambient occlusion, but you'll miss out on certain realistic effects GI and Caustics can provide.

Anyways, perhaps this post helped a bit.

TheAtheist
10-27-2006, 03:26 PM
WOW! Thank you so much Kristo, this information will be hugely useful.

How do I use ambient occlusion? Do I map an instance of an ambient/reflective occlusion base shader to the output camera shader? What kind of render times am I likely to expect for a simple model of an interior - say a table, chair, window and door - just a general guide would be helpful? I'm hoping to achieve the VRay kind of look I guess - I have been using VRay renderings as a quality reference.

My rig is:

AMD athlon AM2 X2 4600+ processor
4gig Ram
600gig HDD (2 x 300gig SATA)
nVidia GeForce 7900GT graphics card

Thought this might be helpful.

Again, thank you soooo much, you've answered a number of questions I had about MR!

KV99
10-27-2006, 03:47 PM
WOW! Thank you so much Kristo, this information will be hugely useful.

How do I use ambient occlusion? Do I map an instance of an ambient/reflective occlusion base shader to the output camera shader? What kind of render times am I likely to expect for a simple model of an interior - say a table, chair, window and door - just a general guide would be helpful? I'm hoping to achieve the VRay kind of look I guess - I have been using VRay renderings as a quality reference.

My rig is:

AMD athlon AM2 X2 4600+ processor
4gig Ram
600gig HDD (2 x 300gig SATA)
nVidia GeForce 7900GT graphics card



Are you using 3ds max 9 already? If yes then go to A+D materials which has ambient occlusion as a special effect option nice and easy.

If you're not using 3ds max 9, then I recommend your materials built up from mental ray basic materials, using ambient occlusion map as Surface map. There you can map materials for light areas and dark areas, for simple effect they would basically be same materials with dark being just darker. There's alot of control in your hands for what to really do as a result.

Your system is quite impressive I must say. 3ds max 9 would really take advantage of that. As for rendering time, the question is really what you consider short, and what you consider a long render time? With that system a simple optimized architectural scene made for speed more than quality should not render very long. I'm guessing a 1024x768 would render in a few hours, but there are alot of factors in it, it's not a simple formula which can tell you how long it takes. Alot of factors, and you should restrict yourself only with time when production schedule and deadline force you to. It's too wide a guess, alot of factors. I'd love to work on such a system though :)

My own home system is a 2Ghz with 1Gb of RAM, and my average architectural renders take five to ten hours per rendering for 1024x768 resolution and I'm usually after quality more than speed. But there are scenes which can take twice as that, depending what I emphasize on.

TheAtheist
10-27-2006, 04:27 PM
Ye its a pretty good setup - its my work PC so i didn't have to pay for it thankfully!! :) I'm hoping to upgrade to XP x64 soon, to take advantage of Max 9's 64 bit capabilities.

I haven't used the mental ray shader much yet but will definitely try more from now on.

I have version 9 but haven't installed it yet, I've had too much work on and couldn't take the risk of an installation going wrong!

I am only concerned about render times as I am often restricted by strict deadlines, so just wanted to get an idea of the kind of time frames i should be looking at.

Thanks for your help.

CGTalk Moderation
10-27-2006, 04:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.