Subsurface Scattering in a Lavalamp

Dale Beermann and John Tran
(beermannATcsDOTvirginiaDOTedu, johntranATcsDOTvirginiaDOTedu)

 

Introduction and Background

We rendered a lavalamp with lrt. We implemented Henrik Wann Jensen's 2002 Siggraph paper on A Rapid Hierarchical Technique for Translucent Materials. This is basically his 2001 Subsurface Light Transport paper but with an octtree to cache results so not every sample is compared to every other sample. The octtree greatly speeds up the rendering, depending on the depth traversed.

The model of the lavalamp was made in Maya. It is rendered using photon mapping and image based lighting with light probes from Paul Debevec's website. The images above are generated with 3x3 sampling per pixel. You'll probably notice the black pixels at the tops and bottoms of some of the blobs.. This is an unfortunate byproduct of lrt's nurbs tesselation where some degenerate triangles are created.

lrt is a physically based ray tracer written by Greg Humphreys and Matt Pharr. It is a "literate ray tracer," written in a way that makes it easy to understand (for more information on literate programming, refer to Donald Knuth's 1984 paper "Literate Programming").

This rendering was the final project for an Image Synthesis course at UVA in Spring 2003, taught by Greg Humphrey's.

For more information about any of this, or if for some reason you want the source code, email one of us and we'll probably give it to you.

Implementation

We added a translucent class for materials to lrt. This returns a TranslucentLambertian bsdf that tells the integrator whether or not the object is translucent. We also added a specialized octtree class to the photon mapper. The photon mapper keeps track of several octtrees, one for each translucent object in the scene. This way, photons on the surface of one translucent object don't affect the approximation for subsurface scattering on another object.

Each octtree caches the power, area, and irradiance at each node, so for any traversal, it can decide to stop and return the irradiance of that node instead of going deeper into the tree. Traversal through the tree is dependent on the total area occupied by the samples under that node. As long as the area is above a threshold, the children will be used for the approximation. While this hierarchical approach speeds up rendering, if the threshold used is too high, significant errors are introduced to the calculation.

Metaballs

Originally, we tried to incorporate metaballs as the lava in the lavalamp. However, it turns out to be hard to approximate surface area for metaballs, so we ended up reverting back to nurbs which refine to triangle meshes. We looked at implementing point repulsion of particles on the surface of the metaballs, but in the end figured we wouldn't have time to do both this and implement subsurface scattering. We only got as far as writing the intersector for metaballs, making a new shape class called Blobby. Here is an image of the original metaballs we made:

More images:
1024x1024 rendering at 4 samples per pixel - the underlying resolution of the light probe is what causes the grainy background
Artwork