duck2.tech who? rt gpu

rt 1: Simple ray tracing with Blinn-Phong

2017-03-11

The first assignment is to make a basic(non-recursive) ray tracer with Blinn-Phong shading model.

Scene files are given in XML format and output is expected in PNG. I used sxmlc to parse the scene files and lodepng to encode pixels in the PNG format.

A simple scene file with one sphere and some triangles:

simple.png

rendering time: 0.17 s

A shading demonstration with a red shiny sphere and chalky matte platform:

simple_shading.png

Chalky sphere and red shiny platform:

simple_shading_inv.png

rendering time: 0.3 s

Bunny, a mesh of 4.9k triangles. Note the artifact on the bottom of bunny.

bunny.png

rendering time: 72.7 s

Rendering times are on a single core of the i3-3217U.

The raytracer is currently very crude, despite inlining the vector functions and compiling with -O3 -ffast-math we see long rendering times.