who? rt

rt 1: Simple ray tracing with Blinn-Phong


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:


rendering time: 0.17 s

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


Chalky sphere and red shiny platform:


rendering time: 0.3 s

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


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.