Light Tracer (Global Illumination)Global illumination takes the light bouncing off surfaces in the scene and adds it to the overall lighting solution. It is fairly easy to set up, and it can be used interchangeably with the standard Default Scanline Renderer, though it was designed to work in scenes that have a skylight placed in them. It doesn't require size accuracy (you make scenes to any scale you want) and is best used for outdoor scenes. In the illustrations below (Figures 20.1220.14), note the variations in quality in the time required to render a 1280-by-960 image on a 2.53 GHz computer with 1 GB of RAM. Figure 20.12. Light Tracer 7 minutes, 38 seconds rendering time (buddhaLT.jpg on the DVD).Figure 20.14. Scanline without a skylight3 minutes, 47 seconds rendering time (buddhaSLAS.jpg on the DVD).Figure 20.13. Scanline 29 minutes, 27 seconds rendering time (buddhaSL.jpg on the DVD). Not much difference in picture quality, but a huge drop in speed.Notice that using the Light Tracer with a skylight actually reduced the painful rendering time of the scanline renderer. So it seems that Skylight and Advanced Lighting really go hand in hand; this is also true with the Radiosity renderer. Skylight simulates an exterior daylight scene and can't be used "indoors." If you try to place a skylight inside a closed room, you will get nothing but a black rendering. The icon is just a placeholder, as the illumination from a skylight always comes in from the top of the scene. Color BleedingA primary benefit of using the Light Tracer (or any of the GI solutions in 3ds max) is the phenomenon of color bleeding. This is infiltration of surrounding colors as light bounces around the scene. Though it sounds like a bad thing, color bleeding is a necessity for natural modeling of light properties. Figure 20.15 shows a simple scene lit by one overhead Target Direct Light. The walls are black due to the parallel nature of the light rays. Figure 20.15. No color bleeding in the scene. Time to render: 16 seconds. (Filename on the DVD: ballNoBleed.jpg.)When we turn on the Light Tracer, and set Bounces to 2 and Color Bleed to 2.0, the walls are given a reddish hue by the light reflected from the floor's surface, and rendering time increases to about 13 minutes (filename on the DVD: ballWithBleed.jpg). The graduated tone would be very difficult to mimic with the Default Scanline Renderer. The shadows and overall lighting still leave much to be desired. The Light Tracer PanelTo enable the Light Tracer, open the Render Scene dialog and go to the Advanced Lighting panel. Select Light Tracer from the drop-down menu. The Parameters rollout in Figure 20.16 appears in the Advanced Lighting panel. Figure 20.16. The default settings of the Light Tracer.The General Settings break down as follows:
Adaptive UndersamplingKey to the reasonably fast production of Light Tracer renderings is the use of Adaptive Undersampling. Figure 20.17, below, shows how the Light Tracer can "gang up" on areas of strong contrast, and be more relaxed around areas that don't have as much going on. Figure 20.17. The enlargement on the left has an Adaptive Undersampling rate of 16 x 16, while the one on the right starts at 16 x 16 and then subdivides down to 1 x 1. Check the adaptive.tif file on the DVD for a clearer picture.Clever use of Adaptive Undersampling, combined with the Rays/Sample and Filter Size settings, can really bring the rendering time down and still give acceptable quality. Notice the difference between the two figures (Figures 20.18 and 20.19) below: Figure 20.18. Light Tracer with default settings; Bounces at 1: 7 minutes, 38 seconds rendering time (buddhaLT.jpg on the DVD).Figure 20.19. Light Tracer with degraded settings; Bounces at 0: 2 minutes, 21 seconds rendering time.Figure 20.19 was made with the following settings (Figure 20.20): Figure 20.20. The changes made to the Light Tracer settings for Figure 20.19.Note that Adaptive Undersampling and the Rays/Sample variables were both coarsened, and Bounces was set to zero. The shadow detail was made somewhat blotchy, but additional tweaking can get it back to an acceptable level. Setting Up a Light Tracer SceneBy now, you should be getting the idea that using a skylight produces great shadows and a cloudy-day ambiance. Using the Direct Light with Advanced Ray Traced Shadows makes unrealistic shadows, but still leaves sunny-day specularity. So why not use both? The following exercise shows a simple setup that will work for most outdoor scenes. Setting Up for the Light Tracer
The soft direct light we added gave more character to the scene (Figure 20.22). We needed a shadow cast by the walls, and we got our highlight on the sphere. Setting our Sample Range high on the shadow maps gave us a nice blurring of the edges of the cast shadow. The direct light also darkened the area right underneath the sphere, which helped to give it more weight. Figure 20.22. Using a direct light and skylight combination.Alternatives for Global IlluminationIn the above rendering (Figure 20.23), a global-illumination solution was "faked" with four direct lights casting area shadows. It made for a fairly fast rendering time (5 minutes, 35 seconds), but notice the shadowing on the face and the oversaturation on the horizontal portions of the robe. The file is available on the DVD as statueFakeGI.max if you want to see the settings used (Figure 20.24). Figure 20.23. Using direct lights to imitate global illumination (buddhaFakeGI.jpg on the DVD).Figure 20.24. Setup of lights to imitate a global-illumination solution.An even better way to fake global illumination is to use Ronnie Olsthoorn's (e-light@skyraider3d.com) E-Light script (E-Light_max5.ms), available at his Web site (www.skyraider3d.com) and on the DVD. When the script runs, it places a dome and numerous lights in the scene. (The test in Figure 20.25, used a 900-unit-radius dome containing 91 shadow-casting lights). Once the dome is in place, the overall effect can be controlled in E-Light floater's Light Settings rollout, making for a convenient, one-stop solution (Figure 20.26). Even though it uses basic spotlights and shadow maps, the effect looks good, and the render is lightning-fast. Figure 20.25. The E-Light script was used to imitate a global-illumination solution. Rendering time: 57 seconds. (see buddhaEL.jpg on the DVD.)Figure 20.26. Settings for the rendering of Figure 20.25. |