A basic, yet functional, ray tracer designed to introduce core rendering concepts and simple light interactions.
- Anti-Aliasing: Reduces the jagged edge effects to produce a smoother image. This works by sending multiple rays per pixel and averaging the ray colour.
- Objects: Supports the rendering of the following 3D objects:
- Cylinder
- Sphere
- Plane
- Lighting: Supports the full phong reflection model to simulate the interaction of light with the surfaces. This creates a realistic depiction of shadows, reflections and diffusion.
- Ambient Light: Adds a constant indirect ambient light throughout the scene.
- Camera: Conditionally calculate a virtual viewport based on the camera's FOV (Field of view). This ensures images are rendered correctly.
- Multi-Threading: Utilizes multi-threading to improve rendering performance, enabling faster image rendering.
- Documentation: All functions have doxygen comments to ensure readability and to better understand the underlying logic at a glance.
- Clone the repository.
git clone https://github.com/RealConrad/42minirt.git
- Enter the directory.
cd 42minirt
- Compile the program.
make
- Run the program (it may take a while to open the window, depending on the rays per pixels and the scene contents).
./miniRT scene/<file_name>
The program only accepts 2 arguments: The executable and the scene you want to run.
./miniRT scene/basic_sphere.rt
Resources we used to better understand ray tracing concepts and implementing specific features. Below is a list of some of these resources: