Your CPU goes brrrrr!
Ray tracing is a technique used to generate realistic digital images by simulating the inverse path of light. Our goal here is to create a program from a file describing a scene.
We had the following objectives:
The project is done in C++, and build using CMake
To have more information, look at the docs folder.
To build the project, follow the steps below:
# Make sure you have the necessary system packages installed
# ⚠️ The following system packages installation commands may change depending on
# your OS. Below example is for Ubuntu 20.04
sudo apt-get update -qq
sudo apt-get install -y ninja-build clang-tidy-12 ccache
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-12 100
sudo apt-get install -y --no-install-recommends nlohmann-json3-dev libsfml-dev
# clone the repository
git clone git@github.com:Lukacms/Raytracer.git
cd Raytracer
# compile the project with flags required to close properly shared libraries, only available with g++
./compile.sh --gcc
Once the project is build, the ratracer
executable is built at the root, and the plugins in the plugins
directories:
.
├── plugins
│ ├── Catch2.a
│ ├── Catch2Main.a
│ ├── raytracer_ambiant_light.so
│ ├── raytracer-core.so
│ ├── raytracer_directional_light.so
│ ├── raytracer_moebius.so
│ ├── raytracer_plane.so
│ ├── raytracer_point_light.so
│ └── raytracer_sphere.so
└── raytracer
After building project, here is the output of the help:
$ > ./raytracer -h
USAGE: ./raytracer <SCENE_FILE> <DISPLAY>
SCENE_FILE: scene configuration
DISPLAY: -ppm <FILENAME> | -sfml
You can launch the program with two options:
-ppm
with a filename
specified, to output the file to the filename-sfml
to render the result to a sfml window, which has the option to be quit using Q
, and save to a ppm file with S