FMental Ray Area Lights
An Area Light is a far more physically accurate representation of a light source. Area lights have shape, enabling them to cast multiple rays from points within its shape - producing those characteristic soft, raytraced shadows.
Area Lights have five attributes to control including Type, Sampling, Low Level, Low Sampling and Visible. The main Types (or shapes) of Mental Ray area lights are Rectangle, Disc, Sphere, Cylinder, and User. Sampling controls the quality of the area light and reduces graininess. Increasing the sampling is like adding more lights into the light area. The more lights casting rays, the cleaner the shadows will be, but the slower the renders times. The default of 3 x 3 is fine and is usually set to 5 x 5 when doing a final renders. Low Level is slightly more complicated. Setting a Low Level area value will cause Mental Ray to look at the sum of traced reflections and refractions. If this level exceeds the Low Level value, then the next Low Sampling attribute will override the Sampling field. For example, if Sampling is set to 5 x 5, Low Level is set to 3, and a Low Sampling set to 2 x 2, then once the combined reflection and refraction rays exceed 3, the reflections and refractions of the shadow are sampled at a lower value of 2 x 2. This can greatly increase performance. Visible enables the area light to be seen as a reflection in the object. As a physical light shader is being used, and the color value is so high, it is best to turn this value off as reflection can be too bright. The solution to reflecting a light source is to create a stand-in object for the area light.
The Light's Photon Emission
Global Illumination uses Photons emitted from the light source. These Photons will hit any objects in its path and continue to bounce throughout a scene until the maximum number of reflections is achieved.
Photon emission needs to be turned on for a light, revealing three main attributes: Photon Color, Photon Intensity, and Exponent. Photon Color simply controls the color of the Photons emitted. Photon Intensity controls the amount of light distributed by the light source . Increasing or decreasing the intensity controls the brightness of the scene. Exponent refers to the intensity fall off of the photons. Using a Light Shader will inherently give the photons a falloff. The default value of 2 is physically accurate and indicates a natural inverse-square falloff. Lower values mean less falloff, and photons retain more energy over longer distances making renders appear brighter. Higher values increase the falloff and photons loose energy faster over distance - making renders appear darker. Exponent can be used when physical accuracy isn't a main concern and can be used to quickly brighten or darken a scene.
There are three main areas to cover when setting up the lights: applying a Physical Light Shader, converting the point light to a Mental Ray Area Light, and turning on Emit Photons.
The Decay Rate of the Point Light Attributes could be set to Quadratic to achieve a similar effect to a Physical Light Shader. However, as DGS materials are being used, a more accurate result will be achieved using this shader. To attach a physical light node, select the light and scroll down to the Mental Ray section, Custom Shaders section. Click on the add texture button next to the Light Shader field. A Create Render Node window will appear. Scroll down to the Lights section and select the Physical_light node. The Attribute Editor will switch to display the Physical_light settings. The default values are used.
To convert the Point Light into an Area Light, select the light again, and scroll down to the Area Light section in the Mental Ray section and turn on Area Light. The default Rectangle Type and Sampling is used. Low Level is initially set to 3 to speed up rendering of shadows.
To enable Photon Emission, turn of Emit Photons in the Light's Caustics and Global Illumination section of the Mental Ray section. As this is a white light, the default color is used.
Lastly, turn on Ray Trace Shadows and ensure that both lights in the scene are set-up with the same settings.
Finally, to create the Global Illumination solution, the Mental Ray render is selected in the Render Global Settings. 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. Initial test renders are created at the smaller 320 x 240 resolution.
Fine-tuning the Global Illumination
The initial render from this set-up is too bright. One solution would be to move the lights back - just as moving real lights further away reduces their intensity. Another, perhaps less realistic solution, would be to increase the Exponent value of the light's photons.
Instead, to reduce the brightness in this example, the Photon Intensity of each of the lights is reduced to 2000.
Being able to see the effect of the photons will better enable their control. There are two ways to see how the photons are reacting to the scene. The first is to set the Global Illum Accuracy in the Render Global Settings to 1, producing the following render.
The other way is to preview the photons as dots in the view-port. To do this, in the Render Global Settings, turn on Enable Map Vizualizer, under the Photon Map File field. Render the scene again and a photon map is written to disk and the view-port is scattered with a star-field of white dots. Unlike standard shaders, the effects of Mental Ray materials can't be seen in the view-port and instead objects are colored green. However, when photon visualization is tuned on, the white dots on the green actually help.
It can be seen from the last render that the photon splats are quite large and not covering whole areas. To produce a cleaner render Global Illum Photons of each light are increased. The Global Illum Photons is the number of photons needed to hit an object and be reflected. It represents the number of photons stored in the photon map. The higher the number used the longer the render times - therefore a balance is needed between quality and time.
Here, 100,000 photons have been used, at an accuracy of 1. More photons have produced better results but have increased render times. 50,000 photons could also be used if render time is too slow.
At this point we can now start to mix the intensity of the photons together by increasing the Global Illum Accuracy.
Here the Global Illum Accuracy has been boosted up to 400. The results are now much smoother. As values above 100 are used, the difference in quality begins to be more subtle and render times increase.
When the Global Illum Radius is left at 0, a value is automatically set based on the largest object in the scene. It is used to set the maximum distance at which photons are considered. Adjusting this value can reduce noise by blurring the photons. In this particular case increase the Radius above 1 had no visible effect, and the default automatic value was used.