Specular GI Reference

Specular GI Reference

Recently, I was sitting in an office and I noticed some really cool light shafts that seemed to be dancing on the ceiling. Here’s a picture.

Looking closer, the tree outside is also casting a shadow.

Huh??? How is the sun casting a shadow on the ceiling? I was pretty confused for a few seconds there.

Then it became obvious: The shadows on the ceiling were the specular reflections from cars on the road. Here is a picture from that window looking down. The office is on the second floor.

In the photo we can see a specular highlight on the car. Based on the photo you would think that the specular highlight is about as bright as the sky since they are both overexposed. But in reality that little specular highlight is many times brighter than a point on the sky. I’m always amazed at how bright specular highlights can be.

Just to keep things straight, here is a diagram.

The path of light is:

  1. Light comes from the sun.
  2. Reflects off the car as a specular reflection.
  3. Gets shadowed by the tree outside.
  4. Goes through the window.
  5. Hits the ceiling.
  6. Turns into diffuse light to be seen by the viewer.

Let’s suppose that we wanted to simulate this scene in realtime on a console. We have a bunch of cars zipping by. Each car is causing a specular reflection. But cars are curved so the reflected specular light gets spread out. Then that highlight needs to be shadowed by the tree and window to hit the ceiling. How would we do that? I have no idea. Wait for the Playstation 8?

So yes, specular reflections can be very, very bright. To do GI properly, every single car is bright enough that it needs to be accounted for. Also, many other dialectric surfaces (especially smooth ones) become very specular at grazing angles. Cars aren’t the only objects that cause specular reflections.

In summary, accounting for specular in global illumination is hard. In other shocking news, water is wet.

comments powered by Disqus