This repository illustrates the course work I completed as part of a course in offline and real-time rendering techniques in the Fall of 2019.
Included in this rendering engine are techniques like Monte-Carlo sampling methods to perform ray-tracing, path tracing, and biased rendering methods such as density estimation. Rendering is performed by building a framework around OpenGL.
These methods are used to render scenes with objects that are made of various materials, such as diffuse and glossy ones (represented using different bidirectional reflectance distribution functions).
The source code is made modular, with the following folders containing code relevant to various functions, as described below:
- core : Contains rendering and integrator base classes, as well as classes providing acccelerator structures, such as bounding volume hierarchies (which I did not write)
- bsdfs : Contains various implementations of reflectance, to account for diffuse and specular surfaces
- integrators : Contains implementations of various integrators, varying from simple integrators based on surface normals, to global illumination using path space-based integration.
- renderpasses and shaders: contain implementations for real-time rendering of scenes using techniques mentioned above, using OpenGL. An example of neat features include casting of shadows as the camera moves around in the scene.
Of noteworthy mention is the work I did as part of the final project this course.
I implemented (in conjunction with a collaborator) a photon mapping integrator (contained in src/integrators/ppm.h), which uses density estimation techniques to render scenes that contain tricky paths such as diffuse-specular interactions. We use a KD tree to store photons that we deposit in the scene from light sources, and susbequently render illumination towards the camera at a given shading point, using information obtained from the k-nearest neighbours.
Results of this work can be seen in the HDR images (.exr) rendered, contained in the data/a6/cbox/ directory. The cbox_pm_fg.exr image is the image we used as a proof of implementation, using 32 samples per pixel.