Home

Awesome

What is Rt

Rt is a Ray Tracer, this is a pedagocial project from 42 school, the project has to be in "C" language, at the 42 norm: https://cdn.intra.42.fr/pdf/pdf/317/norme.fr.pdf

The project subject is available here: https://cdn.intra.42.fr/pdf/pdf/33/rt.fr.pdf

Keys

KeyPurpose
arrow leftrotate camera left
arrow rightrotate camera right
arrow uprotate camera up
arrow downrotate camera down
qroll camera left
eroll cammera right
ctrl / cmove camera down
spacemove camera up
w/a/s/dmove camera
itoggle interface
xdisplay the current scene to stout in sda
ldispay debug on stdout (current tree)
1red filter
2green filter
3blue filter
4purple filter
5yellow filter
6cyan filter
7sepia filter
mswitch to next camera
shiftmove faster (wasdeq...)
rreset camera
ysave current camera
pforce rebuild of current scene
ftoggle full screen
tdisplay current used textures
odisplay camera matrix

Formats

There is two supported formats for this project: the first one developed was ". Very quicly we needed a more flexible format: the .sda files

Yolo

yolo" files, those are simple files, each object is described in one line and parameters are separated with a simple space

Sda

for "Scene Describe Archive" are a more complex files format, having defaults parameters, and non mandatory values

Command line parameters

ParameterUtility
-fstart in full screen
-s 1020x1080specify resolution
-e scene.yoloconvert a .yolo scene to a .sda one
-b scene target.bmprender the image into a file instead of window
-hdisplay help then quit

Capabilities

Screenshoot

Image

Compile

Archlinux

sudo pacman -S extra/sdl2 extra/sdl2_ttf extra/sdl2_image make clang
make

Ubuntu

sudo apt install libsdl2-ttf-dev libsdl2-dev build-essential libsdl2-2.0-0 libsdl2-ttf-2.0-0 libsdl2-image-2.0-0 libsdl2-image-dev clang
make