Mental Ray Render Optimisation
This tutorial was created to document my procedure for optimising the render settings in mental ray to create a scene that renders quickly and most importantly looks good. There are 3 key lighting settings that should be looked at to produce a good result, these key setting are Global Illumination (GI), Final Gather (FG) and Ambient Occlusion (AO).
The current 3ds max scene you can see is based on the Jubilee Chapel by Richard Meier and was created for a previous project. The model in this scene is complex but the lighting and materials are set up very simply. The lighting in the scene is from a MR sun and sky with soft shadows, and the materials are Arch & Design with the matte finish template and a diffuse colour.
The non-optimised to final optimised render comparison
Move the slider in the flash file above to see the comparison between a non-optimised render (FG - High, GI - None, AO - None) which took 21 minutes to complete vs an optimised render (FG - Low, GI - Low, AO - on) which took 5 and a half minutes to render.
Global Illumination (GI)
The first step is to set up Global Illumination (GI), this will provide the scene with a solid fill of light. When doing this you should turn off FG and any AO in your materials, this will allow you to see your changes more easily and make preview renders quicker.
On the Render Dialog under the Indirect Illumination tab, turn on GI. It is important to try various different settings until you find the right trade off between speed and quality for your scene because no one set of values will work for every scene. Below is an explanation for what each setting does.
- Maximum Num. Photons per Sample:
- Increasing this value makes global illumination less noisy but also more blurry. The larger the Samples value, the greater the rendering time. You should start with a low value like 100 and move up until you get a smooth result.
- Maximum Sampling Radius:
- When on, the numeric value sets the size of photons. When off, each photon is calculated to be 1/10 of the radius of the full scene. In most cases you will not need to turn this on.
- Merge Nearby Photons:
- Specify the distance threshold below which mental ray merges photons together. Larger values result is a smoother, less-detailed photon map that uses significantly less memory.
- Optimize for Final Gather:
- When on, the GI will take longer to compute but can greatly reduce the overall render time.

The Global Illumination settings for the example render
Final Gather (FG)
Next we will set up Final Gather (FG), this will add to the fill of light that we created with the GI and provide more detail to the scene. When doing this you should keep your previously configured GI on, because the FG will be adding on to this result.
On the Render Dialog under the Indirect Illumination tab, turn on Final Gather. FG is useful for adding lighting detail to the scene but most small details will be added in the next step with AO. Below is an explanation for what each setting does.
- Initial FG Point Density:
- Increasing this value increases the density (and thus the render time) of final gather points in the image. This parameter is useful for solving geometry problems; for example with artefacts near edges or corners. Try as low as possible value and increase this until you get an acceptable result, these artefacts are normally very easy to Photoshop out if small in quantity.
- Rays per FG Point:
- Sets how many rays are used to compute indirect illumination in a final gather solution. Increasing this value makes global illumination less noisy, but also increases rendering time
- Interpolate Over Num. FG Points:
- Controls the number of final gather points that are used for an image sample. It is useful for solving noise problems and getting smoother results. The larger the value the smoother the result but this decreases detail.
- Diffuse Bounces:
- Sets the number of ray bounces mental ray calculates on diffuse light. Increasing this value increases render time.
- Weight:
- Controls the relative contribution of the diffuse bounces to the final gather solution. Scales from 0 (using no diffuse bounces) to 1 (full diffuse bounces). In most cases a value of 1 is sufficient.

The Final Gather settings for the example render
Ambient Occlusion (AO)
Finally we will setup Ambient Occlusion (AO), this will add shadow detail to the scene, allowing small details to stand out more. When doing this you should keep your previously configured GI and FG on. AO is very simple to setup and use, it is supported by most pro materials and all Arch and Design materials.
On the Materials Dialog in the Special effects rollout turn on AO, you will need to do this separately for each material. Below is an explanation for what each setting does.
- Samples:
- Higher values yield smoother results but render more slowly, while lower values render faster but look grainier. Values in the range 16–64 cover most situations.
- Max Distance:
- Defines the radius within which mental ray looks for occluding objects. Smaller values restrict the AO effect to small crevices only but are much faster to render. I have found larger values like 3000mm provide a great level of detail although render much slower.
- Use Colour from Other Mats (Exact AO):
- When on, derives the AO colouring from surrounding materials, for more accurate overall results (also known as colour bleeding). In most cases it is not needed and greatly increases the AO calculation time. Is useful in situations where you have glowing materials next to dark objects, allows the AO to take into account the materials brightness.

The Ambient Occlusion settings for the example render
Comparison between a render with and without Ambient Occlusion.
Final Comments
The most important thing is to understand what each setting does and to turn it off if your scene does not need it. Reflective materials also greatly increase render time so unless the material is close to the camera it is best to stay with basic matte materials with a diffuse colour.
The picture below was rendered at 1280px x 720px in 21 minutes using all the settings discussed in this tutorial. This is a very good time for such a high resolution render of a complex model, and shows your production render does not need to take hours.
The final image rendered in high definition | full Resolution image
6 Comments
Nice man, this should help out a lot of folks. Your little flash ram–player is pretty sweet, how easy would it be to put into any site?
5:52 AM
18 May 2009
Jake
Cheers, this method works well for me hopefully it will for everyone else.
At the moment it would go very easy into other sites, but the problem is the images are embed into the flash app so you would need to open the .fla file, swap the images and recompile it for every different set of images you want in it. But soon i think i will do some updates and make it import the images and text from some XML in the page.
Check back soon for updates!
6:09 AM
18 May 2009
Pieter Vanderwerff
That would be very spiffy, something like the pbEmbedFlash Wordpress plugin would be awesome, where you could just put in the urls of two images, and possibly the text for each side. Just an idea.. You’re the expert!
7:34 AM
18 May 2009
Jake
Yeah i think that would work very well, although my blog is not Wordpress so it wouldn’t work so well for me but I’ll look into it.
8:31 AM
18 May 2009
Pieter Vanderwerff
Hey there again,
No news on the BoundingShape front, I haven’t really had time to sit down with it. I’ve been doing some GIS stuff.
I’ve now been asked to create a flash application that is exactly the same as your image comparer.
Unfortunately, I haven’t had much luck in finding the information I need. Would it be possible to get a peek at the source code for yours? Or at least a bump in the right direction?
Harrison
12:18 PM
04 Jun 2009
Harrison
Yeah for sure, check back maybe tomorrow and i will post the .fla file and say how to use it. it was very easy to make and i am looking at making a flex version of it that will import the image from flashvars with an image path. but i just havent got round to it yet.
10:51 PM
04 Jun 2009
Pieter Vanderwerff
Write a Comment
Name and Email are required. Basic html is supported in comments.
Name
Email
Website
Comment