This repository contains the code and resources for the Advanced Computer Graphics (ACG) project for the Fall 2025 semester. The project focuses on ray tracing techniques and rendering algorithms.
We are planning to implement a GPU-based renderer that meets the following course requirements:
Click to expand the requirements
- Base: Implement a path tracing algorithm that correctly handles diffuse and specular materials. (basic) ✅
- Scene creation: Build a custom scene with aesthetic considerations, using geometry that you create from scratch or find online (ensure the source is credited). (basic, tidiness and attractiveness 1pt) 🚧
- Acceleration structure: Implement an acceleration structure such as BVH (Bounding Volume Hierarchy). This is not required for hardware-based renderers, as the acceleration structure is built-in in that case. (basic, Surface Area Heuristic or another advanced algorithm 2pts) 🚧
- Material: Create a (non-trivial) custom material. Options include:
- Transmissive material (basic) ✅
- Principled BSDF (2pts) ✅
- Multi-layer material (2pts) ✅
- Rendering of fur, hair, skin, etc. (2pts) 🚧
- Texture: Create your own (non-trivial) texture with proper texture mapping. Options include:
- Color texture (basic) ✅
- Normal map, height map, attribute map, or any functional texture mapping (1pt for each, up to 2pts) 🚧
- Implement an adaptive mipmap algorithm (2pts) ❌
- Importance Sampling: Use more advanced sampling algorithms for path tracing. (Importance sampling with Russian Roulette, multiple importance sampling 2pts) 🚧
- Volumetric Rendering: Options include:
- Subsurface scattering (2pts) ❌
- Homogeneous volume rendering (1pt) ❌
- Inhomogeneous volume rendering (1pt) ❌
- Channel-independent subsurface scattering (1pt) ❌
- Volumetric emission (1pt) ❌
- Volumetric alpha shadow (2pts) ❌
- Special Visual Effects: Options include:
- Motion blur, depth of field (basic) ❌
- Alpha shadow (basic) ❌
- Cartoon style rendering (2pts) ❌
- Chromatic dispersion (2pts) ❌
- Lighting: Options include:
- Point light and area light (basic) 🚧
- Environment lighting with HDR, such as skybox (2pts) ✅
- Anti-aliasing: Implement an anti-aliasing algorithm (basic) ✅
- Simulation-based content creation: Up to 2pts 🚧
Details of each requirement can be found in the project description document.
acg_project/
├── include/ # Header directory
│ ├── Camera.h # Camera system
│ ├── Config.h # Configuration settings
│ ├── Denoiser.h # Denoising using OIDN
│ ├── DX12Helper.h # DirectX 12 helper functions
│ ├── GUI.h # GUI system using ImGui
│ ├── Light.h # Lighting system (point light, area light, environment light)
│ ├── LogRedirector.h # Redirect console output to GUI log panel
│ ├── Material.h # Material system (diffuse, specular, transmissive, PBR)
│ ├── MathUtils.h # Math utility functions
│ ├── Mesh.h # Geometry mesh
│ ├── MTLParser.h # MTL file parser
│ ├── Renderer.h # GPU renderer (DirectX 12)
│ ├── Resource.h # Resource definitions (icons, etc.)
│ ├── Sampler.h # Sampler (importance sampling, MIS)
│ ├── Scene.h # Scene management
│ ├── Texture.h # Texture system (supports Mipmap)
│ └── VirtualTextureSystem.h # Virtual Texture System
│
├── src/ # Source files directory
│ ├── Camera.cpp
│ ├── Config.cpp
│ ├── Denoiser.cpp
│ ├── GUI.cpp
│ ├── Light.cpp
│ ├── Material.cpp
│ ├── MathUtils.cpp
│ ├── Mesh.cpp
│ ├── MTLParser.cpp
│ ├── Renderer.cpp
│ ├── Sampler.cpp
│ ├── Scene.cpp
│ ├── Texture.cpp
│ ├── VirtualTextureSystem.cpp
│ └── main.cpp # Main program entry point
│
├── shaders/ # Shader files directory
│ ├── Raytracing.hlsl # HLSL shader for ray tracing
│ ├── Random.hlsli # HLSL shader for random number generation
│ └── Structures.hlsli # HLSL shader structures
│
├── loader/ # Python scene loader
│ ├── base_loader.py # Base loader for scene files
│ ├── binary_exporter.py # Binary scene exporter
│ ├── data_structures.py # Data structures for scene representation
│ ├── wavefront_loader.py # Wavefront OBJ file loader
│ ├── bpy_loader.py # Blender file loader
│ └── main.py # Main script to load and export scenes
│
├── lib/ # Third-party libraries
│ ├── oidn/ # Open Image Denoise library
│ └── WinPixEventRuntime/ # PIX for Windows library
│
├── docs/ # Documentation directory
├── tests/ # Test scenes and scripts
├── .github/ # GitHub configuration files
├── ACG_Project.rc # Resource script for application icon
├── CMakeLists.txt # CMake build configuration
├── vcpkg.json # vcpkg dependency configuration
├── requirements.txt # Python dependencies for test scripts
├── logo.ico # Application icon file
├── LICENSE # License file
└── README.md # Project description
Note
We only support DX12 on Windows, and the hardware supports DirectX Raytracing (DXR).
uv is needed to create a virtual environment for python dependencies. Then run setup_loader.bat first to setup the python scene loader.
We provide a GUI for users to configure rendering settings and load scenes. The GUI allows you to adjust parameters such as samples per pixel, maximum bounces, and load different 3D models.
- Render Settings: Adjust output resolution, sampling parameters, lighting intensity, and scene model paths.
- Camera Settings: Configure camera position, target, up vector, and field of view.
- Render Results: Show the rendered image.
- Controls: Start or stop rendering processes.
- Log Details: View log messages and debug information.
This project requires the following dependencies:
- CMake >= 3.15
- A C++17 compatible compiler
- vcpkg for managing third-party libraries
- Windows SDK for DirectX libraries
- OIDN (We have offered a pre-compiled binary in the
libfolder)
For debugging and performance analysis, we use PIX for Windows.
Python loader is used to parse files into acg file, we use uv as following:
uv venv --python 3.11 # bpy requires python 3.11
.venv\Scripts\activate # On Windows
uv pip install -r requirements.txtWe know supports
| File Format | Loader | Status |
|---|---|---|
| Wavefront OBJ (.obj) | wavefront_loader.py | ✅ |
| Blender (.blend) | bpy_loader.py | 🚧 |
| glTF (.gltf, .glb) | gltf_loader.py | ❌ |
| FBX (.fbx) | fbx_loader.py | ❌ |
To build the project, follow these steps:
- Clone the repository:
git clone https://github.com/gameswu/acg_project.git cd acg_project - Configure and build the project using CMake:
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" cmake --build build --config Release
We offer several test scenes located in the tests directory. You can load these scenes through the GUI by specifying the model path in the Render Settings section. Using the python script to unzip all test scenes:
cd tests
python download.py
python unzip.pySimple test scenes made by us.
| Test Scene | Targeted Feature | | materialtest | Material rendering |
Models downloaded from Morgan McGuire's Computer Graphics Archive.
| Test Scene | Targeted Feature |
|---|---|
| CornellBox | Basic rendering test |
| breakfast_room | Texture mapping |
| sponza | Large scene |
| lpshead | Head model |
| fireplace_room | Complex scene |
| gallery | Gallery scene |
| bedroom | Bedroom scene |
| San_Miguel | Architectural scene |
| bistro | Final scene |
Models downloaded from Sketchfab.
| Test Scene | Targeted Feature |
|---|---|
| cloud | Volumetric rendering |
| hair_cards_fbx | Hair rendering |
| project_-_cirno_fumo_3d_scan | FUMO |
The skybox downloaded from HDRI Haven.





