https://github.com/rarakira/minirt
Rendering 3D scenes using Raytracing
https://github.com/rarakira/minirt
21school 3d 3d-graphics ecole42 minilibx minirt raytracing
Last synced: 2 months ago
JSON representation
Rendering 3D scenes using Raytracing
- Host: GitHub
- URL: https://github.com/rarakira/minirt
- Owner: rarakira
- Created: 2022-01-19T06:59:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-18T14:31:33.000Z (over 3 years ago)
- Last Synced: 2023-03-10T00:26:15.683Z (over 2 years ago)
- Topics: 21school, 3d, 3d-graphics, ecole42, minilibx, minirt, raytracing
- Language: C
- Homepage:
- Size: 9.45 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
_This is a **21 School/Ecole 42** Project. Worked in team with [Dredfort](https://github.com/dredfort42)_
# miniRT (Raytracing)
MiniRT is a program that can render 3D scenes using raytracing technique using [MiniLibX](https://harm-smits.github.io/42docs/libs/minilibx/introduction.html) library. Subject can be found [here](https://cdn.intra.42.fr/pdf/pdf/47303/en.subject.pdf).
## Project goals
* Get familiar with raytracing
* Render 3D scenes with geometric objects using linear algebra
* Work with light, shading and texturing
* Implement scene navigation, object selection and modification
## To compile and run
Run the following commands in Terminal:
```shell
# to build
> make# to run
> ./miniRT scenes_checklist/test01-sphere.rt
```The program accepts one `.rt` file as argument. Scene description files can be found at `scenes_checklist/` folder. Scene includes Ambient lightning, Camera, one or more coloured Spot lights, and geometry objects (`spheres`, `planes`, `cylliners` and `cones`).
To close window press `esc`.
## Scene control
|Camera movement
|Object modification
|
| ------------------------ | ---------------------------- |
| | Click `[left mouse button]` to select/deselect object|
| |
| Use `[a]` & `[d]` to move left or right | Use `[1]` & `[2]` to increase/decrease object radius |
| Use `[q]` & `[e]` to move up and down | Use `[3]` & `[4]` to increase/decrease object height |
| Use `[w]` & `[s]` to move forwards or backwards | Use `[+]` & `[-]` to increase/decrease light brightness |
| |
| Press `[↑]` rotatate camera upwards | Press `[T]` apply/discard texture |
| Press `[↓]` rotatate camera downwards | Press `[B]` apply/discard bump |
| Press `[←]` rotatate camera left | Press `[C]` apply/discard checkerboard |
| Press `[→]` rotatate camera right |## Reneder examples





### Shading render on light movement

## Useful links
* All the useful [formulas](https://hugi.scene.org/online/hugi24/coding%20graphics%20chris%20dragan%20raytracing%20shapes.htm)
* Basic [lighting](https://learnopengl.com/Lighting/Basic-Lighting)