Triangle Meshes

Posted: October 31, 2011 in RayTracing

I added the functionality to bring in meshes using my 3ds Max exporter to render more interesting objects. This also meant introducing an acceleration structure due to the number of triangles. I implemented both an Octree and a kd-tree, both work well but the kd is more efficient and renders slightly faster, as its nodes are implemented using only 4 bytes, in a fixed array, as opposed to a linked list, so they’re a lot more cache friendly. I also implemeted the recursion using a while loop instead of stack recursion which provided a little improvement too.

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s