Run before building dependencies from source:
source scripts/ares_setup.sh
source scripts/ubuntu_setup.sh
scripts/install_deps.sh downloads specified releases, builds them and installs them in ~/libs.
./scripts/install_deps.sh
To compile and run the project, follow the steps below:
- Create a build directory
mkdir build
- Build the project
cmake --build build
Note
If you get Cmake Error: could not load cache
error, run cmake -S . -B build
and re-run the build command.
- Run the project
build/cuda_project
The output file is saved in the PPM format. To visualize it, you can utilize the GNOME Image Viewer.
eog build/out.ppm
To use custom .obj and .mtl files, specify the paths to these files in the main.cpp file.
Currently, the program only supports the following materials with the corresponding properties:
- lambertian
- Ka
- metal
- Ka
- Ns
- dielectric
- Ni
- diffuse_light
- Kd
To use these materials, ensure that the material's name in the .mtl file matches with one from the list above.