Skip to content
/ RT Public

Shoot ray to produce a image. ( Using C and SDL2)

Notifications You must be signed in to change notification settings

nihuynh/RT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Oct 14, 2019
8f64e87 · Oct 14, 2019
Jul 25, 2019
Aug 19, 2019
Jul 25, 2019
Oct 14, 2019
Jul 22, 2019
Jul 24, 2019
Jul 26, 2019
Mar 24, 2019
Jul 6, 2019
Jun 2, 2019
Jun 28, 2019
Jul 24, 2019
Jul 26, 2019
Jul 25, 2019
Aug 19, 2019
May 6, 2019
Jul 1, 2019
Jul 1, 2019

Repository files navigation

RT

Top Build Status GitHub last commit

Summary

This is a ray tracing program in C using SDL2 and imgui. This project is done during 42 graphic branch to learn about computer-generated images. Built and tested on mac OSX 10 & Windows

How to install

On mac :

Install the library required :

brew install sdl2
brew install sdl2_image

This command will built an app bundle :

git clone --recurse-submodules https://github.com/nihuynh/RT && cd RT && make

On Linux :

(Untested)

On Windows :

(Untested)

Miscellaneous :

For more info on how to use the makefile :

make usage

Doxygen documentation here

How to use

Keymap :

Keymaps

make video from screenshots :

exemple for the map pool.rt, once the screenshots are generated.

ffmpeg -r 30 -f image2 -i pool.rt%d.png -vcodec libx264 -crf 15 -pix_fmt yuv420p pool_30FPS.mp4

Features:

  • sky-box
  • Refraction (Glass)
  • Reflection (Mirror)
  • Controllable camera
  • Screenshot
  • Load/Reload/Export scenes
  • Live Edit of the scenes
  • Under and over-sampling
  • UI
  • Fullscreen
  • Texture on all shapes

Shape availables:

  • Plane
  • Cube
  • Sphere
  • Cylinder
  • Cone
  • CSG (Constructive Solid Geometry)

Limited Shape:

  • Triangle
  • Disk
  • Limited plane

Credit:

http://www.yamllint.com/ : A Must have for travis.

Licence:

This repository is under no license.