My Octopress Blog

A blogging framework for hackers.

Stanford Dragon and Gouraud Shading

I recently finished up school, and part of that was finishing up my ray tracing project. At the last minute, I implemented Gouraud shading which is a technique to try to smooth out a triangulated surface. What it really does is just linearly interpolate the normal vectors, where the normal of a vertex is calculated as a weighted average of the normals of the triangles using that vertex.

Long story short: [caption id=”attachment_542” align=”aligncenter” width=”300” caption=”A render of the Stanford bunny with my raytracer without Gouraud shading.”]A render of the Stanford bunny with my raytracer without Gouraud shading.[/caption]

[caption id=”attachment_543” align=”aligncenter” width=”300” caption=”A render of the Stanford bunny with smooth Gouraud shading.”]A render of the Stanford bunny with smooth Gouraud shading.[/caption]

Also, thanks to an improvement in my parallelization of the problem and a speedup in octtree traversal, I was able to render the Stanford dragon model (~1 million triangles):

[caption id=”attachment_544” align=”aligncenter” width=”300” caption=”The Stanford dragon model.”]The Stanford dragon model.[/caption]