Simple Pathtracer made for our CUDA course at EPITA, a French Computer Science school.
In order to load a scene (or several at a time), you have to provide them on the command line. A scene is a special ASCII file having the following syntax:
cubemap cubemap/garden.jpg
# camera x y z dir_x dir_y dir_z fov_x dof_focus dof_aperture
camera -2.7 2.06 2.52 0.62 -0.348 -0.7 90.0 3.555 0.01
# pos_x pos_y pos_z r g b emission radius
p_light 2.9 2.1 2.9 1.0 1.0 1.0 2.0 0.3
# pos_x pos_y pos_z r g b emission radius
p_light -2.7 2.1 -2.55 1.0 1.0 1.0 2.0 0.3
# pos_x pos_y pos_z r g b emission radius
p_light 2.9 2.1 -2.55 1.0 1.0 1.0 2.0 0.3
scene obj/indoor.obj
Inside it, you have to reference the obj file you want to use, as well as a cubemap, some lights and a camera with some initial values.
We support the following textures:
- Diffuse
- Normal
- Specular
- Cubemaps
Our algorithm works using few samples, by using temporal buffering.
You will need the following dependencies (fetched if using our CMake):
You will have to load the .sln, and go to the project properties window, in order to change the link to your include folders as well as the dependencies.
You can build the solution using:
sh$ mkdir build && cd build && cmake .. && make
At the root of the project, you can find a python Jupyter Notebook that helps visualize our BRDF sampling depending on roughness and such.