Hobby ray/path tracer in C++.
- Path tracer
- Support a variety of materials and reflection / transmission models
- Acceleration structures
- bounding volume hierarchy
- kd-tree
- Import a variety of scene / object description grammars
.pbrt
.obj
.ply
- Render paths
- vanilla CPU
- Explicit SPMD with ispc
- CUDA
- Rasterization with OpenGL (or Vulkan)
Bounding-volume hierarchy heatmap:
Triangle intersection heatmap:
In elementary geometry, a polytope is a geometric object with "flat" sides. It is a generalisation in any number of dimensions of the three-dimensional polyhedron. Polytopes may exist in any general number of dimensions n as an n-dimensional polytope or n-polytope.
Polytope represents all shapes internally as triangle meshes, which are 3-polytopes. Input grammars that specify other types of geometry (implicit surfaces, etc) are tesselated on import to triangle meshes.
The structure and terminology of this project is inspired by pbrt (https://github.com/mmp/pbrt-v3). My MO is generally to:
- Originally develop and implement a feature to the point that it works; and then
- See how the pros did it; and then
- Adjust my own implementation if necessary / desired.
This project uses code from the following libraries / projects:
- pbrt
- https://github.com/mmp/pbrt-v3
- Matrices and transforms
- Google Test
- https://github.com/google/googletest
- Unit testing
- LodePNG
- https://github.com/lvandeve/lodepng
- For exporting raw image data to PNG