MR Rendering a daylight interior scene (using FG)

From TOI-Pedia


Introduction

This tutorial covers rendering an interior scene lit by daylight, using Mental Ray Final Gather.

Prerequisites

We assume you have a scene with your geometry. Please make sure you remove all lights before you start to make your light setup. It's recommended to start with the default Render Settings.

When using Mental Ray Final Gather don't use additional lights to simulate diffuse/ambient light as you would do with Software or Vector rendering!


Preparation

Load your scene and open the Render Settings. Set 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.

In the Common tab, set the Image size to 320x240 or 640x480 for fast preview rendering.

MR RenderSettings AntiAliasing Sampling.jpg

In the Mental Ray tab, go to Anti-Aliasing Quality. Make sure Sampling mode is set to Adaptive Sampling and set the Max Sample Level to 1 for medium image quality. You may choose to set Multi-Pixel Filter to triangle.

In the Final Gathering section, enable Final Gathering. The settings will be covered later.

There is a shortcut to enable Final Gather, located at the top of the Mental Ray tab in the Render Settings, in the section Rendering features.


Choosing a setup for your environment and sunlight

There are two main options: Image Based Lighting (IBL) and the Physical Sun and Sky. Please refer to the corresponding tutorial to learn how to make your setup. Afterwards you can return to this tutorial to continue.

Image Based Lighting

This would involve creating and IBL sky-dome and directional light for the sunlight. This is covered in detail in MR Basic Final Gather using Image Based Lighting (IBL).

Pro
more control to create your own style
Con
more work to set up, a little more complex to control

Physical Sun and Sky

Mental Ray has a built-in Physical Sun ans Sky system which is physically accurate, provided you are using MIA materials. Using the Physical Sky is covered in MR Using the Physical Sun and Sky environment.

Pro
easy to set up and control. Physically accurate
Con
harder to get your own style


Initial Final Gather Settings

Make sure Final Gathering is enabled.

Go to the Final Gathering section.

Accuracy
set the accuracy to 30 for initial renderings
Point Density
set the Point Density to 0.6
Point Interpolation
set the Point Interpolation to 40


MR FG exterior initial settings.jpg


Refer to the Final Gather page for details on these settings. Note that these settings are for preview renderings. The quality will probably be mediocre, but that is something to solve later on. Preview settings should be sufficient to assess the light setup.


Diffuse Bounces

When rendering interior scenes, the amount of light from the outside that reaches the interior is very little in most cases (depending on your geometry). To get proper results, you need the light to 'bounce' of diffuse surfaces.

Mental Ray offers 1 diffuse bounce per default [1]. Depending on your scene you may very well need more diffuse bounces.

Go to your Render Settings, Mental Ray tab. Open the Final Gathering section, then open the Final Gathering Options sub-section.

Mental Ray-Final Gathering Options.jpg

Set Secondary Diffuse Bounces to 1. This will enable one extra bounce for diffuse light calculations.

Re-render and determine the effect. In some cases this will yield satisfactory results. In most cases however, more bounces may be needed. If you're using an older version of Maya (pre 2009), refer to Mental Ray Diffuse Bounces in older versions.

Go back to the Render Settings. In the Final Gathering Options section, increase the Secondary diffuse Bounces (in steps of one).

Additionally open the Final Gathering Tracing section and make sure the Max Trace Depth is at least equal to the number of Secondary Diffuse Bounces you've set.


Re-render and determine the difference with the previous settings.

Diffuse Bounces Optimization

One would think that more bounces will always be better. Physically: yes. But there is a major cost to high numbers of diffuse bounces: they are very expensive. IE: they take a lot of rendering time. The rendering time will increase exponentially for every extra bounce. So it's important to optimize. Determine the effect of increasing the bounces. If the effect is small, lower the settings to the previous values.

Typical values are (remember: these are just pointers, values may very well deviate substantial for your own scene):

Interior, >80% open
Secondary Diffuse bounces disabled (default FG rendering)
Interior, 60-80% open
SDB 1
Interior, 40-60% open
SDB 2-3
Interior, 10-40% open
SDB >3

Tuning the image

Once you've set up your Final Gather Diffuse Bounces, chances are your image is still to dark. If your image is too dark, you need to tune your settings. It depends on the type of environment you're using. Refer to the corresponding tutorials for details.

Image Based Lighting

If your image is too bright or dark, you should change the IBL parameters and/or the Final Gather scale. This is explained in the IBL tutorial.

Physical Sun and Sky

If your image is too bright or dark, you should change the exposure settings of your camera. Don't change the Sun or Sky intensity or Final Gather scale!. The exposure of the camera is controlled by the mia_exposure_control node, also known as Tone Mapper. Refer to the Physical Sun and Sky tutorial.


Tuning the Render Settings for better quality

Increase the image resolution to your final resolution or a resolution one step smaller.


In the Anti-Aliasing Quality section:

Anti-aliasing Contrast
set the Anti-aliasing Contrast to 0.05
Max Sample Level
try to leave it at 1; only set the Max Sample Level to 2 for really high quality or when you have very fine details in textures, causing a moire effect.


In the Multi-Pixel Filtering sub-section:

Filter
set the Filter to either Gauss (smooth), Mitchell (sharp) or Lanczos (sharper)

For detail on Anti-Aliasing settings, refer to Anti Aliasing Settings.


In the Final Gathering section.

Accuracy
increase the accuracy when needed. Increase in steps of 50-100, start at 100. Values higher than 1000 should generally not be needed.
Point Density
set the Point Density to 0.8 or 1.0
Point Interpolation
set the Point Interpolation to about half or 2/3rds of your Accuracy.

If you have reflective materials in your scene, you may need to set Filter in the Final Gather Options to 1. Only if you see some strange bright spots in your rendering, set Filter to 1. otherwise leave it at 0. Be careful though: in low-light scenes this may filter out the little light that still gets in, resulting in a very dark image. Don't use Filter in that case (increase the Accuracy)

References

  1. See: Final Gather theory
Personal tools
Actions
Navigation
Tools