'Maya'

.
"Global Illumination in mental ray" by Sanpech Satrawaha


Global Illumination (GI) has been a well-known issue in Thailand for the last two years. This is partly because of 3ds max's Final Render plugin that make it fast and Autodesk VIZ4 which include "Radiosity" computation From Lightscape (Autodesk bought Lighscape a few years ago). As for MAYA, now (versoin 5.0) has included "Mental ray" as their standard renderer along with MayaSoftware, MayaHardware and Maya Vector. So we have more options to use in a different cases instead of have to imitate the GI by a lot of lights setup in all scenes.
Let's explore what GI really is and how it works? Many people know what it is but some's still left in mystery "What is GI?". To get start,let's say,every object that you see can reflects light. In another word, they can transfer received energy to other objects nearby. The only object that does not possess that kind of qualification is the black body.

In a normal lighting calculation usually will consider only the "Direct Light" or the first light that hit the object. so if we create the spot light point to the ground we will get a completely black ceiling. to simulate more realistic light the reflected light calculation must be considered we call these lights "Indirect Light". we can fake this kind of effect by put additional light to a proper position and aim it to a reflected direction, this way we don't have to calculate a complex mathmatical equation but need lots of lights and an artistic skill to do it right.
Two main calculation methods have been used to calculate the "Indirect Light", Radiosity and Photon Mapping.
Radiosity
"Lightscape" is a good example for the Radiosity calculation. now it's been merged with 3ds max and Autodesk VIZ. This method will subdivide the object to have more vertex. Each vertex has the recieved energy information. When the light first come out of the source vertex in the light area will recieve the energy and store it then pass it to near by vertices and so on. this mean the quality of this calculation depend on the number of vertex. If we need really good looking quality we will need lot of vertices. but the calculation will be more accurate than Photon Mapping method so we can use this calculation to simulate the real lighting condition such as the meeting room or any interior lighting design.
Photon Mapping
Instead of storing the energy informaion in the vertex this method store in texture map which will handle by shader call "Photon Shader". each light will fire the phonton in a given number (like 1000 or 100000 photons). These photons will make light act as a paint ball gun. It creates a texure map by bouncing arond and leaves the color in the hit position. So we don't need a lot of vertices to calculate this, but the quality will depend on the number of photon and how to interpolate it.
These three pictures have a different photon size. the first pic, photon has a small redius. And when it getting bigger the photon will blend together. But if the radius is to big the result will not be accurate so we have to find the right number of the how much photon we need and how big it should be.
Mental ray has a feature call "Final Gathering" which will emit light from all objects in the scene. If we use it with Photon Mapping will give a high quality GI effect. and as you may guess, this Final Gathering takes very long time to calculate.
let's do it in Maya to see how it actually work. this scene I create a simple cubes use Lambert shader a two spot lights.
Change the renderer to mental ray by render >> render using >> mental ray .
Then click on a spot light and press CTRL+a to open attribute editor (you have to do it for each light).
Set "Decay" to "Quadratic" which is the real lighting decay rate. increase the Intesity to 1000 so the light has intensity enought to get to the objects and create shadow.
In mental ray section, check "Emit Photons" to fire photons from this light. The Energy has the Red Green and Blue value. More energy mean photons have more intesity left when it is bounced. check "Physical" to enable physical calculation for the energy transfer. "Global Illum Photons" is the number of photons this case I set it to 10000.
Area Light will create a "Soft Shadow" effect. Here I use a default setting.
Open metal ray's render global.
In Overrides, change "Global Illum Generating" and "Global Illum Receiving" to "On" so every objects in the scene will bounce and recieve the photon.
Check "Global Illum", set Accuracy to 100. This value is how accurate to fire the photon. Don't check the "Final Gathering" yet. Render to adjust "Global Illum Radius" in this scene I use 3. you have find the proper number in each scene.
After we got a "Global Illum Radius" check "Final Gathering". First set "Final Gather Ray" to 50 or 100 then adjust the min and max Radius. when you get the proper number set "Final Gather Ray" to 250 for a final render.
Last thing to do is quality setting. In "Sampling Quality" section we have min, max samples increase it to increase quality. I set it to 1 and 3. If you have more time to wait you can set it to 3 and 4 or higher to get a better quality.
This image took 15 minutes to complete which is not too slow for this kind of effect.
3D Total Homepage