/RT

Primary LanguageC

RT

RT is a 42 project developped by sganon, joboyer, fsidler and me, which is designed to further students' understanding of the concepts behind raytracing.

The scene's and objects' parameters can be modified in real-time. This software also uses multithreading to speed up calculations.
The program supports multiple lights and objects in a scene.
Any object can have a coefficent of refraction (except for the plane), transparency (except for the plane) and reflection.
Any object can be cut (example: make a hemisphere from a sphere).
Any object can have a texture (bmp format, perlin sound or checkerboard).
The program supports sepia, and black and white filters.
The proram can take a screenshot of a scene.

Several options are available (see Shortcuts section for more info)

  • Select objects within the scene
  • Translate and rotate the camera
  • Translate and rotate the selected object
  • Change the radius/angle of the selected object
  • Change the maximum number of reflections
  • Rotate textures
  • Increase/decrease anti-aliasing
  • Increase processing speed (may reduce quality)

Install & launch

git clone https://github.com/jfortin42/RT ~/RT
cd ~/RT && make && ./RT scene/scene1.rt

Launch the program with one parameter: the name of the scene you would like to open. The input file has to follow a predefined layout. A parser implemented in the program will check for layout errors.

Example : ⇣

./RT scenes/scene1.rt

Shortcuts

Once the scene is rendered, you can select/unselect objects by using the  left mouse button .

Description  Key(s) 
Exit the program  esc 
Translate camera/object along local X axis  A   D 
Translate camera/object along local Y axis  W   S 
Translate camera/object along local Z axis  e   q 
Rotate camera/object along local X axis  ◄   ► 
Rotate camera/object along local Y axis  ▲   ▼ 
Increase/decrease the maximum number of reflections  t   g 
Increase/decrease the radius of object  .   , 
Increase/decrease processing speed  left shift 
## Contact & contribute To contact me or to improve RT, feel free to send me an email at **jfortin@student.42.fr**