exRay (2008)

Windows, C++, WinAPI

exRay is a classic recursive raytracing renderer I've developed as a personal research project during my BSc studies.

The algorithm presented here is the classic Whitted ray-tracing extended with some very basic Monte Carlo like sampling. The rendering process is fully multithreaded with almost perfect scaling (rendering time halves when number of participating CPU cores is multiplied by two) and the image is synthesized from top to bottom with each worker thread rendering a single scanline at a time.

The design is strongly object-oriented with fundamental data structure being the scene graph. exRay follows open/closed principle with only a handful of core classes; it is as such easily extendable with new capabilities such as: new geometry types for rendering different kinds of objects in the scene or new shaders allowing different illumination models to be simulated. The scene graph itself can be fully described using the scene description language which is also the standard input file format used.

Implemented geometry classes include: planes, spheres and axis-aligned boxes.

The renderer supports: Phong shading, reflections, transparency and refraction, hard and soft shadows, area lights, blurry reflections, regular-grid and simple Monte Carlo sampling, and image supersampling for antialiasing.

However intended as a learning exercise exRay is relatively simple: it cannot render arbitrary triangular meshes and does not implement any intersection acceleration structure such as a KD-tree.

Links