NOTE A SpotLight is an approximation of a typical directional light source, such as a flashlight, car headlight, or desk lamp. The width of the conical beam for the Spotlight can be varied, along with the position and attenuation of the light. Figures 10.2 through 10.9 illustrate the effects of applying the different types of light to a simple scene. The relevant parameters for the lights are shown in tables 10.1 through 10.3. Table 10.1 Spotlight
Table 10.2 DirectionalLight
Table 10.3 PointLight
Figure 10.2 SpotLight Figure 10.3 SpotLight and DirectionalLight
Figure 10.4 SpotLight, DirectionalLight, and PointLight Figure 10.5 SpotLight, DirectionalLight, PointLight, and AmbientLight. Note that the Bounds of the AmbientLight have been set such that only the central large sphere (and the cone depicting the DirectionalLight are influenced
Figure 10.6 DirectionalLight and PointLight Figure 10.7 AmbientLight
Figure 10.8 PointLight and AmbientLight Figure 10.9 DirectionalLight, PointLight, and AmbientLight Figures 10.10 through 10.12 illustrate the effect of varying the SpreadAngle for a single SpotLight. Figures 10.13 through 10.15 illustrate varying the attenuation parameters of a SpotLight. As the linear and quadratic components of the attenuation are increased, the boundary between lit and unlit surfaces becomes increasingly blurred because the light attenuates more rapidly with distance.
Figure 10.10 SpotLight. SpreadAngle is 0.2 radians Figure 10.11 SpotLight. SpreadAngle is 0.5 radians
0.05, Figure 10.12 SpotLight. SpreadAngle is 2 radians Figure 10.13 SpotLight. Attenuation: Constant is Linear is 0.0, Quadratic is 0.0
Figure 10.14 SpotLight. Attenuation: Constant is 0.05, Linear is 0.01, Quadratic is 0.0 Figure 10.15 SpotLight. Attenuation: Constant is 0.05, Linear is 0.01, Quadratic is 0.01
