This Cyber Monday Envato Tuts+ courses will be reduced to just $3. Don't miss out.
In this tutorial you'll learn how to use three indirect lighting systems in Maya; Global Illumination, Final Gathering and Irradiance Particles. You'll learn how to solve common problems and reduce rendering times while creating high quality images. At the end of this tutorial, you will have gained enough experience to decide which of these three indirect lighting systems is the most convenient and useful for your own scenes and situations.
1. Scene Setup & Global Illumination
Open the scene you are going to use (or download the project scene file above.) I created a scene with 2 Area lights, a color wall to see the indirect lighting effects and a simple column.
In the Attribute Editor, reduce the intensity of the Area lights to something like .400, under the Shadows section activate Use Ray Trace Shadows and set the Shadows Rays to 25 (this will create nice soft shadows.)
Go to Window > Settings/Preferences > Plug-in Manager, this will open a new window. Scroll down until you find Mayatomr.mll and check on Loaded and then close the window.
Tip: This step is only required if you don´t have Mental Ray loaded into Maya.
Open the Render Settings Window, change the Render Using option at the top of the window to mental ray, and then go to the Quality tab, and under the Raytrace/Scanline Quality section, change the Max Sample Level to 2. In the Multi-Pixel Filtering section change the Filter option to Gauss, and finally under Sample Options, enable Jitter.
Go to the Indirect Lighting Tab and expand the Global Illumination section.
And the Final Gathering section.
Also open the Importons and Irradiance Particles sections as well.
These are all the menus we are going to use.
First enable the Global Illumination option (make sure Final Gathering, Caustics and Irradiance particles are not enabled.)
- Accuracy: The quality of the global illumination renders.
- Scale: The intensity of the global illumination.
- Radius: The size of each photon.
- Merge Distance: Distribution of photons.
Next, go to the Area light's Attribute Editor and under the Mental Ray section, enable Emit Photons (do this for both lights.)
- Photon Color: The color of the photons
- Photon Intensity: The initially intensity of the photons when they are just emitted from the light.
- Exponent: The speed in which the photons lose energy (Higher exponent equal a faster loss of energy.)
- Global Illum Photons: The quantity of photons emitted from each light.
If you render the scene, you'll see that the light has totally blown out the image.
Reduce the Photon Intensity to about 2000 (this will make the render much darker.)
Now we have another problem. The image is well illuminated where there is direct lighting, but where we only have indirect light, the image is very dark.
Reduce the light Intensity to .100, the Photon Intensity to 500 and the Exponent to 1 (do this for both lights). This will make our photons have less energy for more time.
If you render the scene now. You'll see a better illumination, but we have lots of artifacts and noise going on.
Inside the Render Settings window, change the Radius of Global Illumination to 5 (this will make the photons bigger and smoother.) In the Attributes Editor of the Area light, change the Global Illum Photons to 100000 (again change this for both lights.)
Look at the two images below. The one on the left is how the photons are distributed in the scene without using Merge Distance. On the right, we have a better distribution of photons, because we used Merge Distance.
Inside the Render Settings window, change the Merge Distance option under Global Illumination to .400. (the values may vary depending on the size of your scene.)
If you render the scene again, you'll have a much better result. There are still some artifacts due to the exaggerated indirect lighting.
Inside the Render Settings window, change the Scale color of the Global Illumination setting to grey.
Now we have a better render with no artifacts at all. It's just a little dark.
To make the scene brighter, we only need to increase the Area light's Intensity.
Now we are almost done. Our render looks perfect, except for some noise.
To eliminate the noise, we need to go to the Render Settings window, and in the Quality tab, change the Max Sample level to 3.
A perfect render using Global Illumination, and it only took 1:21 (of course this will vary depending on your PC's specifications.)
2. Using Final Gather
I have the same scene as before. Now let’s take a look at Final Gathering, my favorite method of indirect illumination method.
Inside the Render Settings window, under the Indirect Lighting tab, enable Final Gathering.
If you render, you can see we have a super bright scene.
In the Attributes Editor of the Area light, reduce the Intensity to .400 (again do this for both lights.)
Render the scene and take a look at what a beautiful render we get. We only need to make minor adjustments.
We need to increase the number of bounces the Final Gathering points can do. Inside the Render Settings window, go to the Final Gathering section and increase the Secondary Diffuse Bounces to 1.
If you render, we can appreciate a brighter, but not blown out scene now.
We need to increase the rendering quality, but decreasing the rendering time (sounds like an impossible task.) This is how I do it, increase the Accuracy value under Final Gathering to 400, reduce the Point Density to .100 (by reducing the point density, we make our renders less accurate compared to the real world, but we make our renders much faster.)
If you look at the render, you only need to take out that annoying noise.
Go to the Quality tab, inside the Render Settings window and increase the Max Sample Level to 3.
We finally got it, a perfect render with a good rendering time of only 1:38.
Believe it or not, we are going to reduce that rendering time by at least 30 seconds using a final gathering map.Go to the Final Gathering Map section, enable the option: Enable Map Visualizer, and change the Rebuild option to On.
If you render the scene and close the rendering window, you'll see some dots; each of these dots represents one final gathering point.
If we change the Rebuild option to Freeze, Mental Ray will use the existing information to render the scene.
If we render the scene again, we can see it took 30 seconds less and it looks exactly the same. (Remember this only works when your camera and objects don't move.)
3. Irradiance Particles
Now we will take a look at irradiance particles and importons. They work in a very different way compared to global illumination. Instead of using Photons, they use importons, and they only work when a camera is looking at them. They also travel in an opposite direction, from the camera to the light, instead of being emitted from the light traveling to the camera. Open your scene, and inside the Render Settings window, under the Quality tab, reduce the Max Sample Level to 1.
Open the Indirect Lighting tab, of the Render Settings window and enable Irradiance Particles. Change the Rays value to 100, the Env. Rays to 100 and the Indirect Passes value to 1.
Next open the Importons section; reduce the Density to .040 and the Max Depth to 2.
- Density: The quantity of importons in one area.
- Merge Distance: The distribution of importons.
- Max Depth: The number of bounces of each importon.
If you render the scene, you'll see too much highlight on the wall.
In the Attributes Editor, reduce the Intensity of the Area light to .400 (do this for both lights).
If we render the scene, we'll have an almost finished render.
Go to the Quality tab, inside the Render Settings window and change the Max Sample Level to 3.
Now we have a finished and fast render using irradiance particles and importons, only 0:58.
If you are trying to achieve an excellent rendering quality, and time is not an issue for you. I recommend Global Illumination. If you have no time, and the image quality is not the top priority, go a head with Irradiance Particles. And If you want good quality, and acceptable rendering times, use Final Gathering.