Tracer
Tracer is a renderer using C++, Embree and USD to produce photorealistic images using Path Tracing techniques on the CPU.
Screenshots
- USD Kitchen, using the UDPT, Diffuse, Position, Normal and Debug integrators:
Features
-
Rendering:
- Progressive rendering
- Render/export to PPM
- Render/export to EXR
-
Camera:
- Types:
- FPS
- TODO : DCC-style
- Subpixel jitter antialiasing
- Depth of Field (using aperture radius and focal distance)
- Types:
-
Integrator:
- UDPT (Unidirectional Path Tracing):
- TODO : Environment Sampling
- TODO : Color-based sky/background
- TODO : Image-Based Lighting (IBL)
- TODO : Light Sampling/Next Event Estimation (NEE)
- BSDF Sampling
- TODO : Environment Sampling
- Diffuse (WIP)
- TODO : Occlusion
- Position
- Normal
- Debug
- Render the equivalent of Pixar USD's primID on the geometry
- UDPT (Unidirectional Path Tracing):
-
Sampling:
- RNG:
- Uniform
- Stratified (WIP)
- Methods:
- Hemisphere:
- Uniform
- Cosine Weighted
- Sphere:
- Uniform
- Hemisphere:
- RNG:
-
Material:
- TODO : Default
- TODO : Diffuse
- TODO : Empirical (for experiment purposes)
- TODO : Disney (2012)
-
BSDF/Lobes:
- Diffuse:
- Lambert
- TODO : Oren-Nayar
- TODO : Burley
- TODO : Sheen
- TODO : Subsurface Scattering
- Specular:
- TODO : GGX
- TODO : Beckmann
- TODO : Clearcoat
- TODO : Thin Film
- Diffuse:
-
Light sources:
- Sky/background light
- TODO : Geometry light
-
Geometry types:
- Meshes
- Triangle-based
- Quad-based
- TODO : Subdivided
- TODO : Curves
- TODO : Primitives (sphere, cube...)
- Instances:
- Per-geometry instancing ("Everything is an instance" philosophy)
- TODO : Native, multiple instancing of geometry prototypes
- Meshes
-
Acceleration structure:
- Intel Embree native BVH
- TODO : Custom-based
-
Scene:
- Format:
- Pixar USD
- As .usd/usda/usdc/usdz
- Pixar USD
- Ingested types:
- TODO : Materials
- TODO : Cameras
- Geometry:
- Meshes
- TODO : Curves
- TODO : Primitives
- TODO : Instances
- TODO : Light sources
- Format:
-
Utility:
- GUI using ImGui
- Pause/resume render
- Front/backbuffer swapping
- FPS counter
How to use
Tracer was written using Linux, VSCode as the IDE, CMake as the building tool, and a C++14 compiler in mind.
Download the source, build the project structure using CMake 3.x, open the project using your favorite IDE (tested on VSCode), build the project, and everything should be ready to use.
- In Tracer :
- Hold the right mouse button to use the camera
- Use the "+" and "-" buttons on the keypad control the aperture radius
- Hold LeftCtrl and "+" or "-" to control the focal distance
Dependencies (included, aside from Intel Embree/TBB, as well as Pixar USD and its own dependencies)
- Window & Input System: GLFW (3.3)
- OpenGL Functions Loader: GLAD
- GUI System: dear imgui (1.53)
- EXR Handling: tinyexr (0.9.5)
- Image Loading: stb (2.34)
- Scene Description: Pixar USD (19.05)
- Ray Tracing Kernels: Intel Embree (3.5.2)
- Multithreading: Intel TBB (2019U5)
- Math Operations: Intel Embree SIMD Library (3.5.2)