cs6620 Project 9 Instancing
Abe Stephens
Creative Images:
225 trucks. Each truck has 59792 faces and 150 submeshes, many of
which are dielectric materials.
Another view at ground level of the above scene.
I implemented instancing by wrapping the instanced object with a
TransformInstance class. This class manipulated rays bound for the
instance and stored normals and texture coordinates in the hit record
at the time of intersection. The normal and hit position were stored in
world coordinates.
I didn't test out placing the individual instances
in any acceleration structures (i.e. a bvh of bvh's) but it is likely
that this would improve performance. The scene above took 44 minutes to
render with my 3.0 Ghz dual Xeon with 16
samples per pixel, an
acceleration structure would have been helpful for sure. (So would a
camera position that isn't directly behind a dielectric mesh.)
Before instancing my truck model I spent a great deal of time working
with a model of a white spruce tree. This model presented a few new
challenges to even render. The model was composed of a mesh for the
trunk and billboard leaves with an alpha channel texture. I
had to create a triangle primitive for the leaves that would perform a
texture lookup in order to determine if the ray struck part of the leaf
in the texture. In the end with sub-pixel sized leaves the
tree model was difficult to light and required a large amount of
multisampling to create a useful image. Here are some examples of this
model:
At first I was going to submit this image, however it is impossible to
distinguish the trees from one another. (They are all rotated
differently, who could tell?) I think that a more
sophisticated lighting model would help and perhaps some additional
depth cues as well.