A SERVICE OF

logo

89
Chapter 8
8. Lighting and Fog
This chapter discusses two features implemented by subclasses of csEnvironment,
lighting and fog.
Lights illuminate shapes in a scene. Without lights, shapes are not visible.
To limit the range of a light, such as limiting the rays of a light to the room it is in,
you include the lights in the light array in csEnvironment.
Fog makes an image appear more natural by fading objects in the distance. You
include fog in csEnvironment.
This chapter describes rst how to use lights, change the shadow modeling, and change
the screen to one color. It then discusses how you can use fog for atmospheric effects such
as smoke, haze, or mist.
This chapter contains the following sections:
•“Using Lights in Scenes on page 89.
•“Limiting the Scope of Lights on page 92.
•“Using Fog in Scenes on page 93.
Using Lights in Scenes
Cosmo 3D provides a variety of light types. This chapter describes the light types
presented in Cosmo 3D in addition to the virtual light class, csLight, from which you can
create your own light objects.