[ First Section | Previous Chapter | Next Chapter | Main Index ]

Chapter 4

Light and Material


In order to create realistic scenes, we need to simulate the way that lights interacts with objects in the world, and we need to consider how that world is perceived by people's visual systems. OpenGL uses a model of light and vision that is a rather crude approximation for reality. It is far from good enough to fool anyone into thinking that they are looking at reality, or even at a photograph, but when used well, it is good enough to let the viewer understand the 3D world that is being represented.

Much more realism is possible in computer graphics, but the techniques that are required to achieve such realism are not built into standard OpenGL. Some of them can be added to OpenGL using the GL Shading Language, which makes it possible to reprogram parts of the OpenGL processing pipeline. But some of them require more more computational power than is currently available in a desktop computer. The goal of OpenGL is to produce a good-enough approximation of realism in a reasonable amount of time -- preferably fast enough for interactive graphics at 30 to 60 frames per second.

This chapter will look at the OpenGL approach to simulating light and materials. So far, we have used only the default setup for lighting, and we have used only simple color for materials. It's time to look at the full range of options and at a bit of the theory behind them.


Contents of Chapter 4:


[ First Section | Previous Chapter | Next Chapter | Main Index ]