A physically based, CPU-driven Monte Carlo Path Tracer built from scratch in C++. This project is a comprehensive implementation of advanced global illumination and ray tracing techniques, capable of rendering highly realistic scenes with complex light interactions.
- Monte Carlo Integration & PDF: Implements Importance Sampling (Cosine and Light source sampling) via Probability Density Functions (PDF) to drastically reduce noise and converge faster.
-
BVH Acceleration: Uses Bounding Volume Hierarchies (
bvh.h) for$O(\log N)$ ray-object intersection, enabling scenes with thousands of primitives. -
Advanced Materials:
- Microfacet-like behaviors including Dielectrics (glass/refraction), Metals (with fuzziness), and Lambertian diffuse.
- Emissive materials (lights) and Volumetric materials (constant medium/fog/smoke).
-
Procedural & Image Textures: Support for solid colors, image-based mapping (
stb_image), and procedural 3D Perlin noise (perlin.h). - Geometry: Supports spheres, oriented quads (rectangles/boxes), and compound volumes.
- A modern C++17 compiler (GCC/Clang/MSVC)
- CMake (3.10+)
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
makeRun the executable and redirect the output to a .ppm file:
./PathTracer > image.ppm

