- Illuminating Scenes
- Creating Lights
- Casting Shadows
- Controlling Illumination
- Navigating Lights
- Animating Lights
Controlling Illumination
Controlling illumination is essential to creating realistic scenes. The following parameters fine-tune colors and gradations of light, and determine the surfaces that light will affect (Figure 11.61):
OnEnables illumination.
TypeSets the light type.
TargetedEnables a target.
Cast ShadowsEnables shadow casting.
ShadowTypeSets the shadow type.
Include/ExcludeDetermines which objects are illuminated by the light.
MultiplierControls the intensity, or brightness, of a light.
ColorSets the hue (chroma), saturation (purity), and value (intensity) of a light.
DecayDiminishes the intensity of a light over its entire attenuation range.
AttenuationFades the light at either end of its range.
Hot Spot and FalloffSets the inner and outer boundaries of the cone of illumination.
ContrastSets the contrast between ambient and diffuse areas of illumination.
Soften Diff. EdgeSoftens the edge between ambient and diffuse areas.
DiffuseAdds the light to diffuse (middle value) areas of illumination.
SpecularAdds light to specular (high value) areas of illumination.
Ambient OnlyAdds light to the minimum level of scene illumination.
-
Projector MapProjects an image or animation into a scene.
Figure 11.61 The parameters of a spotlight are the same as those of a directional light, and have much in common with omni lights.
By default, lights illuminate all objects within range. Turning off a light ends their illumination. Note that hiding a light does not turn it off.
To turn off a light:
-
Open Practice03.max (Figure 11.62).
Figure
11.62 The practice scene before turning off the spotlight.
-
Select a light.
-
Open the Modify panel.
-
Uncheck the On box in the General Parameters rollout (Figure 11.63).
-
To turn the light back on, check the On box.
The light is turned off (Figure 11.64).
Figure 11.63 Uncheck the On box.Figure 11.64 After turning off the spotlight, the scene is just illuminated by the direct light and the omni light.
You can convert a light from one type to another in the Modify panel. When a light changes type, the illumination from the new light type replaces the illumination from the old type.
To change a light type:
-
Open Practice03.max.
-
Select a light.
-
Open the Modify panel.
-
In the General Parameters rollout, choose a light type from the Light Type drop-down list (Figure 11.65). The new light type replaces the selected light, using the same basic settings. The name of the light remains unchanged. If the name of the light is Omni01 and you have just changed it to a target spotlight, this is probably a good time to rename it.
Figure
11.65 Changing the spotlight to a directional light.
-
Activate the ActiveShade viewport, and render the scene.
The new light type replaces the old and illuminates the scene (Figure 11.66).
Figure 11.66 The spotlight has been changed to a direct light, which is narrower at the far end of its cone.TIP
When you convert an omni light to any other type of light, it points toward the grid of the viewport it was created in.
The Targeted check box toggles a target on or off.
The Exclude command turns off the illumination of objects that are within range of a light. It can also turn off shadow casting.
To exclude objects from a light:
-
Open Practice02.max.
-
Select the spotlight.
-
Open the Modify panel.
-
Click Exclude in the General Parameters rollout (Figure 11.67).
-
Make sure Exclude and Both are selected in the upper-right corner.
-
Select the names of the objects or group of objects you do not want to be illuminated or to cast shadows.
-
Click the >> button.
-
Click OK.
-
Render the scene.
The Exclude/Include dialog box appears.
Figure 11.67 Click the Exclude button.The names of the objects are moved to the Exclude list on the right (Figure 11.68).
Figure 11.68 Turning off both illumination and shadow casting for the cylinders, hedra, and teapot.The excluded objects neither receive illumination nor cast shadows, giving them an air of mystery (Figure 11.69).
Figure 11.69 Without shadows or major illumination, the excluded objects appear to float in the scene.TIP
To remove objects from the exclude list, and end the exclusion of objects, click the Clear button.
Using the Include button, you can selectively choose just those objects you want to include in a light. All other objects will be excluded automatically.
Color settings assign hue, value, and saturation to a light. The value of a color also affects its intensity. Brighter colors create brighter lights. Darker colors create dimmer lights.
To set color:
-
Open Practice02.max.
-
Select the spotlight.
-
In the Intensity/Color/Attenuation rollout, click the color swatch just to the right of the Multiplier (Figure 11.70).
Figure
11.70 Click the color swatch.
-
Choose a color from the Color Selector dialog box. There are two basic methods:
-
When you are satisfied with the result, close the Color Selector dialog box.
-
Render the scene to verify the results (Figure 11.73).
Figure
11.73 Blue light gives the scene a more somber cast.
The most intuitive way to do this is to click in the Hue palette on the left and drag the Whiteness slider next to it (Figure 11.71).
When precision is important, you can set numeric RGB or HSV values using the color sliders, input fields, or spinners on the right (Figure 11.72).
As you change the color of the light, the lighting updates in the shaded viewports.
Figure 11.71 Picking a color using the palette and whiteness slider.Figure 11.72 Picking the same color numerically.
TIP
Light and color can be animated over time.
Global lighting commands shift the base intensity and color of all the lights in a scene, including the default lights.
Initially, the base intensity is set to 1.0 and the base color is set to white. Ambient light, which sets the minimum level of scene illumination, is set to black (no light). Changing these settings will affect the overall amount of color and illumination of the scene.
Because ambient light brightens darker values, increasing it reduces contrast across surfaces. Use this setting sparingly, so it does not wash out your scene.
To set global lighting:
-
Open Practice03.max (Figure 11.74).
-
Choose Rendering > Environment to open the Environment dialog box.
-
In the Global Lighting group, set the base intensity of the lights by adjusting the Level (Figure 11.75).
-
Reset the Level to 1.0, then click the Tint color swatch.
-
In the Color Selector: Global Tint dialog box, choose a hue and whiteness value.
-
Click the Ambient color swatch.
-
Drag the Whiteness slider to set the minimum level of illumination. Then select a hue.
-
Render the scene to see the results (Figure 11.77).
Figure
11.77 Increasing the value of the ambient color reduces contrast in the
scene.
Figure 11.74 Before affecting the global lighting of the scene.
The scene brightens or dims (Figure 11.76).
Figure 11.75 Reducing the global illumination.Figure 11.76 All the lights are dimmed.
The color and intensity of the illumination updates.
The Color Selector changes to the Color Selector: Ambient Light dialog box.
Gradations of value become lighter throughout the scene, and become tinted by the hue that you selected.
A light cone is actually made of two concentric cones: the inner core of illumination, or hotspot, and the outer edge of illumination, or falloff. Between the hotspot and falloff cones, the intensity of the light gradually decreases to zero.
To set the hotspot and falloff:
-
Open Practice03.max
-
Select the spotlight.
-
Open the Modify panel.
-
In the Spotlight Parameters rollout, decrease the Falloff value. Then decrease the Hotspot value even more (Figure 11.78).
-
Select the directional light.
-
In the Directional Parameters rollout, decrease the Falloff amount so that both the hotspot and falloff cones become narrower.
-
Render the ActiveShade viewport.
The blue hotspot cone becomes narrower (Figure 11.79).
In the ActiveShade viewport, the edge of the pool of light becomes softer (Figure 11.80).
Figure 11.78 Adjust the hotspot and falloff in the spotlight parameters rollout.Figure 11.79 The hotspot and falloff cones move apart.
Figure 11.80 The pool of light gains a softer edge.
The pool of light from the directional light becomes smaller, but its edges remain sharp (Figure 11.81).
Figure 11.81 The cone of the directional light narrows.TIP
Check Show Cone to display the cone even when the light is not selected.
Checking Overshoot causes the light to ignore the boundaries of the hotspot and falloff cones and spread throughout the scene. Shadows, however, will be drawn within the cone of illumination only.
Click Rectangle to make the pool of light rectangular or square. The Aspect parameter sets the aspect ratio of the length and width of the rectangle. The Bitmap Fit button will match the aspect ratio to an external bitmap, in case you want to project the map, as shown in the next exercise.
Projecting maps into a scene creates the illusion that there is more going on than meets the eye.
To project a map:
-
Open Practice02.max.
-
Select the spotlight.
-
Open the Modify panel.
-
In the Advanced Effects rollout, click the Projector Map button labeled None (Figure 11.82).
-
Double-click Bitmap (Figure 11.83).
Figure
11.83 Click Bitmap in the Material/Map Browser.
-
Choose a bitmap image using the Select Bitmap Image File dialog box. For this example, I chose the SCATR4.gif in the 3dsmax5/Maps/Lights folder.
-
Increase the light multiplier to compensate for the reduced intensity of the bitmap.
-
Render the scene (Figure 11.84).
Figure
11.84 The SCATR4 map projects spots of light and shadow.
The Material/Map Browser window appears.
Figure 11.82 Click the Projector Map button.When you click Open, the bitmap image is projected by the spotlight onto the scene.
TIP
A black-and-white map that is designed to be used with a spotlight is called a gobo map.
Try some of the other maps in the Material/Map Browser such as Brick, Cellular, Checker, Dent, Gradient Ramp, Perlin Marble, and Smoke (Figure 11.85).
Attenuation fades in a light near its source and fades out a light at the far end of its range.
To set attenuation:
-
Open Practice02.max.
-
Select the spotlight.
-
Open the Modify panel and the Intensity/Color Attenuation rollout.
-
In the Far Attenuation group, check Use and Show (Figure 11.86).
-
Drag the Far Attenuation spinners so that the Start and End ranges just enclose the scene objects (Figure 11.87).
Figure
11.87 Setting the Far Attenuation range indicators.
-
Render the scene to see the final result (Figure 11.88).
Figure
11.88 The light falls off across the scene more dramatically.
The far attenuation ranges appear. In the ActiveShade view, the light from the spotlight will disappear if the objects are out of the light's current attenuation range.
Figure 11.86 Check Use and Show for Far Attenuation.TIP
Because light can continue shining forever, it is a good idea to use far attenuation so that the program won't waste time making unnecessary calculations.
The Decay parameter increases the rate at which a beam of light diminishes as it moves away from its source.
Volume lighting is an atmospheric effect that is based on the real-world interaction between light and particulate matter such as fog, haze, dust, and smoke. It gives you the hazy glow of streetlights on a misty evening, the sweep of a lighthouse beacon on a foggy morning, or the rays of sunlight streaming through a window.
Volumetric lighting works with all types of light sources, although it is most commonly used with spotlights. Because volume lighting is a true 3D effect, you can render it only from viewports that use perspective projection.
To create a volume light:
-
Select a light that illuminates a scene.
-
Open the Modify panel.
-
Open the Atmospheres & Effects rollout. (Note: This rollout does not appear in the Create panel.)
-
Click the Add button (Figure 11.89).
Figure
11.89 Click Add in the Atmospheres & Effects rollout.
-
Choose Volume Light from the Add Atmosphere or Effect dialog box (Figure 11.90). Then click OK.
Figure
11.90 Add Volume Light to the spotlight.
-
Render the scene from a Perspective, Camera, or Light viewport.
The light is rendered volumetrically (Figure 11.91).
Figure 11.91 The Volume Light renders in three dimensions.TIP
Decreasing the size of the hotspot can make a Volume Light easier to control.
By animating attenuation, you can make a Volume Light "touch down" and "beam up."
Combining a projector map with a Volume Light creates interesting effects (Figure 11.92).