MR Basic Final Gather using Image Based Lighting (IBL)

From TOI-Pedia

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.


ExplainIBL.jpg


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.

If the Mental Ray option is not shown in the pull-down menu of the Render Settings, go to: Window » Settings/Preferences » Plug-in Manager and make sure the check-boxes for Mayatomr.mll (Mayatomr.bundle on Mac) are checked.
Since Maya 2016 a major overhaul has been made to the user interface. This also affects the standard tabs in the Render Settings of mental ray. It is possible to change it to legacy tabs similar to Maya 2015 and earlier.

Make sure the mental ray plug-in is already loaded! Open Windows » Settings/Preference » Preferences and choose Rendering in the Categories panel. Check the boxes Show Maya Legacy Passes and Use Legacy Render Settings and click Save.

Reload the mental ray plug-in or restart Maya to see the changes.

Set the render preset to Production: Presets » Load Preset » Production.

MR RenderSettings Production.png


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.

MR RenderSettings FG PI 100.png


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.

MR IBLCreate.png


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.

MR AttrEdit IBL.png


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.

MR DefaultLight off.png


Now do a test render!

RenderStart.jpg


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.

Maya KeepImage.png


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: Windows » Rendering Editors » Hypershade. 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.


DifferenceIBL.jpg


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.

MR RenderSettings FG PI 100.png


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.

DifferenceFinalGather.jpg


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.


FinalGatherScaleEnd.jpg

Create a Directional Light

To add a 'Directional Light' go to: Create » Lights » Directional Light. 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: Panels » Look Through Selected. 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!

DirLightSettings2.jpg


Changing the 'Intensity' of the light will give different results. Use a low 'Intensity' for softer contrast or a higher 'Intensity' for brighter spots.

DifferenceDirLight.jpg


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.

Personal tools
Actions
Navigation
Tools