Revision 23 as of 2007-06-13 07:32:42

    CrystalFong/FinalProject

Final Project

Group Members

Christina Chan
Crystal Fong

Project Proposal

Our final project proposal can be found at CrystalFong/FinalProjectProposal

Overview

The goal of our project is to render an underwater scene of clownfish and sea anemone. To achieve this, we implemented two different subsurface scattering techniques to simulate the glowing and lighting of an underwater image.

Reference image

Approach

Fish (Christina)

Model

Techniques

Technical Challenges

Anemone (Crystal)

Model

The anemone model was procedurally generated using a python script to create a scene file. Each anemone stalk has a Catmull-Rom spline as a backbone, and is modeled using generalized cylinders (see the Resources section for a link to a tutorial). The script takes a control point list as input to set the initial spline curvature. To interpolate one point, it is necessary to have 4 control points (2 on each side of the desired point.) Intermediate points are generated using the following equation where p_i is a control point and t is a value between 0 and 1 that represents the distance of the desired point from the second (P1) point (where t=0 is at P1 and t=1 is at P2).

q(t) = 0.5 * ((2 * P1) + (-P0 + P2) * t +(2*P0 - 5*P1 + 4*P2 - P3) * t2 + (-P0 + 3*P1- 3*P2 + P3) * t3)


At each point(q), we calculate and store the normal(N), tangent(T) and binormal(B). This is accomplished by the following steps.

  • For the very first point, select T, N, and B.
  • For each point Q1:


  • T1 = unit(Q1 - Q0)
    N1 = unit(B0xT1) where x is the cross product
    B1 = unit(T1xN1)


  • store T,N, and B with each point

After the spline is fully specified, each vertex(q) along the spline becomes the center point of a ring of vertices that will define the cross-section of the stalk at that point. The stalk starts out with a maximum radius of .5 and tapers as it grows upwards. At 5/8 * height of stalk, a bulb shape is formed by using a sin function to control the radius of the stalk. Each point(c) on the ring of vertices are calculated by c = radius * (cos(theta),sin(theta),0) where theta is an angle between 0 and 2pi. The point is then translated based on the normal (N) and binormal(B) of current the spline vertex. This is to avoid twisting of the generalized cylinder. We used the following equation to calculat the translated point:

translated point = c.x * N + c.y*B + q


When all of the points have been generated, a triangle mesh is created and saved in the format of a pbrt scene file. Each anemone is a variation of the input control vertices, but each are translated to a different position, and the spline is modified somewhat to make each stalk unique. To ensure that the stalks do not intersect, each stalk attempts to place itself in such a position that there is not another stalk within a defined radius of each of its spline points.


Here is a preliminary image of the anemone stalks after generation.

Techniques

Technical Challenges

Final Image

Source Code

The new and modified source code files can be found here.

Resources

Pat Hanrahan and Wolfgang Kreuger: "Reflection from Layered Surfaces due to Subsurface Scattering" Computer Graphics (Proc. SIGGRAPH 1993), July 1993

Henrik Wann Jensen, Stephen R. Marschner, Marc Levoy and Pat Hanrahan: "A Practical Model for Subsurface Light Transport". Proceedings of SIGGRAPH'2001.

Henrik Wann Jensen and Juan Buhler: "A Rapid Hierarchical Rendering Technique for Translucent Materials" Proceedings of SIGGRAPH'2002

Tutorial on generalized cylinders

Tutorial on Catmull-Rom Splines

Recent