Skip to content

RealConrad/42miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📗 MiniRT

A basic, yet functional, ray tracer designed to introduce core rendering concepts and simple light interactions.

Developed using  


Table Of Contents

Features

  • 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.

Installation

  1. Clone the repository.
git clone https://github.com/RealConrad/42minirt.git
  1. Enter the directory.
cd 42minirt
  1. Compile the program.
make
  1. 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>

Example

The program only accepts 2 arguments: The executable and the scene you want to run.

./miniRT scene/basic_sphere.rt

Contributors

Resources

Resources we used to better understand ray tracing concepts and implementing specific features. Below is a list of some of these resources:

License

MIT