Simulating Global/indirect Illumination with Mental Ray

Mental ray, a product of the Mental images, Inc, is the first rendering engine, which simulates the physically correction of the real light and reaction of surfaces to light. Together with Renderman, by PIXAR, mental ray is recognized as an industry-standard rendering software; and has been a major contribution to world-wide design visualization and feature film, including Oscar-awarded winning movie Spider-man for the best visual effect. Mental ray has been integrated into Softimage|3D and Softimage|XSI, Autodesk 3ds max, Alias Maya, Side Effects Software's Houdini 5, SolidWorks PhotoWorks 2, and Dassault Système's CATIA V4, V5 products, only in 3ds Max 6+. In the real world, light energy bounced off from one surface to another, causing some received-light surfaces to be secondary emitted-light ones. That's why illumination would be more even and interesting (in some senses). In 3d graphics, however, it does not happen by default, and users have to tell the software to simulate a system of bounced lighting. There are already two methods of generating this in Max, which are Light Tracer and radiosity. Mental ray is a newly-added one, based on different technology.

Interior scene

This is an imaginary cartoon-like space which shows a group of teapot trying to hide from the another. The renderer is currently set up to be Default Scanline. Also, the resolution is set up to 400x565 for testing/learning purposes. Lighting system includes one Photometric Area Light.

1. Hit render (F9) to start evaluating the render.

The scene generally looks boring as it is very shadowy and unrealistic.

2. Menu bar/ Rendering/ Render... OR hit F10. First, In the Render Scene window, scroll all the way down to the bottom and Open Assign Renderer roll-out. Second, click on the"..." button next the Default Scanline Renderer words,
then choose Mental Ray. You will immediately notice the change in the window layout. The two tab, Advanced Lighting and Raytracer, are replaced by Indirect Illumination and Processing. For the purpose of this tutorial, I will only talk about some of attributes in the Indirect Illumination tab.

3. In the Indirect Illumination tab, Global Illumination group: - check Enable, leave the Photons: 500 Hit render (F9)

The scene now is filled with a number of photons, carrying a lot of energy. Their color assumes the color of the last surface they hit. The size of these photons is based on the scene size (normally about 10% of the scene with Maxium Sampling Radius unchecked)..

4. In the Light Properties group: Increase the Average GI Photons per Light to: 20,000 Hit render (F9)

5. Increase the Average GI Photons per Light to: 50,000 Hit render (F9)

The photons start to blend.

6. Increase the Average GI Photons per Light to: 100,000 Hit render (F9)

7. Go up to Global Illumination group and check Maxium Sampling Radius to 20. This helps blending those photons. Hit render (F9)

As you can see, the GI effect starts to be more visible. However, it leaves the artefacts because of the photon granularity. The photons alone cannot be enough, so, we will have to use Final Gather to fine-tune the image, and take the effect of the Skylight. Mental ray's Final Gather works the same way with Regather in radiosity. It samples the scene rendered pixel, or averages between sparse samples.



8. In Final Gather group:
- Check Enable
- Set Samples to: 300 (1000 by default, but we need only 300 for testing purpose)

Hit render (F9)

Global Illumination effect is now clearly visible, contributed by the Skylight. But, now, we have a problem. First, somewhere in the scene look a bit dark, as should not be. Second, the artefacts have not really been fixed; and shift to the shadow.

10. We are now safe to move. So, Uncheck Preview (No Precalculations) and increase the Samples to 50. Also, check Radius and Min. Radius and adjust the value as shown.

Hit render (F9) .

The color bleed effect is now also visible, you can see it where those teapots on the fore-ground floor are. However, it seems like we need more Final Gather samples to finalize this render

11. Increase Final Gather Samples to 150

12. Here is the high-res sum-up.

Some areas look overbright and has mirror artifact, but it is up to you to tweak more as we are only explementing the workflow. So, At this point, you should have an idea of rendering with Mental ray

Exterior scene

This is an imaginary cartoon-like space which shows a group of teapot trying to hide from the another. The renderer is currently set up to be Default Scanline. Also, the resolution is set up to 400x565 for testing/learning purposes. Lighting system includes one mr Area Spot to simulate the Sunlight.

1. Ok, so, the same start we have here.

2. Now, Go straight down to Final Gather group and check Enable:

- Decrease Samples to 20 (to those people I know, they leave it 1000 and
render. Please dont as it is a big oh-my-god).

- Check Preview (No Precalculations) to test for now as the render appears
patchy, but no FG calculations.

- Also, In the Trace Depth group, Increase Max. Bounces to 1. This is an
alternative of Photo Mapping, however, it is less accurate.

Hit render (F9)

Ok, not too bad.

3. We are on the right track. So:

- Uncheck the Preview (No Calculations)
- Push the Samples to 50
- and Max. Bources to 3

Hit render (F9).

We can now start to get rid of the artifacts.

4. Check Radius and Min. Radius. So, we can tweak these as we wish.

Hit render (F9)

5. With the value of Radius and Min. Radius as following, the render shows some improvements.

Hit render (F9).

6. To finalise, increase the Samples to 100.

Hit render (F9) .

7. Here are our final high-res render

Same scence, different light direction.

Happy rendering!

Fig. 02

Fig. 02

Fetching comments...

Post a comment