CS 563 Final Project

Damon Blanchette


-- Theme --

For my final project, I plan to combine two things I love: computer graphics and quality craft beer. I'll be creating a render very similar to this (low-quality) image I took with my phone:


All brews that Allagash release are fantastic (the Allagash Tripel is a personal favorite), but this one, the Hugh Malone Ale, in particular, is a limited edition that stands out. I'll need to either scan that label somehow in high quality to get it in my render, or maybe I could just email the brewery and see if they will send me the image in large-format.

While this photo was taken in a kitchen environment, I plan on making the setting for the render a bar or pub. I know I've seen somewhere online a great panoramic image, that may have been HDRI, of the inside of a pub somewhere. I had thought it was originally a light probe image, but I couldn't find it on Paul Debevec's website. I will continue to search for it.

Some inspiration for this image is from Josh Wills' winning image in the 2003 UCSD Rendering Competition, which can be seen here: http://graphics.ucsd.edu/~jwills/renders/mm.html. His image is incredibly realistic, and it is something I hope to mirror in my render, though mine will hopefully be even better. My scene will differ in a few ways, including just the look of beer as opposed to whiskey, the beer "head" that will need to be included, and the surrounding scene.

I'll be using a few of the algorithms and effects from the class text (Ray Tracing from the Ground Up by Kevin Suffern) to create the render, including:

In order to create the render, there are multiple pieces of functionality I will need to add to our base ray tracer, including, but probably not limited to:

I plan to update this page as I'm doing the project, as a sort of "work in progress" so you, the world, can follow my process.



-- Modeling --

This will undoubtedly be the easiest part of the entire project. I'm going to model the bottle and tulip glass from scratch in Blender and export them as .ply files for import into the ray tracer. The table on which the glass and bottle stand will either be just a simple plane or a table top also modeled in Blender.

Here are some screen captures of my work in Blender with modeling:



The above image is my bezier spline interpretation of the cross section of the tulip glass. When you take that and rotate it around 360 degrees, you get this:



Below is a full screenshot of what the label looked like separated from the bottle. I took the bottle mesh and cut out just the faces I figured would make up the label, and then pasted the label onto them with UV mapping.





-- References --

In addition to Josh Wills' image, I will be using a variety of references:



-- Architecture and Updates for the Base Ray Tracer --

Here's a very high level class diagram showing pretty much all the classes I'll be using, except for the utility classes (Ray, BBox, Vector3D) which I won't need to change anyway. Classes I'll be adding or changing from book's code are glowing orange. I'll probably need to highlight or add more classes as I go on and figure out how exactly I'm implementing certain features (especially photon mapping).



I'll need to basically create an entire class just for Photon Maps, which is listed at the top. This will also entail creating the pieces necessary for kd-trees, which will store the data, and a data structure for a Photon, which is what gets shot through the scene to make the maps.

I will most likely need to create a completely new Tracer (which I'll call PhotonTracer) to be able to utilize the photon maps created by the PhotonMap class.

The Dielectric material will need to be edited a bit to get the Beer's Law equations in there.

The extra Mapping classes are for textures - Planar for the table, Cylindrical for putting the label on the bottle, and Environment for an environment map.

*Update* After a few weeks of actual work on the project, I found that the classes I needed to change were different than I expected. Here is a more accurate image of the class changes:



By far the biggest changes involved the World and PhotonTracer classes. The World class now contains the new code (quite a bit of it) for building both the global and caustics photon maps. It also contains the new Photon struct, which holds the photon's power, direction, and position. The PhotonTracer class is completely new, and has all the code for doing normal ray tracing and also reading through the photon maps for determining illumination.

The Ray class was changed to add variables pertaining to photons.

Small changes were made to the Light class (and subclasses), the Material class (and subclasses), and the ThinLens camera class. All changes involved adding functions so that they would work with photon mapping.



-- Performance --

Test renders were created fairly quickly, on the order of anywhere between 2 to 30 minutes. Render times were obviously very much affected by multiple variables, including: number of samples per pixel, number of photons fired into the scene, maximum depth of the rays and photons, size of the final image, and number of photons gathered for pixel light contribution. Increasing the values of any of these variables created render times in the hours.



-- Concerns --

There are a few concerns about doing the project as I've conceived it in my head:



-- Timeline --



-- Updates --