Raytracer using multiple importance sampling
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
coordinator
data Convert colors to linear when parsing Apr 6, 2013
images Added documentation Mar 16, 2014
renderer
scene
third_party CMakeLists.txt for SimpleJSON Oct 20, 2012
.gitignore
CMakeLists.txt
COPYING
README.md
edit

README.md

Kajo

(Main site)

Kajo is a small raytracer that renders images using multiple importance sampling. This is a variant of the Monte Carlo integration technique in which we compute samples from an integral using several techniques and combine them to get a better estimate of the actual value. In a raytracer this can help to reduce computation time and alleviate noise in the final image without introducing bias.

Kajo currently only supports planes, spheres and spherical lights. There are two rendering backends:

  • C++ multithreaded CPU renderer
  • OpenGL (GLSL version 1.20) renderer

Kajo is licensed under the MIT open source license.

⌘ "kajo" means a glimmer of light in Finnish.

Sample images

Traditional Monte Carlo

Traditional Monte Carlo

Multiple importance sampling #1

Multiple importance sampling #1

Multiple importance sampling #2

Multiple importance sampling #2

Phong lighting

Phong lighting

Caustics

Caustics

No explicit lighting

No explicit lighting

Explicit lighting

Explicit lighting

More images

Compiling

  1. Install dependencies, e.g., on Ubuntu/Debian:

apt-get install cmake libsdl1.2-dev libsdl-ttf2.0-dev libglew-dev

  1. Check out a copy of the source code:

git clone https://github.com/skyostil/kajo.git

  1. Prepare the build files with cmake:

mkdir kajo/build; cd kajo/build; cmake ..

  1. Compile:

    make

Running

In the build directory:

renderer/renderer ../data/spheres.json

Using the OpenGL renderer:

renderer/renderer -r gl ../data/spheres.json

References

Reading material:

Libraries used: