Rendering Mental Ray: Global Illumination

From TOI-Pedia


Mental Ray's Global Illumination uses photons to calculate light. This can yield very realistic results as it is very close to how light physically behaves. In Maya you can configure lights to emit photons and materials (shaders) to collect and calculate photons. In an ideal situation, especially when rendering interior scenes, would be to use both Global Illumination and Final Gather. Combining both takes some experience which both methods however. So it's not recommended for novice Mental Ray users.


Global Illumination uses photons to calculate the lighting in the scene, opposed to final gather, which uses color of the surrounding surfaces and background.

The default Maya render engine, doesn't calculate light reflecting from surfaces. Mental Ray can and will calculate the effect of light bouncing off other surfaces. One technique to accomplish this, is Global Illumination. This uses photons that are emitted from any given light source and received by your geometry.

A photon in this case, is a particle that contains light color and intensity information. When combining this with the information in the materials (shaders), Mental Ray can calculate the effect of lighting in your scene. Photons will bounce several times before they 'die', spreading light across your scene.

It's important to realize that when rendering using Global Illumination, Mental Ray also still calculates the Direct Illumination from each light. Global Illumination (Photon tracing) is only used for the Indirect Illumination. So you'll have two main settings for each light: Direct Illumination (controlled by the general intensity setting) and Indirect Illumination (controlled by the Mental Ray Global Illumination settings).

Direct Illumination only
Indirect Illumination only
Direct and Indirect Illumination combined

The goal and trick is to keep both Direct and Indirect Illumination in sync. Specialized light shaders, such as the Physical Light shader, can help you do that. But it also offers a great opportunity to create your own, special look and effects which don't necessarily need to be realistic...


Light types

In theory, you can use any light type in Maya. From experience, the Arealight yield the best results. Spotlight and Pointlight can also be used, but are point light sources, so they have very sharp shadows. It's possible to use multiple lights within one scene; types may be mixed.

When using Area Lights, it's highly recommended to enable Use Light Shape in the Mental Ray - Area Light section of the Attribute editor of the arealight:

MR arealight use lightshape.jpg


Mental Ray uses Maya's standard raytrace shadows. Be sure to enable Use Ray Trace Shadows.

Emitting photons

Each light that's used for Global Illumination calculations, should emit a certain amount of photons. These photons 'carry' the light (information) across your scene. When a photon hits a surface, it will yield a certain part of it's light energy to the surface, depending on the surface's material properties, hereby illuminating the surface. The remaining part will be reflected and transferred to elsewhere in your scene. In this process the color information of the photon may be changed. The image below shows how photons are emitted and cast throughout the scene by the 5 spotlights.

Photons emitted from the spotlights

Light properties

The number of emitted photons, the color and energy per photon can be configured per light.

Locate the settings for Caustic and Global Illumination in the attributes of the light (attribute editor).

By enabling Emit photons, the light will start to emit photons and thus being used for Global Illumination calculations. Note that this won't have any effect if Global Illumination is not enabled in the Render Settings.

Mental Ray Light Properties

Photon Color
color of each emitted photon. Default is white, regardless of the color that is set for the light. If you want the photons to be the same as the light color, you must set the color here as well.
Photon Intensity
The total amount of light 'energy' for the light. Each photon will take a fraction of this energy. This determines the amount of light that is added into your scene. The exact value will vary for each scene.
There's a nasty bug in Maya 2011 that causes the photon intensity to stay the same if you change it numerically. All seems fine, but as soon as you deselect the light and go back to its attributes, you'll see the photon intensity is back at its original value (probably the default of 8000) again.

Solution: Use the slider to set the value. This bug has been fixed in Maya 2012.
Determines the exponent of the rate at which the light energy carried by a photon will decay by distance travelled by the photon. A value of 2 is close to reality.
Global Illumination Photons
Sets the amount of photons that are to be received by the geometry in your scene from this particular light. When set to, for example, 10000, the light will continue to emit photons until it yields 10000 received photons. In ideal conditions, it will emit 10000 photons (each photon is received by geometry). But it might get out of hand when, for instance, a spotlight emits photons away from your geometry and none of the photons are received. The light will emit photons forever. So pay close attention when positioning lights.

The higher you set this value, the better the result will be, but also the longer it will take to render. 10000 seems to be a reasonable setting to start with, adjusting this when needed. Depending on the size of the render, values may increase up to millions of photons.
Notice: you can only adjust this value, when Global Illuminations has been enabled in the Render Settings!

Mr gi not enough photons.jpg

When the number photons is set too low, you'll get clearly visible spots and circles.


Mental Ray can use the default Maya materials. However it's recommended to use the Mental Images Architectural (MIA) shaders to get physically accurate results.

In Maya < 8.0 you'll need to add a Mental Ray 'node' to each material to make it work for Global Illumination. Using Maya 2008 or newer is highly recommended

Render settings

Mental Ray Indirect Lighting tab: Global Illumination

Activate Global Illumination to use the Global Illumination render option.

Number of photons to be used to determine the illumination for each point in the render (same for all point in the render). A higher number will increase render time, but also yields smoother results. If you set the accuracy too high for the total number of photons, 'light leaks' may appear; typically keep the accuracy below 1/1.000th - 1/10.000th of the total number of photons in your scene.
The scale used when interpreting the indirect illumination values from Global Illumination. An easy way the increase or decrease the contribution of indirect illumination from photons in your scene, but not recommended to change the default of 1.0
Global Illumination Radius
Determines the radius for the Accuracy setting. 0 let's Maya determine the radius, based on the scene size. If the results are too noisy, increase (try steps of 1) this value. This might blur the result; in that case, instead, increase the number of photons emitted by your lights.
Merge Distance
Normally this isn't a setting that you need to change. It can help to reduce the memory Maya needs to store photon information. All photons within this (world space) distance of each other are merged into a single value. Useful for scenes with uneven photon distribution.

Photon tracing

Photon Reflections
Maximum number of reflections for each photon.
Photon Refractions
maximum number of refractions (through transparent objects) for each photon.
Max Photon Depth
Maximum number of reflections + refractions for each photon.

Mental Ray Quality tab: Anti-Aliasing

The quality of the rendered image, apart from the lighting settings for Global Illumination, is mainly determined by the Anti-Aliasing quality. This is a separate topic.

Back to Maya

Back to Lighting and rendering

Back to Mental ray rendering

Personal tools