A physics-based renderer, including support for a variety of rendering algorithms, materials, illumination sources, and sensors. The final project explore fur rendering.
Paper references:
- Ling-Qi Yan, Henrik Wann Jensen, and Ravi Ramamoorthi. 2017. An Efficient and Practical Near and Far Field Fur Reflectance Model. ACM Transactions on Graphics (Proceedings of SIGGRAPH 2017) 36, 4 (2017).
- Ling-Qi Yan, Weilun Sun, Henrik Wann Jensen, and Ravi Ramamoorthi. 2017. A BSSRDF Model for Efficient Rendering of Fur with Global Illumination. ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2017) 36, 6 (2017).
The Dirt repository contains source code that are a part of the actual ray tracer as well as other external libraries that dirt depends upon.
The external dependencies are located within the ext subdirectory, and include:
filesystem- for manipulating paths on Linux/Windows/Mac OSjson- for handling json input file formats of scenesstb_image- for loading and storing imagestinyformat- pretty formatting and printing of stringspcg32- a small, self-contained cross-platform random number generator
The major components of the dirt can be split into the following.
- Utility
- argparse.h - class to help parse command-line arguments
- common.h - utility code used throughout dirt.
- image.h - manipulates image data.
- obj.h - loading geometry data from OBJ files.
- parser.h - parse dirt scenes and data structuresa from a JSON file.
- progress.h - manage/print a progress bar on the command-line
- timer.h -
- Math
- transform.h - contains code that implements 3-D transformations.
- vec.h - functionality related to N-D vectors (including colors), 4x4 matrices, rays, and axis-aligned bounding boxes
- Raytracing
- camera.h - contains the camera class that represents the virtual camera placed inside a scene.
- material.h - contains the material class that determines the shaded color of an object.
- surface.h - contains the base surface class that represents any geometry within the scene.
- surfacegroup.h - contains the base class for aggregate/grouped geometry (an acceleration structure)
- scene.h - contains the scene class that stores all geometry, materials and camera.
- testscenes.cpp - a few hard-coded scenes
Building from the command-line generally looks like this:
mkdir build
cd build
cmake ..
cmake --build . -j 4
More detailed instructions for building dirt are provided in the course website.
Check the LICENSE file