Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.42 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.42 KB

A simple ray tracer

This is personal project for toying around with software raytracers. Used to support files in the NFF format but now, because it supports path tracing, uses some custom NFF amalgamation. Currently the best renderer is VCM. BPT is also supported but the code is clearly broken.

Installation instruction

Dependencies

The following packages are required:

  • gcc 4.7 or clang 3.1
  • CMake 2.6
  • 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 libboost-dev libgd-dev

On gentoo make sure that png USE flag is enabled and as root:

$ emerge -a1 cmake gd boost

Build instructions

In the root source directory:

$ cp config.local.example config.local
$ mkdir build
$ cd build
$ cmake ..
$ make -j3
$ ./src/ray --help

Usage instructions

The help is provided with "--help" command line argument. Use "--bpt" to enable bidirectional path tracing (quite broken) or "--vcm" for vertex connection and merging rendering algorithm. 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.

Example renders

Cornell box

Cornell box with spheres