Rich Virtual Point Lights
This was my bachelor thesis in 2017.
Abstract
Since Turner Whitted published his ray tracing algorithm, the field of computer graphics has come a long way in the pursuit of ever more realistic images. Where he had to resort to perception-based approximations, that were good enough to fool the viewer but weren’t physically correct, technical advancements lead to more methods becoming feasible, that modelled reality. The introduction of the Rendering Equation helped unify various rendering algorithms under a common mathematical model and enabled global illumination. I implemented Rich-VPL, a biased many-lights algorithm allowing for light transport on diffuse, shiny and specular surfaces, for PBRT-v3. As it is less reliant on Monte-Carlo integration it produces smoother images than path tracing for finite render times. I created two implementations, using textures to store the outgoing radiance for a virtual light in one, or intersection information to calculate it on-demand for any direction required in the other. Both implementations considers only the previous step in its light path for a virtual light source’s incident radiance and do not allow for specular light transport. The biggest shortcoming of this kind of algorithm is incorrect representation of short-distance light transport, which tends to overcontribute. To counteract these weak singularities a short-range ray trace is done as bias compensation. This results in good representation of diffuse, glossy and shiny materials on medium and long distances, given enough virtual lights. The implementations scale linearly in time with the number of lights.
Reproduction
First check out PBRT with all dependencies
$ git clone --recursive https://github.com/Chais/pbrt-v3.git
PBRT uses cmake as its build system. On Linux and OS X, cmake is available via
most package management systems. For Windows, or to build it from source, see
the cmake downloads page.
- Run
git checkout book
for the implementation storing outgoing radiance orgit checkout rvpl-is
for the implementation storing incoming radiance. - For command-line builds on Linux and OS X, once you have cmake installed,
create a new directory for the build, change to that directory, and run
cmake <path to pbrt-v3>
. A Makefile will be created in that current directory. Runmake -j4
, and pbrt and some additional tools will be built. - To make an XCode project file on OS X, run
cmake -G Xcode <path to pbrt-v3>
. - Finally, on Windows, the cmake GUI will create MSVC solution files that you can load in MSVC.