Stained Glass Wall

By Jennifer Chandler


I used photon mapping and Beer's law to create a room with a stained glass wall. All of the lighting in the scene is indirect because the light source is a directional light coming from outside the scene. I simulated a directional light source with photon mapping by creating a plane behind the scene and sending photons originating from random locations on the plane in the direction of the light.

Photon Mapping:

I use the photon map directly to visualize the global illumination in the scene. I chose this method because I don't have any direct lighting in the scene. I also like that it gives a softer look to the shading on the walls for the indirect lighting. I used a high number of photons in the caustics photon map because I have a lot of caustics in the scene because of the stained glass wall. In the global photon map I only store photons that have had at least one diffuse reflection to avoid duplicating the caustic information. I noticed that without this the caustics all appeared white instead of the colors of the glass. When storing all bounces in the global photon map the scene looks like this:

Stained glass:

I modeled the stained glass wall by drawing it on graph paper and adding each triangle from the stained glass into the scene.Each piece of stained glass is modeled as a truncated triangular pyramid with a black border. I added perlin noise to the glass to make it look more like real stained glass since stained glass is normally not perfectly smooth.

Issues and Difficulties:

When I first switched to a directional light source instead of a point light source I ran into a problem where the caustics coming through the window were incredibly bright but the window itself just showed up as the background color. I was able to solve this problem by changing the background color to white which better represents light from outside and by modeling the glass window as two planes instead of one.

Another issue I ran into was when I modeled the glass as two planes next to each other I could see white bands near the edges. I discovered that this problem was because the glass was not a closed geometry so light could not properly bounce around in it and was instead showing the background color(white).

Inspiration and Idea:

One of my friends gave me the idea to render an image with stained glass. After looking online at images of stained glass I was particularly inspired by this one.