CS 348b Final Project Proposal
Kevin Coletta (kcoletta), Jed Crosby (jcrosby), Alex Williams (alexgw)

Proposed Scene

We propose to render an underwater scene in shallow water, containing some form of sea life – preferably a shark, but possibly some fish, depending on the quality of models and textures we find. Our goal is achieve a high level of realism through the use of effects such as the scattering of light through the water and the caustics created by the sunlight on the wildlife and the sea floor. The project is appealing to us because it encompasses all of the effects we would like to recreate, will hopefully produce some visually stunning images, and represents a challenging yet separable endeavor for our three-person team.

Some reference images:

 

We will be trying to combine elements from several images into an aesthetically pleasing blend. The image we will most closely follow is the picture of the shark shown here:

 

 

Another (large) image of underwater near-surface sea life can be seen here.

 

 

We would like to get some clearer caustics on the sea floor, perhaps by making the water even shallower and adjusting the angle of the camera. Finding the right balance between the beautiful undersurface of the water and the caustics on the bottom will be one of the artistic challenges of the project. An idea of the kind of caustics we like is shown below:

 

 

 

 

Finally, another effect we would like to try to incorporate is the sunburst coming through from above the surface of the water. It may be impossible to get this and the floor caustics in a realistic viewpoint, but it is something we will investigate. The kind of sunlight we envision can be seen in this photograph:

 


 


Description of features / technical challenges:

Photon Mapping & Caustics (Kevin)

In order to create the beautiful caustics both on our subject and on the sea floor, we will extend the beginnings of photon mapping capability that are contained in pbrt. We expect to make extensive use of Henrik Wann Jensen’s Realistic Image Synthesis Using Photon Mapping, among other references yet to be determined.

Shader Language (Alex)

We plan to implement a basic shader language to allow translucency, reflectivity, and bump-mapping to all be controlled by various input texture maps. This will allow us to more arbitrarily modulate the material properties of surfaces in ways that will be useful for rendering surfaces with varying surface properties. Partially rusted material and other undersea wreckage could obviously benefit from the ability to combine bump maps and textures for controlling reflectiveness. Other uses would be on fish scales, the water's surface, and on any other object with varying material properties across a geometrically continuous surface. We expect to make use of Hanrahan and Lawson's 1990 shader paper, Cook's 1984 paper on shade trees, and other resources.

Shader Language Results

Implementation

The shader language is implemented as a material plugin that reads in a set of shader commands and materials / values to be operated upon, and then executes the given commands in RPN fashion ("Reverse Polish Notation"). Arguments can be either scalars, vectors, or textures, and commands are drawn from the following pool:

In order to actually have arguments on which to operate, the following commands allow the user to specify input:
The processing of arguments is done with a simple stack of arguments and commands. The RPN input facilitates straightforward left-to-right processing of input tokens, adding new items to the stack when they are specified in the .lrt file, and popping items off the stack when they are consumed by commands (and then result of the command's execution will then be placed back on the top of the stack). In addition to the alexshader.cpp material source file, changes were made to paramset.cpp and paramset.h to facilitate location of textures by name (e.g. "mytexture"), rather than the parameter that is controlled by the texture (e.g. "Kd"). The various properties of a material (transparency, reflection, specularity, etc.) are all controlled by shader commands that are prefixed by the name of the parameter being controlled.

Example shade trees
Below is an example of a simple use of mix, from an example in Cook.

The example below shows how the commands can be "nested" (in RPN style) to produce arbitrary shade trees.

The image at right shows two of the problems we had with texturing. The imported boat model does not have supplied texture coordinates, and although the shader language allows arbitrary equations to specify specular and diffuse effects here, no "scale" parameter was implemented in the shader language to control the spacing of the (u, v) coordinates, so in this example the textures repeat far too often for the ground texture (especially the rocks) to be convincing.

The sphere below demonstrates the use of the surface normal. It is textured with the same commands as the red and blue marble above, but this time, in addition the surf_norm (surface normal) of is dot-product'd with the (0, 1, 0) vector, and that value is multiplied by the red / blue mix texture. The end result is that the top hemisphere of the marble is colored, while anything below the equator is black (and the color tapers off near the equator).

Below is the relatively unexciting result of just adding a solid color (blue) to a normal red / blue spectrum texture. However, this technique makes it somewhat simpler to create texture variants from existing textures.

Volume Scattering (Jed)

In order to produce the sunburst effect pictured above and to allow for some cloudiness in the water, we will need to consider the water as a participating medium. Pbrt already has some facility for volume scattering, but we may need some notion of spatially inhomogeneous atmospheric attenuation in order to make the water clear in the foreground and cloudier in the background. We may also explore using subsurface scattering to increase the realism of fish and aquatic plant life in our scene.

 

Other effects / extensions (anyone and everyone)

 

We expect that although modeling the surface of the water will probably not be a large enough task to classify as a “main” part of the project, it will likely still be a challenge worth noting. It will be very important to get the right level of disturbance on the surface to create the artistic feel we want and maintain realism.

 

If we have time, we would also like to include some debris or personal effects on the bottom, which may have been cast off or lost in ways only imaginable. This could include anything we can find good models for and can apply our shading or bump-mapping techniques to, but we think a hand mirror being casually observed by the locals would be particularly striking.