- 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 the effects of light (Figure 11.61):
-
Light Type OnEnables illumination.
-
Light TypeSets the light type.
-
TargetedEnables a target.
-
Cast Shadows OnEnables shadow casting.
-
ShadowTypeSets the shadow type.
-
Include/ExcludeDetermines which objects are illuminated by the light.
-
MultiplierControls the intensity, or brightness, of a light.
-
Light ColorSets the hue, saturation, and value 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/Beam and Falloff/FieldSets 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.
-
Shadow ColorSets the hue, saturation, and value of a shadow.
-
Shadow DensityIncreases or decreases the value of a shadow.
Figure 11.61 Different light types have many of the same parameter settings.
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).
-
Select a light.
-
Open the Modify panel.
-
Uncheck the On box in the Light Type area of 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.62 The practice scene before turning off the spotlight.
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).
-
Activate the ActiveShade viewport, and render the scene.
-
The new light type replaces the old and illuminates the scene (Figure 11.66).
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.
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.
Figure 11.65 Changing the spotlight to a directional light.
Figure 11.66 The spotlight has been changed to a direct light, which is narrower at the far end of its cone.
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.
The names of the objects are moved to the Exclude list on the right (Figure 11.68).
The excluded objects neither receive illumination nor cast shadows, giving them an air of mystery (Figure 11.69).
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.
Figure 11.67 Click the Exclude button.
Figure 11.68 Turning off both illumination and shadow casting for the cylinders, hedra, and teapot.
Figure 11.69 Without shadows or major illumination, the excluded objects appear to float in the scene.
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).
-
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).
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.
TIP
Light and color can be animated over time.
Figure 11.70 Click the color swatch.
Figure 11.71 Picking a color using the palette and whiteness slider.
Figure 11.72 Picking the same color numerically.
Figure 11.73 Blue light gives the scene a more somber cast.
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 and Effects dialog box.
-
In the Global Lighting area, 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 Light 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.
The scene brightens or dims (Figure 11.76).
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 tinted by the hue that you selected (Figure 11.77).
Figure 11.74 Before changing the global lighting.
Figure 11.75 Reducing the global lighting level.
Figure 11.76 All the lights are dimmed.
Figure 11.77 Increasing the value of the ambient color reduces contrast in the scene.
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 these two cones the light forms a gradient from full intensity 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/Field value (Figure 11.78). Then decrease the Hotspot/Beam value even more (Figure 11.79).
-
Select the directional light.
-
In the Directional Parameters rollout, decrease the Falloff amount so that the hotspot and falloff cones shrink.
-
Render the ActiveShade viewport. The pool of light from the directional light becomes smaller, but its edges remain sharp (Figure 11.81).
In the ActiveShade viewport, the edge of the pool of light becomes softer (Figure 11.80).
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.
Figure 11.78 Adjust the hotspot and falloff in the spotlight parameters rollout.
Figure 11.79 The hotspot cone narrows more than the falloff cone.
Figure 11.80 The pool of light gains a softer edge.
Figure 11.81 The cone of the directional light narrows.
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).
-
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).
The Material/Map Browser window appears.
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).
Figure 11.82 Click the Projector Map button.
Figure 11.83 Double-click Bitmap in the Material/Map Browser.
Figure 11.84 The SCATR4 map projects spots of light and shadow.
Figure 11.85 Projecting a checker map that has been tiled in the Material Editor.
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).
-
Render the scene to see the final result (Figure 11.88).
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.
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.
Figure 11.86 Check Use and Show for Far Attenuation.
Figure 11.87 Setting the Far Attenuation range indicators.
Figure 11.88 The light falls off across the scene more dramatically.
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).
-
Choose Volume Light from the Add Atmosphere or Effect dialog box (Figure 11.90). Then click OK.
-
Render the scene from a viewport that displays perspective, such as a Perspective, Camera, or Light viewport.
The light is rendered volumetrically (Figure 11.91).
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 results (Figure 11.92).
Figure 11.89 Click Add in the Atmospheres & Effects rollout.
Figure 11.90 Add Volume Light to the spotlight.
Figure 11.91 The Volume Light renders in three dimensions.
Figure 11.92 When added to a Volume Light, a Cellular map projects in three dimensions.