Game Development Reference
In-Depth Information
Lighting and Reflections
An important part of developing realistic game environments is developing qual-
ities and attributes you see in normal life. How an environment is lit will play a big
role in how realistic that environment will look. Another important factor of an
environment is its reflective nature. A shiny object should reflect what is around it.
Lighting
Lighting is used in a game to illuminate the game geometry; it is updated every
frame so it simulates the real world. When designing the lighting for a game, you
need to understand two important things—where and what. By where, I mean the
location of the light. By what, I mean the type of light. Before you get into placing
a light, you need to understand the types of lights used in games. Some of the more
common lights are
Point light
Directional light
Ambient light
Colored light
Point Light
A point light is similar to the light given off by a light bulb. The light projects in all
directions and is brightest near the source. The light from a point light diminishes
with distance. Look at the light in Figure 1.14. Notice that the light gives off a
strong highlight on the ball. The area around the light is brightest; the areas on the
corners of the plane are darker.
Point lights are good for lighting a room or a local area outside where artificial
light is used, such as a streetlamp at night.
Directional Light
Directional lights simulate the light of the sun. The sun is a bright light source that
is millions of miles away. Its light rays are almost exactly parallel to each other as
they hit the earth's surface. A directional light illuminates everything evenly. Look
at Figure 1.15, and notice how the light on the plane is even. There is no darken-
ing with distance from the light.
 
Search WWH ::




Custom Search