Ray Tracing Projects

Assignment 7: Glass and Mirrors

Return to Ray Tracing Assignment Overview
 

"Fun" used to be marble and texture maps.  Not anymore.  When you throw glass and mirrors into the picture, it's a whole new ballgame.

Now, glass and mirrors, I found, are only interesting if they are in some environment...so I had to create one for them.  (Yes, I realize that I didn't have to use a Cornell Box color scheme, but I was feeling a little left out because I didn't have a Cornell Box of my own.)  Each wall is made from 128 triangles in order to get the shading correct.  There are six walls to my box; triangles (e.g. the ones that make up the near wall) are only culled with respect to the ray that hits them.  So, for our purposes, the viewer can see into the box but the reflective objects still see all the walls.

Below are sample output images.  Each one contains a partially reflective marble sphere, a lambertian sphere,  a near total reflective sphere, a partially reflective texture mapped (pool ball) sphere, and a dielectric (usually glass) sphere.  Except when noted, the walls and ceiling are lambertian while the floor is partially (35%) reflective.  The point light is about 1/4 back in the room in the z-direction and near the ceiling.
 


Different Material Spheres Inside a Cornell Box
400x400 JPEG converted from 500x500 PPM output
17.125 seconds
 


Very Thin Hollow Glass Sphere in Foreground
400x400 JPEG converted from 500x500 PPM output
17.125 seconds
 


The View from Above
400x400 JPEG converted from 500x500 PPM output
27.234 seconds
 


Another View, Closer
400x400 JPEG converted from 500x500 PPM output
25.9 seconds
 


Both Floor and Ceiling at 50% Reflective
400x400 JPEG converted from 500x500 PPM output
21.781 seconds
 


View from the Corner
400x400 JPEG converted from 500x500 PPM output
21.328 seconds
 


All Walls at 90% Reflective
Light at 70%, Global Ambient at 5%
400x400 JPEG converted from 500x500 PPM output
60.359 seconds
 

UPDATE! There is another cool glass image at the bottom of the Soft Shadows & Fuzzy Reflection page.

The maximum number of bounces was set at 8 for all of the above images.  Executable compiled with Microsoft Visual Studio .NET Professional and run on a Dell desktop with an Intel Pentium 4 1.8 GHz processor with 1.0GB of RDRAM running Microsoft Windows XP.

email at jasonwaltman dot com

(c) 2000-2007 jason waltman