LerpworksAcademy
On this page

Graphics › Light

Direct and indirect light

Know first: Normals and light, Surface properties: roughness, metallic, AO, How an engine draws a frame: passes and the G-buffer

Light reaches every point of a scene by two routes: straight from a source, and bounced off everything around it. The second route is why shadows are not black, and why a room is bright even where the sun never shines. This lesson goes through the kinds of light source and why a lamp twice as far away gives only a quarter of the light. It also explains why the sun is thousands of times brighter than a room, and how engines calculate bounced light. It is the sixth lesson of the course “How an engine draws a frame.”

Why this matters

In the lesson “Normals and light,” a face grew brighter as it turned toward the sun, and a face turned away went black. In real life, shadows are almost never black. Without the second route, these things make no sense:

  • why a shadow on a sunny day looks bluish, and why you can see every corner of a room by the window;
  • why a lamp raised higher lights a table much worse, while the sun lights the ground and a rooftop equally well;
  • why the same scene is black one moment and blown out the next, and what the camera’s “eye” is adjusting;
  • what Lumen, baked light and probes are, and what they charge for their good looks.

Further in the article

  1. Two kinds of light at every point
  2. Light sources
  3. Twice the distance, a quarter of the light
  4. How much light: the sun against a room
  5. Bounce after bounce
  6. Global illumination: methods by cost
  7. Where it breaks
  8. Connections: the same idea in other fields
  9. Key points
  10. Test yourself