Friday, January 27, 2012

Weekly Report - Andrew Harmon


So this week I’ve been looking into the best way to create an underwater effect that captures the look of light shining through the sea and lighting the ocean floor.
After doing much research and investigation I found that there are many ways to create the effect of caustics. Some methods are much easier to implement as others, and as is often the case, the easier it Is to implement the less realistic it will likely look.
The easiest way to create an effect is by using a caustic generator like this one. http://www.dualheights.se/caustics/. This program can be used to create a short animation that can be reproduced randomly on the ocean floor. However, this method would likely result in a floor that appears too repetitive, and it could be very easy to realize that the same animated texture is being used over and over.
In order to create a truly realistic effect you would have to actually create an effect that simulates the realistic movement of an ocean surface. You would then have to determine the intensity and direction of the sunlight. Then using refraction and reflection equations you would have to trace each photon of light and determine the effect that each equation would have with the water it intersects with. The rays would then be traced to the ocean floor, and then based on the murkiness and depth of the water, a certain amount of light would be reflected on the ocean bottom.
Now that would be the most extreme approach, but there are other methods that are a little easier to implement with similar results. This poster goes into a little more depth on some different approaches. http://www.3dbuzz.com/vbforum/showthread.php?186376-XNA-underwater-caustics&daysprune=-1#post1536229
The method I have chosen to implement will use a directional light, which will intersect with some imaginary wave functions, based on where the rays hit the normal of the vertices of this wave, the light will be sent in different directions, or will not be calculated. This will created a “spotty” effect on the ocean floor, creating a similar look to an ocean floor in shallow waters.
This is only one aspect to making an ocean look. There is also the aspect of visibility. Based on how “foggy” the water is, and the color of the water is, you may be able to see only a hundred feet in front of you, or you may be able to see hundreds of yards in front of you. But one thing that is certain is that objects will appear less distinct the further they are from the viewer.
Another aspect to some parts of a sea is the light rays that pass through the water, giving it a slight, but constant change in color.
Also for some finishing touches, some floating particles, and maybe some shadows from the sea creatures can be added to the ocean floor can be added to the scene.

Here’s a clip from Finding Nemo where you can see all of these aspects working together. You have the caustics, the fog, light rays, particles, and shadows.

It’s not an easy task to create realistic looking water, but these are some ways that it can be done.

No comments:

Post a Comment