Skip to content

ferri17/miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

160 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Repo stars GitHub top language GitHub code size in bytes GitHub last commit (by committer) MacOS compatibility

MiniRT(raytracer) 42 school project

The goal of this project is to learn the fundamentals of raytracing by building a CPU raytracer from scratch in C language.

About The Project

MiniRT demo intro

MiniRT (raytracer) is the second computer graphics project in 42 school common core. The program must read .rt files (more on the file format below) and render simple scenes with camera, lights, planes, spheres, cylinders and cones (this raytracer is not triangle based so all objects are defined by it's matematical formulas).

What is supported?

  • Camera setting
  • 4 basic objects: Plane, Sphere, Cylinder, Cone
  • Multiple lights, including ambient light
  • Phong reflection model: Ambient + Diffuse + Specular
  • Checkerboard pattern
  • Bitmap diffuse textures
  • Normal map textures

Getting Started

In order to run the program first clone the repository:

git@github.com:ferri17/miniRT.git

Open the folder:

cd miniRT/

Compile the program:

make

Run the program with a valid scene as argument(test scenes can be found in /scenes)

./miniRT scenes/_test.rt

Controls

Action Key
Select object Mouse left click
Move selected object A,S,D,W,1,2
Switch Render mode / Edit mode M
Bottom screen slider Change camera's FOV

Gallery

Screenshot 2024-02-28 at 01 20 12 Screenshot 2024-02-28 at 01 20 37 Screenshot 2024-02-28 at 01 21 38

About

This project aims to create a simple CPU based raytracer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors