Computers and application software are evolving at a tremendous pace. New methods and technical improvements are being introduced with every software release and today creating photorealistic renderings is just a couple of mouse clicks away.
Going back a couple of years, raytracing, particularly raytraced reflections, was nothing more than a fake simulation with the refmap.gif file for 3ds(max) users whereas the term "Refractions" were arousing just a simple question: "Is it possible?". But today we have state-of-the art rendering engines which are available both as standalone and bundled rendering solutions for major 3d software applications aiding the 3d artists to create hyper realistic imagery.
"Global Illumination" or "GI" is one of the techniques available within the contemporary rendering engines which accurately simulates the real world lighting conditions given the proper cpu power and enough time for computations. In today's production environments usually time is of concern if not the cpu power thus makes GI an "expensive" method for visualisation. Optimizing quality rendering time with alternative methods has become an essential need for the production process.
If you are dealing with 3d rendering, you probably have heard of the "Occlusion" method. In the Siggraph 2002 presentation "Production-Ready Global Illumination",¬† ILM Technical Director Hayden Landis tells about this alternate method they developed for simulating GI effectively with speed.
Apparently this relatively new technique has been used by many huge production houses for their projects but it has just began to be available as a common toolset for the regular 3d artist like myself :)
With the introduction and integration of mental ray, 3dsmax has gained a strength in its rendering department, particulary the photo-realistic section. 3dsmax 7 now has the ability to render ambient and reflective occlusion images with the help of a mental ray 3.3 shader.
The Ambient Occlusion method is basically rendering out an occlusion pass(which is a grayscale or a tinted image based on environment map) and then overlaying this image over a flat lit diffuse pass(achieved by ambient lighting, I'll describe it later) to represent the shadowing caused by the environment. That's why the method is called "Ambient Occlusion", to describe the occlusion(blocking) of the ambient light amount to simulate GI shadows. It is just like rendering your scene with a GI skylight, with no specular highlights or cast shadows and faster than GI
Analysing the Scene
This image is rendered at 640x470 pixel resolution on a dual opteron workstation with 3dsmax's native GI engine LightTracer in 14 minutes 27 seconds(with default parameters used, you can tell by the artifacts). It shouldn't be considered as a very long time for the GI rendering of a complex object like this car. But if I was to render a high quality animated sequence within a tight deadline, quarter an hour per frame will add up to a relatively long period of time.
Let's see how we can decrease the render time for this specific scene with ambient occlusion method in 3dsmax 7 using mental ray.The scene has a simple setup. There is a ground plane with the car geometry placed in the middle and a spherical mapped gradient ramp is used in the environment slot to represent the sky background. For the lighting, only one skylight is used to illuminate the scene with LightTracer and a couple of other point lights are used to create highlights on several places on the car body
Preparing the Passes
I will be using three different passes for the final composite.
(1)"Ěthe ambient color pass" for main diffuse rendering,
(2)"Ěthe ambient occlusion pass" to attenuate the diffuse pass and
(3)"Ěthe specular pass" to control the highlights seperately.
The Ambient Color Pass
The ambient color pass is the flat lit diffuse rendering pass only illuminated by the scene ambient light.
To render the ambient color pass the first thing we need to do is to turn off all the scene lights from each of the light's general parameters rollout. In addition to that Advanced Lighting should be turned off as we are trying to simulate GI without it. You could do this from the¬†Render Scene Dialog(Default Hotkey: F10) or from the Rendering pulldown menu.
The last step is to turn up the ambient color which is on the Environment Panel of the Environment and Effects dialog (Default Hotkey:8) The ambient color with a Value(HSV) of 140 would do fine to reveal the object clearly in the rendering.
The pass takes only 51 seconds to render including raytracing. Here's what it looks like
It will be wise to render out a specular pass while we are at it because scanline renderer has to be replaced with mental ray in order to render the occlusion pass.
The Specular Pass
For the specular pass the point lights should be turned on to create the highlights. Remember that my scene point lights only affect the specular component of the surfaces not diffuse. Skylight remains turned off. To render out a seperate pass for specular highlights we will be using render elements. This can be done from the Render Scene Dialog, Render Elements Panel. By pressing Add.. button and choosing "Specular" from the list we activate the specular highlights pass for this scene to be rendered out seperately.
After filling in a proper name and defining the output path, we render the scene once again. After the rendering is finished if you haven't unchecked the Display Elements option from the Render Elements Panel the specular pass would be displayed as a seperate virtual frame buffer. The pass takes 59 seconds to render and looks like:
As I said earlier, before rendering the occlusion pass, mental ray has to be assigned as the current renderer from the Render Scene Dialog. The option can be found under the Common tab of the dialog box. Now on to the occlusion pass.