Bourbon on the Rocks - CSE190 Final Project
by Josh Wills


***Winner of First Prize in the 2003 UCSD Rendering competition***

Introduction
For my final project, I wanted to render something that would display some of the interesting properties of dielectrics like caustics (the bright spots on the table under the glass) and refraction (the way light bends, as seen in the distortions of the edge of the bottle through the glass). I chose to render my favorite drink, Maker's Mark on the rocks. There has been a fair amount of alcohol rendering in computer graphics in recent years (esp. Cognac), but whisky - bourbon in particular - has been grossly underrepresented. I am trying to do my part to make sure that this does not continue. This has required more effort than I initially guessed, but I have enjoyed both the implementation and 'hands on' research involved with rendering bourbon.

The following components were implemented for this project and used in the above images:
  • A basic ray tracer (dubbed "pablo")
  • Beer's Law and Fresnel terms for the light/glass interaction
  • Soft Shadows
  • Depth of Field (visible in the far edge of the table)
  • Photon Mapping for caustics and indirect light
  • Environment Mapping with lighting estimates
  • An acceleration structure (so this doesn't render for an entire quarter)

Object Modeling
All of the objects in the scene were modeled using Maya. The shape of the ice cubes was based on the glass ice cubes that are used in beverage photography and they are approximated as homogeneous objects. The bottle is based on an actual bottle of Maker's Mark as is the glass. The most difficult part of the modeling process was partitioning the triangles into groups with the correct dielectric interfaces.

Getting Beer's with Fresnel
Using Beer's Law (approximates how light gets colored within a medium) and Fresnel terms (how much light is reflected from a surface versus how much light is refracted) makes very subtle differences in the final image, however without them dielectrics (esp. colored liquids) look very artificial. The image at the right shows the same scene rendered without using Beer's Law (however the Fresnel terms are still being computed), and notice how murky and artificial the liquid looks. It is easiest to see in the color of the ice cubes and the relative color of the liquid in the neck of the bottle versus the liquid in the body of the bottle.

Side by side comparison

The absorption coefficients for the whisky were estimated through a painful, trial and error process. Also, the wax uses fresnel terms to control the strength of the reflection.

Photon Mapping
The caustics in the images were generated using photon mapping. They are subtle in the first image but important for realism. Notice in the image on the left how dark the shadows are and how dark the table is under the glass and bottle. Both of these regions are lit via caustics. In the second image (on the top of the page) the cup is floating and a very bright light is strategically placed to provide very visible caustics. It might not be physically possible (given the whole gravity thing), but hey...what is the point of doing a caustic map if you don't have a gratuitous caustic image?

Incorrect but interesting looking caustics

Environment Mapping
The environment mapping was done using the methods by Paul Debevec. The map is from the kitchen at 2213 Vine Street. The lighting of the scene was approximated using Structured Importance Sampling. Environment mapping adds a great deal of realism to scenes (esp. those with many reflective surfaces).

Depth of Field
The depth of field is hardly visible in the final image, however the soft edge at the end of the table adds a little sense of realism. Notice in the images without depth of field (such as in the photon mapping section), have a sharp edge in the back that is a little distracting. The image on the left has a larger lens and thus more pronounced depth of field.

Depth of field test scene


Acceleration Structure
To make this rendering tractable, I implemented a bounding volume hierarchy (bvh) with a cost function that minimized the surface area of the bounding volumes. The image on the left shows the first few levels of the hierarchy for the scene. This acceleration structure improved my times by a factor of 10000. For a scene containing the Stanford bunny (69,000 triangles and a resolution of 640x480), the naive rendering time (looping over each triangle) took 2000s whereas with the bvh the render time was less than half a second.


Random Image
During debugging, I usually reduce the iteration depth of the rays (how many times a given ray can reflect/refract) to make rendering very fast. This results in images that look like glass full of oil. I think the image on the left looks neat.



Maker's Mark is a registered trademark of the Maker's Mark Corporation
...but this isn't commercial so I hope it's not a problem