Alex McAusland's project page
Real time ray tracing
My current project is a real time ray tracer for interactive graphical applications. It has long been speculated that ray tracing will replace rasterization, often quoted are its sub linear time complexity and superior image quality. Effects such as accurate shadows, reflection and refraction are trivial. It is an exciting time for ray tracing; it scales linearly with the number of available processors and with the latest multi core CPUs interactive frame rates are possible. I believe we are approaching the point where ray tracing starts to exceed rasterization in both performance and image quality.
Note that the following images are generated entirely on the CPU with no use of graphics hardware. The desk scene contains ~ 300,000 triangles, the manuscript scene ~ 4.3m and the dragon scene ~7.2m. On my 2.8GHz dual core Xeon workstation at 320x240 resolution I get ~30FPS for the desk scene, ~20fps for the manuscript and ~15fps for the dragon. The bunny in the desk scene, the manuscript and dragon models are all courtesy of the Stanford 3D Scanning Repository. I intend to add a downloadable demo soon.
Technical details
Key to the sub linear performance of a ray tracer is the acceleration structure used to cut down the number of triangle intersection tests for a given ray. I use a Kd tree; a binary tree that subdivides space using axis aligned splitting planes. I currently build this tree offline based on a technique outlined here.
The rendering engine is multi threaded and scales almost linearly with each additional processor used. Hyper threading also gives around a 30% performance improvement.
Implemented in C++ the raytracer utilises intrinsics. Modern desktop processors feature a number of vector instructions; instructions that operate on multiple data elements simultaneously, eg the SSE and SSE2 instruction sets. Using these instructions each thread of execution traces up to 4 rays at once rather than 1, see here.
Offline ray tracing
My first foray into ray tracing, this was designed for high quality images.
Technical details
Octree bounded volume hierarchy for intersection test acceleration
Support for triangles, spheres and cylinder primitives
Texture and normal mapping, as visible in the grain of the wood above
Semi reflective/refractive materials, as shown in the monitor screen
Soft edged raytraced shadows using adaptive sampling and adjustable radius lighting
Filtering of texture/normal/other maps
Adaptive supersampling for anti aliasing where it's needed
Operates on scenes exported from 3D Studio Max, supporting animation of camera and primitives
Renders to bitmap and AVI
Written in C++
Software rasterizer
This was my first foray into computer graphics in general. It is a projection and rasterization based renderer; the same technique as used by current graphics hardware. There are some differences however; it features ray traced shadows.
Technical details
Per pixel lighting
Normal mapping
Ray traced shadows
Supersampling for soft edged shadows, or use of arbitrary geometry as light sources
Per pixel texture filtering - sampling of all texture elements that make up a pixel
Perspective correct rasterization / interpolation
Phong, Gouraud and Flat shading
Point and Spotlight light sources