Skip to content

martingarcialopez/miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniRT

School project for 42 Paris. The subject -> miniRT_subject

A basic ray tracer using the CPU, featuring antialiasing via adaptative supersampling and a multithreaded render. The supported primitives are spheres, planes, cylinders, squares, triangles, cubes and pyramids. There aren't any acceleration structures like BVH, and although it supports triangles, a proper KD-tree for polygon meshes acceleration were not included.

Installation

git clone https://github.com/martingarcialopez/miniRT.git && cd miniRT && make

The Makefile will compile the project properly on Linux and macOS machines. It will detect the number of cores of your computer and will define the number of threads used to render accordingly.

Usage

  • ./miniRT <scene.rt> To render the .rt scene passed as a parameter

  • ./miniRT <scene.rt> --save To save the .rt scene passed as a parameter to a .bmp file

Example

./miniRT scenes/cornellbox.rt

======================   Some samples (click on the images for larger size)   ======================

alt text

alt text

alt text

alt text

alt text

alt text

alt text

About

School project for 42 Paris

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published