|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Attenuating Light at a DistanceAs mentioned earlier, a CG light will go on forever unless you specify how it attenuates. All lights in MAX can be attenuated at a distance. The attenuation settings control how light diminishes relative to the distance from the light, including the total distance of the lights throw, where the light starts falling off, where the light starts falling on (something not possible in a real light), and the type of decay calculation used for the falloff.
Near Attenuation This setting controls where the light begins to fade in. As mentioned above, this is not comparable to a real-life situation. Imagine that the light emitted by a light does not have to start at the light, illuminating everything in its path, but can start somewhere along its path. The End setting of the Near Attenuation parameter is the distance where the light reaches 100% of its intensity. The Start setting is the distance where the light value starts fading in from zero.
Far Attenuation The Far Attenuation setting determines where a light begins to fade out at a distance. This is the type of attenuation we are more accustomed to in the real world and is much more common in CG as well. The Start setting is the distance where the light begins to fall off from its full intensity. The End value designates the farthest reach of the light; after that distance, the light has no effect at all.
Decay The Decay settings determine which mathematical formula MAX uses to calculate the falloff in light from 100 percent to zero. Table 10.1 shows the effects of the three decay types.
Adjusting the Hotspot and Falloff
Casting ShadowsAll lights in MAX can cast shadows but, unlike real lights, CG lights have to be instructed to do so. Calculating shadows increases render time, therefore shadows are not turned on as a default. The Shadow Parameters rollout allows you to choose how the shadows should be determined. The two types of shadow calculations are shadow map and ray-traced shadows. You choose these in the Object Shadows drop-down list in the Shadow Parameters rollout. Shadow Map applies a silhouette image of the object projected along the line of light as a bitmap for shadow images. Ray Traced Shadows calculates the actual fall of light rays around the object. We will look at the benefits and drawbacks of each. Shadow Maps Shadow maps are bitmaps created during the rendering process and projected in the direction of the light. Specific settings can then be adjusted to control the anti-aliasing of the shadow bitmap. Since shadow-mapped shadows are bitmaps, their resolution relative to the total render size affects how coarse the shadows appear. If your shadows are coarse, the map size may be too small, the camera may be too close, or your falloff may be too wide. (The map size has to cover the entire area within the lights falloff.) If you have two different-sized objects near each other, you may need to use separate lights with different map sizes, excluding the other object from each light. Here are some of the advantages and disadvantages of shadow-mapped shadows, followed by further discussion of the parameters of shadow maps:
Bias This parameter adjusts the distance of the map from the object casting shadows. In the scene below, the sphere on the left has the default map bias of 1, while the sphere on the right has a map bias of 50. Size This parameter determines the dimensions of the map used to make the shadows. As mentioned before, increasing the map size can help get rid of the coarseness (jagged edges) around your shadows. The downside, of course, is that this uses more RAM.
© 2000, Frol (selection, edition, publication) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|