MR Basic Final Gather using Image Based Lighting (IBL)
Contents
Introduction
In this introduction to Mental Ray we will explain the use of 'Image based lighting (IBL)' as a light emitting environment. To get a realistic result we use Mental Rays Final Gather.
The IBL represents a light emitting sky. The IBL can be compared to a dome that emits light to the inside. Without a sun an IBL should represent the light emitted by the sky on a clouded day.
Optionally you can add a light source to act as a sun. Alternatively you could choose to use the Physical Sun and Sky environment instead of an IBL and light.
As the sun is approximately 150 million km from earth the rays of light emitted by the sun are practically parallel to each other, therefore we'll use a directional light.
In real life when light hits a surface the illuminated surface becomes a light emitting source as well. This effect is known as indirect illumination. We'll use Final Gather to calculate the indirect illumination.
Render Settings
To set up the mental ray settings open the 'Render Settings' window. Set the 'Render Using' to mental ray.
Make sure the mental ray plug-in is already loaded! Open
Set the render preset to Production:
.
Under the Indirect Lighting tab scroll down to the Final Gathering section. Check Final Gathering and change the Point Interpolation to 100 to get smoother results.
Create Image Based Lighting
To create the IBL go to the Indirect Lighting tab in the Render Settings window. Under the Environment section click the Create button behind Image Based Lighting.
Maya creates a sphere around the scene and the Attribute Editor for the IBL opens. Under the Image Based Lighting Attributes section set the Type to Texture and set the slider for Texture completely to the right. The colour box changes to white.
Before making the first test render, choose in the Render Settings window the Common tab. Scroll down to the Render Options section and make sure to uncheck Enable Default Light.
Now do a test render!
For easy comparison between different settings the 'Keep Image' and 'Remove Image' buttons in the render view are useful options. After clicking on the 'Keep Image' button a scrollbar appears at the bottom of the Render View window. Use this scrollbar to navigate through the different images.
Testing different 'Texture'-colors for the IBL shows different results. To reselect the IBL click on the sphere around your scene in the viewport or go to: . In Hypershade click on the 'Lights' tab and select the IBL.
Making the color darker gives an IBL that emits less light, thus making the rendered object appear darker. Giving the IBL a light blue texture results in an IBL emitting light blue light, thus making the rendered object appear slightly blue. As the IBL texture is changed the IBL in the background also changes color.
If this background colour is undesired, the image can be saved as a Photoshop file (*.psd) or a TIFF (*.tif). When the Photoshop image is opened in an Adobe program the background is transparent, giving the opportunity to place another background. The background in a TIFF file can be changed by using an alpha channel. To learn more about alpha channels check the Alpha channel explanation.
Primary Diffuse Scale
If a white background is desired, but the white IBL texture settings results into an image that is too bright, the slider behind the Primary Diffuse Scale under the Final Gathering section can be used to darken the rendered object without changing the background colour.
Testing different 'Scale'-colours for the Primary Diffuse Scale shows different results. Making the colour darker lowers the intensity of the final gather rays, thus making the rendered object appear darker, but leaving the background white.
Changing the Primary Diffuse Scale to a light blue colour results in final gather rays of light blue light, thus making the rendered object appear slightly blue, but again leaving the background white.
Every scene requires different 'IBL texture' or 'Primary Diffuse Scale' settings. Testing different settings until a desired setting is found, is the only way to get the right settings for your scene. As a sun is still going to be added, a slightly darker image in this phase might enable a bit more contrast after adding a sun. Just make sure that the desired detail in the dark areas is visible in this phase.
If a non-white background is desired, the image can be saved as a Photoshop file (*.psd) or a TIFF (*.tif). When the Photoshop image is opened in an Adobe program the background is transparent, giving the opportunity to place another background. The background in a TIFF file can be changed by using an alpha channel. To learn more about alpha channels check the Alpha channel explanation.
Create a Directional Light
To add a 'Directional Light' go to:
. Rotate and move the directional light until a desired direction is found. (An easy way to position your 'Directional Light' is to select the 'Directional Light' in your view panel and select in the view panel menu: . By navigating through your scene you can position your 'Directional Light').To edit the 'Directional Light' settings select the light and and enter the 'Attribute Editor'. At first leave the Intensity at 1.00 and under the Shadows section make sure Use Ray Trace Shadows is checked. Now do a test render!
Changing the 'Intensity' of the light will give different results. Use a low 'Intensity' for softer contrast or a higher 'Intensity' for brighter spots.
The desired end result might still require several changes to either the 'Image Based Lighting' / 'Final Gather' settings or the 'Directional Light' settings.
To learn more about mental ray rendering check the rendering mental ray final gather for interior rendering.