A high-performance Monte Carlo Path Tracer with an interactive GUI, built from scratch in C++17. This project implements physically-based rendering (PBR) techniques including GGX microfacet materials, Bounding Volume Hierarchy (BVH) acceleration, and AI-powered denoising.
- Monte Carlo Path Tracing with unbiased global illumination
- Russian Roulette path termination for efficiency
- Multiple Importance Sampling (MIS) with power heuristic
- Next Event Estimation (NEE) for direct light sampling
- Lambertian diffuse surfaces
- Metal with configurable roughness
- Dielectric (glass/water) with Fresnel and refraction
- GGX Microfacet for realistic metallic highlights
- Emissive materials for area lights
- BVH (Bounding Volume Hierarchy) with Surface Area Heuristic
- Multi-threaded tile-based rendering using C++ threads
- Intel OIDN AI denoiser integration
- Real-time progressive rendering
- WASD + mouse camera controls
- Live material and lighting adjustments
- Scene file hot-reloading
For a comprehensive technical documentation covering all algorithms, mathematical foundations, and implementation details, see:
📄 Project_Documentation.pdf - Complete 13-page technical report
The documentation includes:
- Rendering equation and Monte Carlo integration theory
- Ray-scene intersection algorithms (Möller-Trumbore)
- BVH construction with Surface Area Heuristic
- Material models (Lambertian, GGX, Dielectric)
- Importance sampling techniques (MIS, NEE, Russian Roulette)
- System architecture and performance analysis
| Category | Technology |
|---|---|
| Language | C++17 |
| Build System | CMake 3.16+ |
| GUI | Dear ImGui + GLFW + OpenGL |
| Math | GLM |
| Scene Format | XML (tinyxml2) + OBJ/MTL |
| Denoising | Intel Open Image Denoiser (OIDN) |
| Image I/O | stb_image, stb_image_write |
Ensure you have the following installed:
- CMake 3.16 or higher
- C++17 compatible compiler (GCC 9+, Clang 10+, MSVC 2019+)
- OpenGL 3.3+ compatible GPU and drivers
- Git (for cloning)
brew install cmake glfwsudo apt update
sudo apt install cmake build-essential libglfw3-dev libgl1-mesa-dev- Install Visual Studio 2019+ with C++ workload
- Install CMake
git clone https://github.com/YOUR_USERNAME/project-csi.git
cd project-csimkdir build
cd buildcmake ..cmake --build . --config Release -j$(nproc)Or on Windows:
cmake --build . --config Release# From the build directory
./RaytracerUI# Render with default settings
./Raytracer
# Render a specific scene
./Raytracer --scene cornell_water_scene.xml --bvh --samples 500
# Full options
./Raytracer --help| Flag | Description |
|---|---|
--scene <file> |
Scene XML file (default: objects.xml) |
--out <file> |
Output image path |
--width <W> |
Override image width |
--samples <S> |
Samples per pixel |
--bvh |
Use BVH acceleration (recommended) |
--denoise |
Enable AI denoising (default) |
--preset <name> |
Use preset: Preview, Draft, Final |
project-csi/
├── assets/ # Scene files and 3D models
│ ├── *.xml # Scene definitions
│ ├── *.obj # 3D mesh files
│ └── *.mtl # Material files
├── src/
│ ├── engine/ # Core ray tracing engine
│ │ ├── camera.h/cpp # Camera model
│ │ ├── material.h # Material base class
│ │ ├── bvh_node.h/cpp # BVH acceleration
│ │ ├── render_runner.cpp # Tile-based renderer
│ │ └── ...
│ ├── gui/ # ImGui application
│ └── 3rdParty/ # External libraries
├── renders/samples/ # Sample output images
├── build/output/ # Rendered output directory
├── CMakeLists.txt
└── README.md
Demonstrates refraction, caustics, and global illumination
Showcases metallic roughness variations
BVH acceleration test with multiple objects
Scene with Chair Obj Rendering and Point Light Material
test_video1.mp4
test_video3.mp4
Demonstration videos showing the interactive GUI and real-time rendering capabilities.
Lo(x,ωo) = Le(x,ωo) + ∫ f(x,ωi,ωo) Li(x,ωi) cos(θi) dωi
Reduces ray-scene intersection from O(n) to O(log n) using:
- Axis-Aligned Bounding Boxes (AABB)
- Surface Area Heuristic (SAH) for optimal tree construction
Physically accurate BRDF with:
- Normal Distribution Function (NDF)
- Smith Geometry Function
- Schlick Fresnel Approximation
- Abu Bakar
Supervisor: Professor Olivier Staadt
Institution: University of Rostock
Course: Project CSI - Visual and Analytical Computing (12 ECTS)
This project is licensed under the MIT License - see the LICENSE file for details.
- Ray Tracing in One Weekend by Peter Shirley
- Intel Open Image Denoise
- Dear ImGui
- GLFW
- GLM




