Skip to content

Georg-Trishchynskyi/miniRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miniRT

Project for 42 Wolfsburg.

As it's said in the name it's a mini/basic ray-tracing using the CPU based on Blinn–Phong reflection model. This project can handle several shapes such as spheres, planes, cylinders, triangles, and hyperboloids. Support features like reflection, refraction, colored light, multithreading, textures, and bump textures.

Examples

image image image image image image image

Installation

clone repo then change a directory and compile

  • https://github.com/kraf24/miniRT.git
  • `cd miniRT
  • make

Usage

When you run the program it must have two arguments, the first one is the program and the second one is a map file that should end with ".rt"

./miniRT scenes/<some_scene>.rt

Map Creation

If you want to create your own map or change the existing one here is information about existing presets

Abbriviation Name Properties
c camera Center, direction, fov
A ambient light intensity, collor
l light position, intensity color
sp sphere position, diameter, color, material
pl plane position, surface normal, color, material
cy cylinder position, tube axis direction, diameter, length, color, material
tr trinagle point1, point2, point3, color, material
hy hyperboloid origin point, axis orientation, semi-major axis parameteres, radius, color, material

Materials are stored as numbers, here are explanation of what those numbers mean:

Number Type
1 Regular surface
2 Reflective surface
3 Refractive (only with spheres)
4 Earth texture no bump (only with spheres)
5 Mirror
6 Space texture (only with spheres)
7 Checkered surface
8 Sun texture (only with spheres)
9 Moon texture no bump (only with spheres)
10 Mars texture no bump (only with spheres)
11 Mercury texture no bump (only with spheres)
12 Venus texture no bump (only with spheres)
13 Jupiter texture no bump (only with spheres)
14 Earth texture WITH bumps (only with spheres)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published