CSE168 Final Project: Dusk At Sea

My Van Pham



For my final project I chose to render a seascape at dusk. Not having modelling skill I looked around on the Internet for some downloadable models and came across this fishing boat which brought to mind an ocean scene. I had also been very intrigued by how random, fractal noises can be used to depict realistic-looking landscapes and sea surfaces and had always wanted to try it, so the boat model and the intended implementation feature seemed like appropriate choices for the final project with a nautical theme.

I intended to use the following techniques for the rendering of the image:
  1. Geometry:
    This is the image of the inspirational fishing boat model:



    The 3D model of the boat has 62075 triangles and was rendered (in no time!) with my BVH acceleration structures. Here's the wire model of the object:



    Off from the start I knew that my scene would be geometrically simple - just an ocean surface for the boat to float on and a dusky sky overhead. Most of the efforts hence will go into embellishing this uncomplicated seascape and making it more appealing. The initial composition submitted for the project proposal thus looked like this:



  2. Worley Fractal Cellular Noises:
    For the sea surface, Worley fractal cellular noises was used to create the wave patterns. Inputs to the Worley noise F1 function are the coordinates of the hit point P (among other parameters) with progressively smaller frequencies, and the result is accumulated over a number of octaves with a given persistency factor. I experimented with the parameters in order to find the most appropriate level of noise, and with my specific rendered scene I settled on a persistency value of 0.085 and a number of octaves of 20.

  3. Bump Mapping:
    If the Worley noises were used directly as the shade of the pixels, the result wave patterns would look flat and the reflection of the boat on the sea would be perfectly smooth (and incorrect) as in the initial rendering above. Bump mapping was used to create illusioned depth on the surface. I implemented bump mapping by computing the partial derivatives of the positions that were displaced from the original sample points by a finite distance in the direction of the normal. The partial derivatives were calculated using product rules and some estimation of the change in the bumps between the two locations via a finite differencing method (many thanks to Toshiya Hachisuka for walking me through all that). The partial derivatives of the bumped location were approximated to be the sum of the tangent vectors orthogonal to the normal of the original point plus the "rate of change"of the bumps between the two locations times the original normal. The normal of the bumped location is the cross product of the two tangent vectors found.

    Some examples on how the wave patterns can be changed dramatically by manipulating the noise parameters. The scene is vast and the waves have to be made in scale with the boat so they are subtle to see, especially towards the horizon, but the bumps can be more easily discerned in the dark foreground of the final image, or in the broken reflection of the boat on the sea surface.

            


  4. Perlin noises:
    Perlin noises were used to create the clouds in the dusky sky. Again, turbulence (fractal noise) was implemented and experimented with different input parameters to achieve the desired cloudiness. I found that by manipulating the x, y, z of the input point I could generate clouds that would be oriented in a certain direction. Since I wanted to emphasize the width of horizon (which happened to be the y axis in this case) I modified the input accordingly. The returned noise value if greater than 1 would be clamped to 1, then a chosen fraction of 1 was subtracted from it (the subtracted portion was essentially the amount of cloud we want to eliminate). Negative results would be set to a very small epsilon value so the pixels at that location won't appear black. Then this value is used to interpolate (blend) the color of the sky with the whiteness of the cloud. I added a touch of pink to the cloud color for the sunset effect.

    Various cloudiness due to manipulation of input parameters to Perlin noise function:

             


  5. Pathtracing:
    The scene was rendered with pathtracing in place, originally sampling 100 rays per pixel and with a predetermined level of recursiveness (no Russian roulette). Since the geometry of the scene is very open, with just a triangle for the sea surface and another for the sky and empty space all around, the pathtracing didn't seem to produce much effect however whether the feature was turned on or off. An unintended effect of the pathtracing feature is noises (the unwanted kind) appearing as black dots on the sea surface.

    Demonstration of artifacts due to pathtracing:



    To eliminate these artifacts I reduced the number of sampling rays to 50 and reflected the ray only twice.

  6. Area Lights & Soft Shadows:
    Most of the lighting in the scene comes from the area light source which is the sun. Faint soft shadows can be discerned beneath and behind the boat (rather blended in with the broken reflection in the water), and the side of the boat that faces the viewer. The sun is composed of two light sources at close proximity but not identical location, one produces white light and one produces red light for the glowing effect. The red light has lower wattage than the white light hence its smaller extent produces the extenuating glow. Soft shadows were calculated with 1000 shadow rays per pixel and the areas of the light sources were opened quite large in order to illuminate the whole scene.

  7. Depth of field & blurred motion:
    Depth of field/blurred motion (by jittering the camera location before tracing) was used to depict a couple of seagulls in motion, one was close to the foreground so that it's out of focus. A complication arose concerning the blurring of the whole image versus that of just one object in the scene. Time probably would have been better used to implement volumetric scattering to produce fog on the sea surface. The efffort was hindered in the end but I will continue working on this on my own. Plus, remembering the adage about looking at ourselves in the mirror and taking one thing off before going out of the house, I think the aesthetics of the scene may actually be improved without the stylized seagulls. :)


    And here is the final rendered image...




    With mostly noises I hope I have created something that you would find somewhat peaceful and pleasing.