cs6620 Ray Tracing.

Project 6
Abe Stephens

Required Images

Unless otherwise noted, all rendering times are with four threads on a dual Xeon.


Required Image:
BVH: 0.815224 sec (4 threads) 2.13323 sec (1 thread)
     Build: 0.965906 sec
Grid 70x70x40:
     0.804214 sec (4 threads) 2.09292 sec (1 thread)
     Build: 0.77698 sec

Cook filter, 3 spp support 3.
Cook filter, 3 spp support 3. Dielectric Material.

Creative Images


This is the Budda model, 1087716 faces.
This is the Budda model rendered with an ambient occlusion technique.

This is a model of a toy truck (59792 faces) that I made some time ago and recently exported from an open source modelling package. Unfortunately the package did not order the faces correctly and in some cases did not produce connected, closed meshes. As a result it wasn't extremely easy to automatically correct the normals in the mesh and there are some artifacts.
The image was produced with an ambient shader on the floor and vehicle body. I used 100 secondary bounces for each shader. I'm not too thrilled about the "shadows" adjacent to studs on the roof line and hud and I'm not convinced that the technique did a good job on the windshield and hood.
This is the same toy truck model. The entire model has a dielectric material with Beer's law attenuation.

This is a closeup of the JP8 dataset (approx 1.1M particles). I have color mapped it with invrain16.nrrd colormap using the first scalar value. This uses a Lancos Sinc filter, 3spp width 2.
With a BVH and 1spp box filter, this image renders in 2.08981 sec. Render time with a grid is around 1.5304 sec. I didn't spend a great deal of time improving the performance with these data sets since I work with them on a regular basis.
This is the HMX dataset containing around 800,000 particles. I've applied the same colormap as before. This image is 5spp with a Lancos Sinc filter width 2.  The performance viewing the extents of the model, rather then the details provided much better performance, even though more geometry was visible.

Description

Performance Template

For this project I implemented a BVH and regular grid for both triangles and spheres. Both structures duplicated their respective primitives. I found that in the case of triangles, this provided a performance increase over a naive indexed representation. I had hoped to implement the structures using a level of indirection in the leaves but  I didn't get around to it in time. The BVH always divides geometry down until only one element is reached (except in certain cases where a group of objects cannot be further divided). I simply chose the median along each axis iteratively in constructing the BVH.  I constructed two regular grids one for triangles and one for particles. Each grid cell contained two pointers into a sorted list of primitives (this list would contain duplicates if an object appeared in more then one cell). Making a data structure specifically for triangles or particles enabled me to avoid an extra level of indirection between the terminal nodes of the acceleration structure and the actual data. Even though the data in this case was relatively small, some of the structures used considerable memory due to the duplication of objects. This design choice probably deserves more attention in the future.