Realistic Deep Ocean Water

I spent most of today working out how to get a nice looking deep water effect, and I think i’ve got a pretty good method figured out. I thought I’d share it with everyone here =)

I started out with this tutorial.

http://www.pekaro.de/blender/water/water_tutorial.html

While it’s great for something like river or pool water, it definitely left me wanting as far as ocean or lake water went. So, I decided to improve upon it.

Picking up where that tutorial left off, it was clear that I was going to need to add depth to the water, because ocean water has such subtle greens and blues that i knew I wouldn’t be able to get it with just a diffuse texture or environment reflections.

To start, here are my material settings for the water layer:

This effect is achieved by using three different cloud layers and a stucci layer, the settings for which are below:

Texture 1

Texture 2

Texture 3

and Texture 4

The first texture is applied as a displacement modifier (not a disp texture) with a energy value of -.05

Now, this is what it looks like with just those things, a simple blend sky, environment lighting turned to sky color and a sun lamp:

It looks good, and it would be great for a scene in shallower water, but it’s not what I was looking for.

I tried a few methods of getting the color right that all left me wanting, until I thought about why the ocean looks to way it does. What I came to was a combination of environmental conditions (which is already covered pretty well by environment lighting) and the fact that there is a lot of crap in ocean water that causes light to reflect and refract to varying degrees. Luckily, Blender now has an easy way to simulate such things: Volumetrics!

I stuck a cube just under the surface of the water and gave it a volume material, and after messing with the settings for a few minutes, and by adding a flat plane with a deep blue flat color in the middle of it, I found a setting that gave me the effect that I had been searching for:

The volume settings are simple:

And it gives a very convincing effect. And the best part is, it’s all procedural.

Now, this gives a great still image, but my intention was to use this water in an animated scene. I followed the directions on the tutorial page, but as it only used flat maps, it gave a very unconvincing effect. So, on top of keyframing the large, smalI, and reflection maps, I decided I’d need an animated displacement map as well. Turns out this isn’t as simple as just animating the offset for the map you use in your displacement modifier (even though I’ve read claims that this is working in 2.5, I couldn’t get it to do so). But it was easy enough to make a turbulence map and have it be controlled by an empty effecting the Z axis. I also ended up adding a very subtle wave modifier to the whole thing. You can see my modifier stack below:

In the end, depending on your key frame settings, you can get a very nice looking ocean going. My test video is at http://www.vimeo.com/13613397.

Anyway, I hope this is helpful. I know there’s a lot of information in there, and I apologize to anyone whose browser I kill with the large images. This is my first tutorial, although I’ve been meaning to make one for years. Let me know what you all think. If you like it, perhaps you’ll see more from me, along with video tutorials. If you come up with any ways to improve upon this, by all means chime in. I’m definitely still tweaking my technique, and would love to hear the feedback.

Here is a link to the original .blend

http://www.gigasize.com/get.php?d=ov0omm0y5sb

~Matt Heimlich