This is our projects repository for computer graphics course.
The following packages are required:
- gcc 4.7 or clang 3.1
- CMake 2.6
- SDL
- Boost (thread, date_time, program_options)
- libgd (optional for generating PNG images)
On debian based system the packages could be installed as follows:
$ sudo apt-get install gcc cmake libsdl1.2-dev libboost-dev libgd-dev
On gentoo make sure that png USE flag is enabled and as root:
$ emerge -a1 cmake libsdl gd boost
In the root source directory:
$ cp config.local.example config.local $ mkdir build $ cd build $ cmake .. $ make -j3 $ ./src/ray --help
The help is provided with "--help" command line argument. Use "--bpt" to enable bidirectional path tracing and use "-s" to set the number of samples. The higher the number of samples the longer the rendering will take. The default value is 5.
For example, the first image below was rendered in the build directory with the following options:
$ ./src/ray --bpt -s 1000 --png out.png --non-interactive ../nff/cornell-spheres.nff
The options perform the following: specify that bidirectional path tracing is to be used, sets the samples to 1000, specifies png output file, disables interactive rendering and finally specified which scene to render. Warning, the image took around 6 hours to render on a 4 core i7 clocked at 3.4GHz.
- Support for area and spot lights.
- Bidirectional path tracing algorithm.
- Blender exporter to slightly modified NFF. Does not fully support materials, textures and lights, but provides a nice way to export geometry to NFF.
- Basic texturing.