Global Illumination and Final Gather in Mental Ray for Maya
Currently, one of the best ways of achieving photo-realistic imagery is to render using Mental Ray for Maya. Mental Ray offers a Global Illumination and Final Gather solution, which when combined, simulates the physics of real world lighting effects. Now, for the first time in 3d, lighting techniques used by photographers and filmmakers can be applied to computer graphics. The following is a guide for setting up Global Illumination and Final Gather using Mental Ray for Maya. It is based on notes from the web, Maya’s Help manual and good-old fashion experimentation.
The first thing I always like to do is develop some sort of plan. As they say, ‘If you don’t know where you’re going, you probably won’t get there.’ Here is a quick set-up sketch I did in Photoshop. I have included lighting placement and some material information.
The basic idea from the sketch was modelled and setup. Maya has four basic shaders to choose from: Lambert, Blinn, Phong or Anisotropic. Lambert has no specular highlights, Blinn has soft specular highlights, Phong has hard specular highlights and Anisotropic has irregular highlights. Based on the sketch, the first material will be a white, matte background that has no shine. A basic Lambert material was used with color set to an off white (very light grey) and diffuse increased above 0.8. Next is the sphere, which will be used as a prop to study the effects of illumination. A Phong shader was used to give it a highly polished, chrome like appearance, so as to be able to better study how the light rays are being traced. The last material is the Negative fill. These are being used like large barn doors, stopping the light from spilling. To suck the light from the scene, a Lambert material was again used, with both the color and diffuse set to black.
This is the final scene set-up. Two spot-lights have been added either side of the negative fill and are pointed at the wall. Their light will bounce of the white wall, to create a soft large light, illuminating the back of the ball. Any spill from the lights is being stopped by the black boards. Later the lights will be converted to Mental Ray area lights to create softer shadows.
As the sphere subject is not receiving any direct illumination a reflector board has been added. It will catch reflected light from the screen and illuminate the sphere from the front. The same material used for the background has been applied to the reflector board.
A standard hardware render produces an almost black image as most of the illumination is to be achieved from bouncing light.
The first part involves setting up the Global Illumination. Once a good photon map has been created, then Final Gathering will be added to increase indirect illumination. Global Illumination using Mental Ray, requires the adjustment of two main sections: the light’s attributes and the Render Globals Settings.
Both light’s attributes are first set-up. To get realistic lighting behaviour,
- the decay rate is set to Quadratic and
- the light intensity is initially set to 120.
- Raytraced shadows are turn on in the Shadow attributes section.
- Lastly, in the Mental Ray section, the light is set to emit photons.
To create the Global Illumination solution, the Mental Ray render is selected in the Render Globals Settings, and in the ‘mental ray’ tab, the Quality Preset is set to Draft and Global Illumination is turn on in the Caustics and Global Illumination section.
Here the initial render is created. The Negative Fill boards were adjusted to give a more even lighting. Both the light's intensity was reduced by half down to 60 - giving a total combined intensity of 120. The spot lighting effect was also reduced by increasing the Penumbra Angle to 10.
The next stage is to fine tune the Global Illumination. To adjust the overall brightness of the scene, the light's Exponent value and Photon Intensity attributes are adjusted. Here is Maya Help manual definition for the Exponent value:
This is similar to decay -- the intensity increases as the value decreases. To increase the chances that indirect light will reach a greater distance, decrease the value.
Visible noise can occur with values less than 1. The default (2) simulates natural (quadratic) decay, but violates the conservation-of-energy law (that happens in the natural world), so bright spots from distant light sources could occur in unexpected locations.
Phrased another way, higher Exponent values will decrease brightness. Increments of 0.1 through to 3.5 will gradually decrease the brightness.
This is the same render with an Exponent value of 3. The image is much duller.