Skip to content

Raytracer coded with C, handling three different objects, ambient and diffused light, shadows and specular hi-lights with Blinn-Phong reflection model

Notifications You must be signed in to change notification settings

rosamakinen/miniRT

Repository files navigation

miniRT

A raytracer implementation in C for rendering realistic 3D scenes, using Minilibx graphics library

Screen Shot 2023-10-23 at 7 05 12 AM scene executed using specular hilights (scenes/multi_object3.rt) rt_multi_wide scene executed without specular hilights (scenes/multi_object.rt)

⭐ About

This raytracer project is a simple but educational implementation designed to help you understand the core concepts of ray tracing and 3D rendering. It provides a basic framework for rendering 3D scenes with support lighting, reflections and shading techniques.

💫 Features

  • 🚀 Ray intersection with spheres, cylinders and infinite planes
  • 🌐 Ambient light with colors
  • 💡 Diffused light with colors
  • 🌓 Shadows
  • ✨ Specular hilights using Blinn-Phong reflection model
Screen Shot 2023-10-26 at 7 13 36 AM scene with a cylinder and a plane with only ambient light (scenes/cylinder.rt) rt_cylinder scene with a cylinder and a plane with ambient light, diffused lighting using one point light and shadows (scene/cylinder.rt)

👉 Getting Started

** this version has been tested with clang version 15.0.0 (clang-1500.1.0.2.5) and MacOS Ventura 13.5 **

To get started with the raytracer:

  1. Clone the repository:

    git clone https://github.com/rosamakinen/miniRT.git
    
  2. Cd into the folder

    cd miniRT
    
  3. Run the program You can run miniRT in two different modes, with or without the specular hilights

    To run the program

    make
    ./miniRT scenes/cylinder.rt

    To run the program with specular hilights run:

    make specular
    ./miniRT scenes/cylinder.rt

more scenes can be found from the scenes folder

About

Raytracer coded with C, handling three different objects, ambient and diffused light, shadows and specular hi-lights with Blinn-Phong reflection model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published