CS6620 Assignment6
From Dangerski
[edit] Assignment 6 Add Acceleration Structures
[edit] BVH
I chose to implement the BVH. I tried a couple ways of splitting up the objects per node. Render times are based on the given scene file(3 samples/pixel). The render times are done on my laptop with a bunch of other programs running so I could probably get them a little faster if I closed everything.
-Method 1: Cycle the axis being split on (e.g. x,y,z,x,y,z...) and splitting the bounding box down the middle of that axis.
- Setup/Load time: 2.76 s
- Render Time: 9.57 s
-Method 2: Cycle the axis being split and then sorting the centroids of the bounding boxes of that axis and choosing the median value. This tends to give a more balanced tree.
- Setup/Load time: 2.95 s
- Render Time: 11.1 s
-Method 3: Pick the axis of the longest side of the bounding box and then splitting the bounding box down the middle of that axis.
- Setup/Load time: 2.87 s
- Render Time: 9.99 s
-Method 4: Pick the axis of the longest side of the bounding box and then sorting the centroids and picking the median.
- Setup/Load time: 2.94 s
- Render Time: 10.7 s
I also added the optimization of stopping the intersection tests if the current T value is closer than the BVH node.
I ended up using method 1 since it was the fastest and it turns out is the simplest to implement. I chose not to use any vector storage classes to speed up my BVH. I allocate 1 array of object pointers and then just store pointers in the BVH nodes. For the MPM data sets I had to set the radius of the spheres to small values like 0.0003 and 0.0002.
- Reference image produced by my raytracer
[edit] Creative images
All are 3 samples/pixel.
- Bullet MPM Dataset, 549128 Spheres, RenderTime: 88.3 seconds
- Cylinder MPM Dataset, 212980 Spheres, RenderTime: 15.9 seconds
- Hmx MPM Dataset, 809533 Spheres, RenderTime: 20.6 seconds
- Code




