A project on Ray-Tracing and rendering three-dimensional computer-generated images. Using MiniLibX, the 42 graphical library.
Caution
If you need more technical info, go check our Github-Wiki
MiniRT is a project that introduces the basics of Ray tracing, focusing on 3D computer-generated images from a configuration file. It includes ambient light, lights, camera, and three geometrical figures (Plane, Sphere, Cylinder). The bonus part introduces multiple lights, cones as a geometrical figure, and additional elements.
- Makefile will compile your source files. It must include 'all' and 'bonus' rules for the Mandatory and Bonus parts, respectively. It should not relink.
- You are required to use MiniLibX for this project.
- The program should be compiled using the following commands:
> ./miniRT <filename>.rt
> ./miniRT_bonus <filename>.rt
Warning
Maps must have the .rt extension
Configuration file has three mandatory elements: Camera, Light and Ambient Light. And three optional geomtrical figures: Plane, Sphere, Cylinder. Each element has the following identifier:
Name | Identifier | Name | Identifier |
---|---|---|---|
Ambient Light | A | Plane | pl |
Camera | C | Sphere | sp |
Light | L | Cylinder | cy |
- MAC Option ⌥ + Right Clickand swip with the mouse
- LINUX Alt + Left Click and swip with the mouse
- MAC Option ⌥ + Mouse Wheel
- LINUX Alt + Mouse Wheel
- Shift ⇧ + Left Click and swip with the mouse
- Ctrl ^
- R Reset Camera Position
- L Reset Light Position
- Ambient Light:
- Identifier: A
- Ambient lighting ratio in range [0.0,1.0]: 0.2
- Colors in RGB in range [0-255]: 255, 255, 255
- Camera
- Identifier: C
- XYZ coordinates of the view point: 60,0,0
- 3D normalized orientation vector. In range [-1,1] for each x,y,z axis: 1.0,0.0,0.0
- FOV : Horizontal field of view in degrees in range [0,180]: 170
- Light
- Identifier: L
- XYZ coordinates of the light point: 90,50,70
- The light brightness ratio in range [0.0,1.0]: 0.7
- (unused in mandatory part)R,G,B colors in range [0-255]: 255, 255, 255
- Plane
- Identifier: pl
- XYZ coordinates of a point in the plane: 0.0,0.0,-500.0
- 3D normalized vector. In range [-1,1] for each x,y,z axis: -1.0,1.0,1.0
- Colors in RGB in range [0-255]: 0,0,225
- Sphere
- Identifier: sp
- XYZ coordinates of the sphere center: 90,0.0,0.0
- Diameter: 60
- Colors in RGB in range [0-255]: 0, 0, 255
- Cylinder
- Identifier: cy
- XYZ coordinates of the center of the cylinder: 90.0,0.0,0.0
- 3D normalized vector of axis of cylinder. In range [-1,1] for each x,y,z axis: 0.0,1,1.0
- Diameter: 30
- Height: 210.42
- Colors in RGB in range [0,255]: 0, 0, 255
- Ray Tracing in One Weekend, (Peter Shirley, Trevor David Black, Steve Hollasch)
- Ray Tracing [YouTube]
- Phong Reflection Model
- Modelo de Color HSV
- HSL to RGB conversion
- Lighting with the Phong reflection model (Part1 of 2)
- Lighting with the Phong reflection model (Part2 of 2)
- A very good bump mapping explanation