Jeff's Ray Tracer

Yes, I am currently developing my own ray tracer. While most people may be content to know that they could/have written one, I, being an egotistical fool had to not only write one, but announce its existence to the world.

Capabilities Matrix:

Ability Degree Implemented Comment
Primitives Spheres, Extrusions, Planes, Boxes, Bezier Patches Rational Bezier Patches are not yet working
Scalar Fields Meta-balls, Meta-lines, Meta-Tori, Meta Scheme (Arbitrary scheme expression) Addition, minimum, maximum, and multiplication mixtures. Linear and Wyvill models for fall off.
Shaders Constant, Lambertian, Plastic, Glass, Two caustic related ones None
Caustics Via Light maps (Tracing from light source) and Monte Carlo trace from intersection point None
Textures Checkerboard, Parametric, Texture maps Texture maps only support point sampling
Texture Projections World, Local, Parametric, Cylindrical, Hashed noise interpolated with arbitrary degree, and Normal Projectors are nestable.
Trimming Of planes and bezier patches, with polygons, circles, squares, and bezier lines (including rational) A bizzare combination of winding & alternating rule used
Description Language DEFINEs, structured, integrated scheme-based interpretor No forward references
Cameras Planar proj None
CSG Intersection, union, difference, A, B All primitives work.
Optimizations BBox for trims and objects. Assembly code for matrix transformation of vectors. Ray/bezier surface/curve isections done with Bezier Clipping None
Miscellaneous Reflections, Transparencies, Refractions None
Platforms Supported Wintel, Linux, Whatever the hell picards on. Coming soon, Irix.

Screen Shots

Yeah, what you really came here for.

Actually, none of them are here. They can be found at my mirror on zincland, found by clicking here.

Some of these have been reduced to 256 colours to save space. Some have lost quality in JPEG saving for the same reason. The provided source text is not guaranteed to work with the latest version of my ray tracer, but was used to generate the image.

A note on the timings: As I get around to it, I re-time these scenes on my latest build, which is invariably faster. Thus, you may notice changes in the reported times. Similarily, if you note a new and more complicated effect seems disproportionately fast, chances are I've implemented some speed ups and haven't retested the old ones. As my definition language is evolving, this can prove difficult...

'C'onstructive 'S'olid 'G'eometry

The letters 
c, s, and g cut out of a sphere

At 1024x768, this required 3,503,171 rays (4.4545 rays/pixel) to render. This came to 5m04s on a ppro 200. Note the shadows are the letters C, S, and G. The apparent error on the shadow of the G is actually supposed to be there. Thus, I learned forming a trip-let (the name given to this construct by Douglas Hofstadter in Godel Escher Bach: An Eternal Golden Braid) is more difficult than it may first appear. Click here for the source

A Bowl

Proper CSG operations All CSG treated as Union
See Foley van Dam, colour plate III.2 The same bowl, but with union for all CSG

At 1024x768, this required 3,752,437 rays (4.77 rays/pixel) to render. This came to 8m00s on a ppro 200. It is a recreation of David Kurlander's bowl as popularized in Computer Graphics: Principles and Practice. Obviously, I need to add/improve my materials, shaders and environment maps to truly recreate it. Click here for the source

Spheres and a Checkerboard

A crystal & silver sphere on a checkerboard

At 1024x768, this required 2,520,465 rays (3.205 rays/pixel) to render. This came to 1m18s on a ppro 200. It is another recreation, this time of an early image produced with recursive ray tracing. Note the refraction on the crystal sphere and the translucent shadow that it casts. Click here for the source

Meta Balls

obMeta Balls Meta Lines
Two meta balls interacting Two meta lines interacting
Meta Tori Reflective Meta Expression
Three axis alligned meta tori Three reflective meta balls with center punched out with a negative
 weighted meta line

At 1024x768, this (the canonical pair of meta balls) required 1,159,316 rays (1.474 rays/pixel) to render. This came to 2m34s on a ppro 200. It conists of two meta balls' fields interacting in an additive manner. The fall off uses the Wyvill model. Click here for the source

Caustics

Glass sphere focusing light onto a plane

This was rendered using light maps, with the plane set to 100x100 patches and approximately 1,000,000 rays sent from the light. At 1024x768, this required 2,800,474 rays (3.56098 rays/pixel) to render. It also allocated 230k for the light maps. The time came to 1m21s on a ppro 200. Note the specular reflection of refracted light! Each patch stores not just the amount of light recieved, but where it came from. The results from the Monte Carlo approach are similar, but took 6h33m15s to render at 1024x768, and overflowed my 32bit ray counter! Click here for the source

Bezier Patches

Single blue bezier patch on red background

This was rendered using bezier clipping to find the ray/patch isections. At 1024x768 this required about 901,735 rays (1.146615 rays/pixel) to render. The time came to 3m49s on a ppro 200. Note that the patch is semi transparent. Click here for the source

The Utah Teapot

Blue teapot on red and green checkerboard floor Blue teapot with UTAH written on it on a wood textured floor
What raytracer is complete if it has not rendered the Utah teapot? This teapot is composed of degree 3 bezier patches, whose points were ripped from the net. To render at 1024x768 required 2,359,296 rays (3 ray/pix) and took 42m48s on a ppro200.
Back to Jeff's Homepage
Guess what? This page fails the kinder, gentler, HTML check...