Chapter 6

Lighting

Figure 6.1 shows how important lighting and shading are in conveying the solid form and volume of an object. The unlit sphere on the left looks like a flat 2D circle, whereas the lit sphere on the right does look 3D. In fact, our visual perception of the world depends on light and its interaction with materials, and consequently, much of the problem of generating photorealistic scenes has to do with physically accurate lighting models.

image

Figure 6.1: (a) An unlit sphere looks 2D. (b) A lit sphere looks 3D.

Of course, in general, the more accurate the model, the more computationally expensive it is; thus a balance must be reached ...

Get Introduction to 3D Game Programming with DirectX 10 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.