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.
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
- Robust Monte Carlo Methods for Light Transport Simulation (A MUST READ) - Eric Veach
- Path Tracing Everything - D.A. Forsyth
- A Survey of Importance Sampling Applications in Unbiased Physically Based Rendering - Dietger van Antwerpen
- Importance Sampling for Production Rendering - Colbert, Premoze & Francois
- The Rendering Equation - James T. Kajiya
- Physically Based Rendering: From Theory to Implementation (Book, 2nd Edition) - Matt Pharr & Greg Humphreys
Geometry & Acceleration Structures
- Fast, Minimum Storage Ray/Triangle Intersection - Tomas Moller & Ben Trumbore
- On Fast Construction of SAH based Bounding Volume Hierarchies - Ingo Wald
- Spatial Splits in Bound Volume Hierarchies - Martin Stich, Heiko Friedrich, Andreas Dietrich
Materials
- Experimental Validation of Analytical BRDF Models - Ngan, Durand & Matusik (MIT)
- Microfacet BRDF - Simon's Tech Blog
- Physically-Based Shading at Disney - Brent Burley
- A Reflectance Model for Computer Graphics - Robert L. Cook & Kenneth E. Torrance
- Efficient Acquisition and Realistic Rendering of Car Paint - Gunther, Chen, Goesele, Wald & Seidel
- Measurement and Editing of Metallic Car Paint BRDF - Martin Rump
- Advanced Lighting and Materials with Shaders (Book) - Kelly Dempski & Emmanuel Viale
- Layered Car Paint Shader - ATI Research
Lighting & Luminance
- Modeling Skylight Angular Luminance Distribution from Routine Irradiance Measurements - R. Perez, R. Seals & J. Michalsky
- Sky Models for Lighting Simulation - John Mardaljevic
- CIE General Sky Standard Defining Luminance Distributions - Stanislav Darula & Richard Kittler
Image & Postprocessing
- A Standard Default Color Space for the Internet - sRGB - Stokes, Anderson, Chandrasekar & Motta
- Derivation of the "Cosine Fourth" Law for Falloff of Illuminance Across a Camera Image - Douglas A. Kerr
- HDR Lighting (Filmic Tonemapping) - John Hable
Volumes
- Exposure Render: An Interactive Photo-Realistic Volume Rendering Framework - Thomas Kroes, Frits H. Post, Charl P. Botha
- Volumetric Path Tracing (Cornell University Course Notes) - Steve Marschner
- Production Volume Rendering (SIGGRAPH 2011 Course Notes) - Magnus Wrenninge (Sony Imageworks) & Nafees Bin Zafar (DreamWorks)
- Free Path Sampling in High Resolution Inhomogeneous Participating Media - Laszlo Szirmay-Kalos, Balazs Toth, & Milan Magdics
- Unbiased Global Illumination with Participating Media - Matthias Raab, Daniel Seibert, and Alexander Keller
- Simulation Tools (starting on pg. 60) - Irene Buvat