This is a metropolis light transport raytracer I made for fun, based on the
papers [0] and [1]. It's
written in Haskell. Please contact me (see
my home page) if you would like to know
more.
Here are some images I made with it.
There is very little documentation and I've made no effort to make it usable,
but the following instructions should at least cause it to render something.
The scene is currently hard-coded in Scenes/Box.hs.
-
Make sure you have a recent version
of GHC installed.
-
Download the source code and compile the
run_job and convert_raster targets with GNU Make.
-
Create a new, empty directory and add a file
called job_desc containing the following text:
(
(render_version 0)
(sample_method rlist)
(n_samples_reject 100000)
(image_width 300)
(image_height 300)
)
-
Create an empty file called "lock". Create a file called "stats"
containing the string ``Stats {n_mutations = 0, n_mutations_accepted =
0}'' and a file of length 3240000 containing zeroes (dd if=/dev/zero
of=raster bs=1000 count=3240).
-
From a shell, change to the directory you just created, and run the
run_job command you just compiled. Every ten seconds, it will report
its progress like this:
dumping latest points...
acquiring lock...
waiting for render thread...
updating the files...
reading the old raster...
writing the new raster...
updating the stats file...
releasing lock...
done.
-
To view the image, either interrupt the run_job process or open a new
terminal, and run the convert_raster program with its output redirected
to a file: for example, ../convert_raster > image.ppm . You will need
a program that can display ppm images.
-
You may may interrupt and resume the run_job task at will. The image
will improve continuously; run convert_raster every time you want to
see the current version.
-
Eric Veach and Leonidas J. Guibas. Metropolis Light Transport.
SIGGRAPH 97 Proceedings (August 1997), Addison-Wesley, pp. 65-76
-
Csaba Keleman,2 Laszlo Szirmay-Kalos, Gyorgy Antal and Ferenc Csonka.
A Simple and Robust Mutation Strategy for the Metropolis Light
Transport Algorithm. EUROGRAPHICS 2002 (Volume 21, Number 3).