Introduction

Implemented for my final project is a uni-directional path tracer capable of generating high quality images. Below are a list of features of what the project is capable of and a gallery demonstrating the end results.

Features

Global Illumination

Core rendering algorithm is path tracing with multiple importance sampling to reduce variance. As such, effects like ambient occlusion and color bleeding are rendered.

Materials

Different types of BRDFs (bi-directional reflectance distribution function) implemented including Lambert diffuse, Blinn-Phong specular and the physically based microfacet Cook-Torrance. Composite BRDFs such as velvet and car paint have been implemented also. All BRDFs are importance sampled. Refractive materials (e.g. glass) are also supported.

Light Sources

Primitives and arbitrary meshes with non-zero surface area can be used as emissive light sources. The Perez sky model is also implemented to provide more realistic lighting.

Geometry

Support for multiple rendering primitives including triangles, spheres, discs, planes and cones.

Textures

Procedurally generated textures such as checkboard and perlin noise are supported.

Volumes & Subsurface Scattering

Volumes are rendered using a method called Woodcock delta tracking. This allows an unbiased, global illumination solution with subsurface scattering for volume rendering.

Acceleration Structure

Bounding volume hierachies (BVH) with surface area heuristics (SAH).

Post Processing

Output is sRGB converted and gamma corrected. Available additional post processing include filmic tonemapping and vignetting. Antialiasing is done through jittered sampling.

Multithreading

Supports CPUs with multiple cores. Is capable of rendering large and complex scenes on machines with dedicated amounts of RAM.


Gallery

Complex Scenes & Lighting

image 1 0f 3 thumb
image 2 0f 3 thumb
image 3 0f 3 thumb

Materials

image 1 0f 6 thumb
image 2 0f 6 thumb
image 3 0f 6 thumb
image 4 0f 6 thumb
image 5 0f 6 thumb
image 6 0f 6 thumb

Volumes

image 1 0f 1 thumb
image 1 0f 2 thumb

Implementation Details

The core rendering algorithm is uni-directional path tracing with multiple importance sampling based on my reading from Veach's thesis. Multiple importance sampling was chosen because it greatly reduces the amount of variance (noise in the image) with less samples. Bounding volume hierarchies (BVH) have been implemented as an acceleration structure. Surface area heuristics are used in conjunction with BVH because it performs better than classical splitting methods (e.g. split along longest bounding axis) since the cost of surface area and number of objects are weighted, thus making it more suitable for raytrace based methods.

Various BRDFs have been implemented, thus allowing expressive material shading. Support for physically based BRDFs such as Cook-Torrance have been implemented with both Blinn-Phong and Cook-Torrance importance sampled based on their distribution term. Composited BRDFs velvet and the more complex car paint have also been implemented. For the composite BRDFs, a BRDF is chosen along each vertex within a path and importance sampled.

Volume rendering is done using Woodcock delta tracking which provides an unbiased correct solution to volume rendering unlike raymarching by determining scatter events along a path. The volumetric pathracing allows the rendering of light scattering within a volume using a phase function. Only the isotropic (uniform scattering in all directions) phase function has been implemented.


References

Rendering, Global Illumination & Path Tracing

Geometry & Acceleration Structures

Materials

Lighting & Luminance

Image & Postprocessing

Volumes