Painting and Lighting the Polygons
Painting the Polygons
A house might be covered with bricks, and bricks have a certain color and texture. The roof is covered with shingles, and there are doors, windows and more. The way you make all these things look realistic in a video game is to cover the house in different texture maps. A texture map holds color information and texture information.
The graphics card lays different texture maps onto the house's polygons. The texture maps make the walls of the house look as if they’re covered with rough, red bricks. To your eyes, it looks very realistic. But inside the computer, it is just a polygon covered with a textured image and rotated so it looks like it has the right perspective.
Lighting the Polygons
Now that the polygons have the right perspective, and they have color and texture, it’s time to light them. Getting the lighting to look realistic is a very big deal in video games. For example, if a house is lit by bright sunlight it will look one way. If a car’s headlights light it at night, it will look completely different.
Most modern video games handle many different sources of light, and they must consider reflections. If your character is inside the room, light might be coming from a lamp or a window. If the walls are bright green, then the light reflecting off the walls will create a greenish tinge on other objects in the room. If someone shoots a gun in the room, the muzzle flash adds another source of light for a few milliseconds. And don't forget about shadows. Any point source of light (like the sun or a lamp) will cast a shadow. Realistic video games show you the shadows.
Now that the polygons are colored, textured and lit realistically, the environment in your game will look pretty much like the real thing.
|
0-30 IN ONE SECOND
In a video game, the computer programs that make up the game have to display a new image on the screen every thirtieth of a second. That means that the video game’s computer has to calculate all the polygons, all the lighting effects, all the player movements, all the explosions and other stuff in a thirtieth of a second.
|
<< Prev |