Chapter 28: Working with Advanced Lighting, Light Tracing, and Radiosity


If you were to walk into a dark room and reach for the light switch, you would be confused if you found a separate switch that controlled the advanced lighting. But in Max the advanced lighting controls are worth the trouble. They enable you to take your lighting solution to the next level.

The advanced lighting controls in Max enable you to light scenes using two separate global illumination techniques known as light tracing and radiosity. Both solutions deal with the effect of light bouncing off objects and being reflected to the environment.

Light tracing is typically used for outdoor scenes where the light consists of a single powerful light source at a far distance from the scene. Light tracing includes support for color bleeding between surfaces. Another aspect of light tracing is that the shadows are softer.

Radiosity computes lighting solutions that are much more realistic than using standard lights. As you learn to use Radiosity, you quickly discover that it is a complex system that takes lots of tweaking to get just right.

Selecting Advanced Lighting

You control the advanced lighting settings for the scene in the Advanced Lighting panel, which is part of the Render Scene dialog box. You can access this panel by selecting Rendering image from book Advanced Lighting image from book Light Tracer (or by pressing the 9 key). The Advanced Lighting panel includes a rollout with a single drop-down list where you can select the lighting plug-in to use. The options are None, Light Tracer, and Radiosity.

Light Tracer and Radiosity are two different techniques for applying advanced lighting to a scene. Although they are fundamentally different, they both simulate a critical piece of the lighting puzzle that adds dramatically to the realism of the lights in the scene-light bouncing. When light strikes a surface in real life, a portion of the light bounces off the surface and illuminates other surfaces. Traditionally, Max hasn't worried about this, which required that users add more lights to the scene to account for this additional lighting. Both the Light Tracer and the Radiosity solutions include light bouncing in their calculations.

How light tracing works

The Light Tracer is a Global Illumination (GI) system that is similar to raytracing, but it focuses more on calculating how light bounces off surfaces in the scene. The results are fairly realistic without being computationally expensive, and its solutions are rendered much quicker than a radiosity solution.

CROSS-REF 

The Light Tracer is similar in many ways to raytracing. Chapter 45, "Raytracing and mental ray," presents more information on raytracing.

The Light Tracer works by dividing the scene into sample points. These sample points are more heavily concentrated along the edges of objects in the scene. An imaginary light ray is then shot at each sample point, and the light intensity at the location of contact is recorded; then it is computed where the light ray would bounce to, and a reduced intensity value is recorded. One of the settings is how many times the light rays will bounce within the scene, and this value increases the amount of time required to compute the solution. When all the rays and light bounces have been computed, the total light intensity value for each sample point is totaled and averaged.

Caution 

Transparent objects split each ray in two. One ray bounces, and the second ray is projected through the transparent object. Transparent objects in the scene quickly double the amount of time required to compute a solution.

The end result of a light tracing solution is that objects that are typically hidden in the shadows become much easier to see. Figure 28.1 shows a house model that was rendered using the standard lighting solution with raytraced shadows and then again using the Light Tracer opened side by side in the RAM Player. Notice that many of the details hidden in the shadows of one figure are visible in the other.

image from book
Figure 28.1: A house scene rendered using standard lighting (left) and light tracing (right)

Enabling light tracing

To enable light tracing in a scene, select Rendering image from book Advanced Lighting image from book Light Tracer to open the Advanced Lighting panel in the Render Scene dialog box, as shown in Figure 28.2.

image from book
Figure 28.2: The Light Tracer Parameters rollout sets values for GI lighting.

The Global Multiplier value increases the overall effect of the Light Tracer, much like increasing the multiplier of a light. The net result is to brighten the scene. You can also increase the multiplier of skylights with the Sky Lights values. The Object Multiplier sets the amount of light energy that bounces off the objects.

Color bleeding

Another characteristic of global illumination is color bleeding. As a light ray strikes the surface of an object and bounces, it carries the color of the object that is struck with it to the next object. The result of this is that colors from one object bleed onto adjacent objects. You can control this effect using the Color Bleed setting. You can greatly exaggerate the amount of color bleeding by increasing the Object Multiplier along with the Color Bleed value. You can also select colors to use for a color filter and for extra ambient light.

Note 

The color bleeding effect doesn't happen unless the Bounce value is set to 2 or greater.

When using color bleeding, you want also to enable the Exposure Control to the scene. Exposure Control is found in the Environment panel (keyboard shortcut, 8), which can be opened with the Rendering image from book Environment menu command.

CROSS-REF 

The Exposure Control features are discussed in Chapter 43, "Learning Rendering Basics."

Figure 28.3 shows an example of color bleeding with several colored cylinders projecting from a gray Box object. The Object Multiplier value was set to 4.0, and the Color Bleed was set a maximum value of 25.0 with a Bounce value of 3. Using the Exposure Control settings, you can isolate the color bleed.

image from book
Figure 28.3: Color bleeding spreads color about the scene. Exposure Control can highlight it with Automatic (left) and Logarithmic (right).

Quality versus speed

The big trade-off of global illumination is between quality and render time. The more rays per sample that you specify, the better the quality and the longer the render time. This is controlled with the Rays/Sample setting. The Rays/Sample setting and the number of Bounces dramatically increase the rendering time. The Ray Bias setting biases rays toward object edges versus flat areas.

Tip 

If you want to see a preview of your scene using light tracing, set the Rays/Sample value to around 10 percent of its normal value and render the scene. The resulting image is grainy, but it shows a rough approximation of the scene lighting without having to change the Bounce value.

If you don't include enough rays in the scene, then noise patterns appear within the scene. The Filter Size can help control the amount of noise that appears in the scene.

The number of Bounces value specifies the number of times the ray bounces before being dropped from the solution. A setting of 0 is the same as disabling the Light Tracer, and the maximum value of 10 requires a long time to compute. The Cone Angle defines the cone region within which the rays are projected. The Volumes option is a multiplier for the Volume Light and Volume Fog atmosphere effects.

Adaptive undersampling

With the Adaptive Undersampling option enabled, the Light Tracer focuses on the areas of most contrast, which usually occur along the edges of objects. When this option is enabled, you can specify the spacing of the samples and how finely the samples get subdivided. The Initial Sample Spacing options range from 1 × 1 to a very dense 32 × 32. The Subdivision Contrast affects the density for contrast edges between objects and shadows. This value is a minimum amount of contrast that is allowed. If the amount of contrast is greater than this value, then the area is further subdivided into more samples. These high-contrast areas use the Subdivide Down To setting. The Show Samples option displays each sample as a red dot on the rendered image.

Tutorial: Viewing color bleeding

One of the easiest effects of the Light Tracer to see is color bleeding. Although this is often undesirable, it is a telltale sign of global illumination.

To compare the differences between a regular rendering and the Light Tracer, follow these steps:

  1. Open the image from book Hotplate.max file from the Chap 28 directory on the DVD.

    This file includes a simple model of a hotplate.

  2. Open the Advanced Lighting panel by selecting Rendering image from book Advanced Lighting image from book Light Tracer (or press the 9 key). In the Parameters rollout, set the Object Multiplier to 10, the Color Bleed to 25, and the Bounces to 1.

  3. Select the Rendering image from book Environment (8) menu command to open the Environment and Effects panel. In the Exposure Control rollout, select the Linear Exposure Control option and enable the Process Background and Environment Maps option.

  4. In the Render Scene dialog box, click the Render button.

    This renders the scene in the Rendered Frame Window.

Caution 

Remember that selecting an advanced lighting option greatly increases the render time.

Figure 28.4 shows the scene rendered with advanced lighting.

image from book
Figure 28.4: Color bleeding happens only when global illumination is enabled.




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net