Why did we choose a chess scene?

We chose a glass chess set as a subject because we thought caustics were very interesting visual phenomenon, and wanted to simulate this effect in our raytracer. While any glass object would do, spheres and cognac glasses are done too often and a chess piece seemed like it had potential for interesting caustics, and Robert likes chess.


Reference Image:

Techniques We Implemented:

- Photon Mapping (global and Caustic maps)
- Phong glossy reflection (also used for frosted glass)
- Depth of Field
- Beer's Law attenuation
- SSE-enabled Quad Bounding Volume Heirarchy

Photon Mappingglossy frostDepth of Field

Why We Implemented These Techniques:

In order to do accurate caustics that could render in less than a week, it was necessary to use a caustic photon map. This motivated the desire for a scene that could also benefit from global illumination using a global photon map.

The phong glossy reflectin/refraction was motivated by the boringness of a chess set with only one (maybe two) color pieces compared to a glass (white) vs frosted glass (black) set. Also it looks cool.

To give the scene more character and highlight the chess pieces in the forground we wanted to add depth of field.

The use of a QBVH, while having no visual impact on the image, was very useful in allowing us to finish the render before 3pm. It provides about a 75% speedup to tracing each ray (taken from rendering sponza with no material effects: 7s average rendering time down to 4s).

Our Life Story for the Past Week:

Depth of field and phong reflection/refraction were fairly straightforward with no real hang ups. The most difficult parts of development usually had to do with the directional light.
First major speedbump was getting the Directional Light to emit photons (somewhat) correctly. When we tried to integrate the photon map with the directional light all the photons ended up at the same point on the image. After getting that to work, Robert tried to modify the projection map to work with the directional light by projecting objects onto a plane oriented normal to the direction of the light. This seemed to work. Until we put it into our scene and tried to map caustic-generating objects to it. Eventually we found the problem to be the random cell-choosing loop to be bugged...but it took many....many hours.

Caustics Take One Caustics Take Two

Some notes and considerations (in hindsight):

We realized Sunday night that simply a directional light would not suffice for the level of indirect illumination we wanted since it could not simulate the ambient light from the sky. Not having enough time to implement a skybox or dome light (at this point the caustics photons were still not cooperating), we decided to fake it with a large area light that wouldn't cast shadows. This was fine in principle, however we accidently accounted for its direct illumination twice in the final image, leading to brighter back walls than desired and less prominent shadows on the chess board.
Then later we realized a bug in the global map that caused it to be darker than it was supposed to be. After fixing this it turns out there was no need for the the area light. Cry Tears.

- It is a little noiser than desired. Had we more time, we would have concentrated on using a a stratified sampling method and a better random number generator than rand(). We did attempt to use the Van Der Corput sequence (and did, for the AA samples) but it was producing banded results so we dropped it in the interest of time. The option of course would have been more samples, but alas, there wasn't more time.