This is a basic offline raytracer written in C++ with only the use of the standard library. It was primarily developed as a learning experience to practice C++ development and understand the fundamentals of raytracing.
The raytracer can import simple .OBJ models with or without normal interpolation. Shapes can be grouped together in an axis-aligned bounding box as an acceleration structure, which is especially useful when importing 3d models with high tri-counts. The supported procedural shapes include:
- Cones
- Cubes
- Cylinders
- Planes
- Spheres
These shapes can be assigned color or pattern materials. The Phong BRDF is used as the shading model and it also supports reflection and refraction using Schlick approximation for the Fresnel factor.
There is also support for multiple lights, so a rendered scene can include a combination of directional, point, and spot lights.
Glass Sphere (4000x4000): 1125-second render time
Patterned Spheres (3840x2160): 158-second render time
To setup the project for compilation after cloning, type:
cd basic-raytracer
mkdir build
cd build
cmake ..
Fast, Minimum Storage Ray/Triangle Intersection