Rendering an Ice Cube

Preliminary Steps

Defining the Surface

Generating a Bubble Distribution

We chose the following: an x4 curve, followed by a uniform distribution, then another x4 curve. This way, we always generate bubbles inside the object, and on average, as close to our distribution as possible. Our rational was the following: the “cloud” of bubbles in the middle seemed to be saturated so much that the bubbles are of a constant density. We wanted the bubbles to drop off very quickly as it approaches the edge. x4 produced the best results empirically.

Our bubble generator is implemented in pbrt as icegenerator.cpp, which creates the bubbles and then writes it out in Preprocess function. This way, we had access to the complex objects that we (thought) were going to make up our scene. We sampled points on the surface of the scene by randomly sampling over the triangles that made up the scene.

Here is a very large image of the bubbles as ice bubbles.

Placing the Bubbles in the Ice

Here is the image with all of the bubbles from our distribution.

This is a close up of the bubbles. You can see how bubble-like they look as spheres.

Creating a More Ice-Cube-like Cube

We fiddled around with 3D Studio Max some more to find a way to preserve the faces on a box while softening only the edges. They were exported separately. This time bump mapping was only applied to the faces. This worked out much better, as we got the following image.

We added in caustics because ice, like glass, tends to concentrate light in certain regions. We made use of the photon map and got the following image:

Photon mapping is an extremely expensive process, and both the number of initial photons shot and the sample makes a huge difference. We had limited time, but many computers that we could utilize, so we ended up modifying photon map to generate the photons, then write it out to disk. We then made use of the “clipwindow” functionality of the film class to render each section of the image separately. This cut down our total rendering time to 1 hour instead of over 5 (for images of 1000x1000 pixels).

Redefining the Bubbles

What ended up working the best was to have a fresnelblend similar to the one that we implemented before, only with a stronger diffuse, allowing the same refraction and reflective properties, but with stronger diffuse coefficients. We adjusted the values by hand and got the following image.

Final Results

And here is another one rendered with more photons.

Between us, Yi Lang worked on the bubble generation and caustics. Joyce worked on defining the BxDF of the surface (and the bubbles), bump mapping, and creating the ice cube geometry.


Source Files: source_files

JoycePan/FinalProject (last edited 2006-12-30 19:20:12 by PatHanrahan)