[Picture of me] [RSS feed]

Illuminatus

Ray tracing is a very calculation-intensive method for creating highly realistic images. Basically, it's the method they would've used for rendering dinosaurs in Jurassic Park or toys in Toy Story if it hadn't taken too much time to calculate the images that way.

In April 1999, instead of studying for a Computer Graphics exam, I got the ridiculous idea of writing a ray tracer in Java. Ridiculous, because writing a ray tracer seemed very complicated, and because Java is a slow language, and not anything you'd want to use for something that requires lots of computations.

It turned out that writing a ray tracer wasn't as hard as I thought. Writing a simple ray tracer took two days; then I added features to it for four more days, so I've worked on it for six days total. It would've taken even less if I'd looked up the necessary formulas in a book instead of trying to derive them myself. It's slow, as expected, so right now it's only useful for very simple scenes, but it was fun to create.

By the way: I passed the Computer Graphics exam, but ironically, I somehow failed to get a full score for my answer to the question "What is a ray tracer?"

Update (September 2015): This page used to feature a Java applet that raytraced a pool ball animation. Because today's browsers generally lack support for Java applets, I've decided to port my raytracer to Javascript. Right now it's working decently, but it needs a few bug fixes and optimizations before I can add it to this page.

Illuminatus v0.6 supports:

  • spheres and convex polygons
  • light sources (ambient, diffuse and specular light)
  • phong shading (meshes, rotational surfaces)
  • specular and diffuse reflections
  • transparency and refraction
  • texture mapping (image mapping and procedural solid textures)
  • bump mapping, reflection mapping, transparency mapping
  • global environment mapping
  • antialiasing
  • area lights
  • interference pattern reduction
  • motion blur
  • volumetric fog
  • "auras"
  • depth of focus
  • animation
  • partial physics model (gravitation, sphere-to-sphere collision)
     

Gallery

The only picture I've rendered with the latest version of Illuminatus is the one of the pool balls above. The pictures below were made during the development of Illuminatus. They look pretty similar, because I usually used the same basic scene (two rectangles and two spheres) to test the program. Click the thumbnails to view the images at full size.




This picture shows refraction, my procedural solid wood texture, and a bump-mapped floor. Notice how flat the distant parts of the floor look; that's because it has nothing to reflect.






In this picture we have diffuse reflections on a steel ball; a brightly lit, motion-blurred pool ball, and area lights (which creates soft shadows). Please note the ray tracing cliché of a reflective sphere on a checkered floor.






I changed the refraction formula to what I hope is a more realistic one. I also made light not reflect when it hits the inside surface of a sphere. This picture shows an early version of my global environment mapping routine; the floor and spheres reflect a photo that's "wrapped" around the scene. Unfortunately, I messed with the specular lights, so the specular highlight on the pool ball doesn't look as it should.






The same low-polygon count wine glass rendered with and without phong shading. Phong shading is a method for creating smoother surfaces by interpolating the vertex normal vectors across the surfaces. I found it was much harder to implement in a ray tracer than it would have been in a conventional 3d renderer, that draws one polygon at a time.