As a swimmer I have a complete love for the water. For my final project,
I wanted to experiment with water and its ability to turn any normal
scene into something pleasant to look at. After downsizing my goal from a
swimming pool to a living room fish tank, I approached the steps I would have
to take to make this scene a reality. The following represent the techniques
implemented in this scene:
After taking a little time to experiment with textures in assignment 3, I wanted
to take it a step further and see how interesting the scene could become with different
procedural texturing. To begin, I created a function that computed the spectral synthesis of
the Perlin Noise function, otherwise known as fractal Brownian motion. From this, I was able to develop
the following patterns:
For the water, I simply displaced the (x, y, z) coordinates of the normals using three different fBm turbulance functions. Using 2 octaves, this gave me a realistic looking water scene, which I could then apply refraction to.
The scene contains only one obj file, while the rest of the objects I created using single triangles.
I began by making the marble table, simply a box with a marble texturing (as described above) and a specular
reflection component. I then continued to add a stone base for the tank, as well as stone lining around the top.
The base is simply a diffuse box with stone texture added, and the top is four boxes to make the rim of the tank.
Finally, the glass is 8 seperate sheets of glass, layered to make a solid wall. The refraction accounts for this
factor later. To top it off, a few other objects are added to the scene including a diffuse tie-dye box.
I also implemented environment mapping so that the scene could be set in a church. To do this,
I used a church HDRI file as the environment map, and mapped each image coordinate to a sphere.
I used the direction of the ray to determine the (u, v) coordinates of the sphere and obtain
the correct color.
In order to make the scene look realistic, I had to slightly modify my refraction to account for
solid objects. The shader now keeps track of whether or not we are "inside a material". If we are, it
switches n1 and n2 to account for entering or leaving the object. The solid glass is implemented using
n1 = 1.06 and n2 = 1.66. The solid water is implemented using n1 = 1.06 and n2 = 1.33. By combining what
we have so far, the image looks something like the following:
Finally, I implemented beer's law to show the potentials with liquids. The formula used is A = (a*c*l*radiance)
where a = absorption coefficient, c = water concentration, and l = distance traveled through the water.
In order to dramatically show the effects, I chose to make my liquid absorb blue and green, allowing more
red light to pass through.I began by identifying the areas that needed Beer's law to be applied
By applying the environment mapping along with the effects described above, the final scene is made.