Mental Ray – Final Gather

Category : Featured, Intermediate, Written · by Jan 4th, 2010

header

In this tutorial we are going to look at one of the indirect illumination models available in mental ray.

Final Gather

What is indirect illumination? For that matter what is direct illumination?

In 3D computer graphics, direct illumination is any illumination an object recieves directly from a light source. If you have a spot light aimed at your object and it is illuminating it. That object is recieving direct illumination from that light source. (see image below)

spotAloneCrop

Indirect illumination is illumination an object recieves indirectly. In real life, a light photon doesn’t simply come from a source and hit an object and stop. It bounces off of that object and travels around a given space until it’s energy runs out. Think of an overcast day. The clouds completely block the suns "direct" illumination from hitting the ground, but we can still see there is light outside. However, the light is dimmer, more even and shadows are extremely soft. (see photos below)

direct
Direct Illumination
Example

indirect
Indirect Illumination Example

So, how do we do this in computer graphics? More specifically in Maya? More specifically with Mental Ray?

I am glad you asked.

As stated above one of the tools we have for achieving this is called "Final Gather."

Lets get started shall we!

First we need to Acquire a model to work on.

  1. 1. Go to file>Open Scene and choose the cornellBox1.ma file (This will be in the mentalRay project provided in the first mental ray tutorial)
  2. 2. Once the file is opened you should see something like the image below.

This scene is what is called a cornell box. You may have seen examples like this online. It is a standard way to show how light works.

We are looking into a cube with a hole in the top. The back wall, floor and objects all have a white lambert applied. The left wall has a green lambert applied. The right as a red lambert and the ceiling has a blue lambert. The reason for the colors is to both see how the light effects different colors and to see how the colors will bounce around the room with final gather.

Our direct illumination sources are a spot light aiming through the hole in the ceiling. It is casting soft raytracing shadows. We also have a fairly dim point light outside of the front of the box to add a bit of fill to the scene to brighten up the shadowed areas.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • Technorati
SHARE :

(1) Comment

Interesting Tutorial
52 days ago · Reply

“We also have a fairly dim point light outside of the front of the box to add a bit of fill to the scene to brighten up the shadowed areas.”

Why are we using a fill light to add direct illumination to shadowed areas when the tutorial is about indirect illumination?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>