SSRT: Shaun's Simple Ray-Tracer

You can find my new Home Page and SSRT site at

This page contains publicly available source code and binaries for a Monte-carlo path tracer that I (Shaun Nirenstein) have written recently. The design goal of this ray tracer is simplicity, since my intentions are entirely pedagogical. This is not my field of research, so I would appreciate any feedback with respect to any conceptual errors in the implementation.

The win32 SSRT source, executable and an example scene can be downloaded here. It's 1.2MB.

Specifically, the source code:

Despite this simplicity, the features I have implemented are:

Things you can do to improve SSRT (alternatively, things you can ask your students to do, if you are running an advanced graphics course):

Links that I found useful when developing SSRT:

Peter Shirley's papers
The Global Illumination Compedium

Gallery pictures:

The floor in the above image is reddish, and is imperfectly specular. The sphere is perfectly specular.You will note that there is colour bleeding on the top and back wall and on the cube.

The above image is similar to the one above it. It is just that the back wall is imperfectly specular. Note the colour bleading on the floor, roof and cube..

Here are some gallery pictures throughout the development of SSRT:

This image was generated using 25 rays per pixel. The reflection in the sphere is a bit dark due to a scaling problem that has been fixed. You will notice that there is some subtle colour bleeding on the white wall, roof and floor from the coloured walls.

Same as above, but with importance sampling (just cosine sampling, since all surfaces are either perfectly diffuse or perfectly specular). You will note that using the same number of samples per pixel, the image is less noisy.

Importance and stratified sampling. The same fixed sample is being used per strata here. There's far less noise in the image, but there are some other obvious artefacts.

Importance and stratified sampling, using varying samples per strata. This has converged a lot quicker. If you look at the floor, there is still a minor artifact caused, by the reuse of the same pattern of strata. I.e., for all path depths, the same strata element is used.

The final image version. Now, random sequences are randomly used to determine the ordering of strata, for each depth in the path tree.

A side by side comparison of SSRT without and with all the goodies. They used the same parameters, and took the same amount of time (approx. 1 minute on a P4 3.0Ghz -- not the fastest time around).