CS 684, Homework #5

Bounding Volume Hierarchy

Ryan Graham


The purpose of this assignment is to implement an efficiency structure for ray tracing scenes with many objects. For the assignment I traced scenes with: 1, 10, 100, 1000, 10000, 100000, & 1000000 spheres respectivley. The spheres position and size were obtained by the following alogrithm:

     for (i = 0; i < N; i++) {
          center[i] = Point3( 2*drand48()-1, 2*drand48()-1, 2*drand48()-1);
          radius[i] = 0.1 / pow(N, 0.333);
      }

The camera parameters are as follows:
    lookfrom = (0, 0, 2)
    lookat (0,0,0)
    fov = 90 degrees.

The scenes were traced at 512 x 512 and were sampled at 1 sample/pixal ( Here are the images  )
 

Here are the results:
Number of Spheres Time
1    1.01s
10    2.4s
100    6.7s
1000   18.44s
10000   47.21s
100000 119.93s
1000000 (yeah, yeah, I'm still tracin this one...)
 

Conclusions:
Well, mine didn't seem to fair as well as some of the other students, but I'm going attribute it to the fact that I plugged this into my big general ray tracer, with a big ugly lighting equation and so forth. I'm doing this only to make myself feel better, and not because any of the above mentioned BS is actually the case (Although, there was a tremendous improvement over my big general ray tracer without the bounding volume hierarchy).



Comments:  Ryan Graham