Chapter 14

Lights and Materials

image

Objectives

By the end of this chapter, you should:

  • know the difference between direct and indirect illumination;
  • understand how directional lights and point lights are defined;
  • understand how ambient and diffuse shading work;
  • have implemented ambient and diffuse shading with directional and point lights and a matte material.

In this chapter, I’ll start to discuss shading, the process that gives visual appearance to objects. Without shading, we can only render objects with constant colors, as in Chapter 3, where all of the objects look flat. Shading results from the interaction of light with the surfaces of objects, ...

Get Ray Tracing from the Ground Up 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.