This project is a basic raytracer implemented in C++. A raytracer is a rendering algorithm that simulates the way light interacts with objects in a virtual scene to produce realistic images. By tracing the paths of rays of light as they travel through the scene, the raytracer can determine the color and intensity of the light that reaches the camera from each point in the scene. It is CPU-based and does not leverage any external graphics APIs (viz. OpenGL, Vulcan, etc), rather manually calculates and assigns values to the pixel buffer with math.
- Ray-Sphere Intersection: The raytracer can detect intersections between rays and spheres, which are used as the primary geometric objects in the scene.
- Basic Reflection: The raytracer includes basic reflection calculations, enabling it to render reflective surfaces.
- Phong Shading: The project implements Phong shading to simulate the way light reflects off surfaces, providing a more realistic rendering of objects.
- Materials: It also supports modifying the aspects of the material such as Albedo, Roughness, and Emission for a wider variety of renderable objects.
- Multiple Light Sources: The raytracer supports multiple light sources using emission materials, allowing for complex lighting setups and more dynamic scenes.
- Multithreading: Optimised rendering process by dividing various chunks of the image between multiple threads to run in parallel.
- Interactive Camera and UI: The application also has an interactive camera to move around the scene and UI to modify the objects in the scene.
- Using the GPU: Leveraging the Vulcan API to use the GPU for faster render times, because the CPU is not best optimised for raytracing applications.
- More Geometry: Adding support for various other 3D objects such as Quadrilaterals.
- Advanced Lighting: Implementing more advanced lighting phenomena such as refraction.
Here are some renders from the current version of the engine:
Basic reflections:
Roughness with Path Tracing:
Emission and Diffuse: