A Technique for Creating Realistic Oceans and Seas

Let me start by saying I am a Carrara noob. With just a year of experience under my belt, I'm learning a lot every day, so I have a great deal yet to learn. With that in mind, I hope you find this description for how I create my ocean scenes useful.

I am (like others I assume) interested in knowing what others have done to create oceans. If you have developed your own techniques, I hope you will share them on this (or another) thread!

Overview
I have to admit, as a long-time fan of ocean pictures and paintings, I was excited when I discovered Carrara had an “Ocean” object. But, no matter how hard I worked at it, my ocean renders just didn’t have the kick-butt feel I was looking for. I suppose the Ocean object is better than starting with nothing, but so far, my Carrara interests have been in realism, so I wanted more than what the Ocean object has to offer.

With a little experimentation, I discovered I can create nice ocean effects by following these five basic steps:

1) Lighting and atmospheric effects will change how your ocean surface and shader look, so I start with creating the general scene atmosphere.

2) Create and size an ocean surface using the Terrain object.

3) Shade the ocean surface.

4) Replicate the ocean surface.

5) Fine tune the ocean to create the ambience you want, and add your objects.

In the posts that follow in this thread, I will show how to create the scene attached below. If you are looking for a shortcut, you can download the CAR file used to generate this image with the following link:

NOTE: This CAR file contains the ocean terrain I used in the scene attached to this post. This file is for public use; so feel free to modify and use it as you want. I just ask that if you find something really awesome, that you post something about it in this thread, and share your discoveries with others.

Comments

Through a lot of trial and error, and like what I am discovering about ANY scene I create, I have discovered if I want to give the ocean surface the right look and feel for my scene, I have to first work on the atmospheric settings. There are three reasons I do this.

First, if I don’t start by setting the basic lighting, I often find myself redoing the surface and shader after making a lighting change. Of course, like most things with Carrara, I learned this the hard way. I spent 4-5 hours making fine adjustments to my shader the first time, only to rework it later because I changed the scene lighting.

Second, I like to set up my scene environment early to work with the horizon effect. My approach to creating an ocean is to create ocean “cells” and then replicate them. But even a replicated ocean has its boundaries, so my ocean won’t go all the way to the horizon. But with some adjustments, there are ways around this. (More on this in step 4.)

And finally, I work on the atmospheric settings early because I find it essential for setting the right mood. Do I want to create a calm ocean set under a large moon? A stormy red morning sea? Deciding on this will drive the ocean surface and shader settings.

For the purposes of this description, I will being creating a fishing trawler scene, where later (not covered here!), I will add men throwing or pulling in nets and maybe seagulls flying overhead. for this scene setting, therefore, I selected and loaded the predefined "Caribbean Sky" realistic sky setting, and made a few minor adjustments. Note: Turn off "Enable Ground" in the Scene settings, so it doesn't get in the way of your ocean! (See the resulting image below.)

Once I have the basic environmental settings nailed down, I'm ready to tackle creating the ocean surface. After trying several different methods (including using a function), I found that a Terrain object gives a great deal of realism and flexibility, plus it is quick and easy to adjust as my idea for my scene changes. After some trial-and-error (of which I am still experimenting), I create an ocean surface using the following settings:

- I begin with either a mountain or hill filter layer, and adjust the roughness and strength to provide an overall surface map. (See first image below for settings in this example.)

- I then add a fractal function generator. I found "Ridged Noise" and Hybrid Multi Fractal" settings works best. You can decrease the Roughness setting to create calmer oceans; increase for rougher. Also, I've adjusted the advanced settings and gotten good results; e.g., adjusting the "Octave" setting slightly. The key is to spend some time experimenting with these settings.

- For the terrain size, I usually select the "Rescale terrain to" option in the Terrain editor to 1000 x 1000 feet. It was also useful to add a ship/boat to the scene at this point to provide some context for the size of the waves. If you already have the ship you want in the final scene ready, insert it here. If not, drop a basic ship in and adjust its size to something realistic. Note: If I want long waves moving a certain direction (e.g., wind driven waves), I found extending one of the dimensions help sell this effect. Try, for example, a 1000 x 4000 feet setting to get this kind of effect.

- Finally, I found it useful to start with a basic light color shader (no reflection, no bump, no highlight), even if I already have a shader ready to insert. Seeing all the waves and bumps in the ocean surface helps me observe the effects of making changes in the Terrain editor. I also like to check the results from several angles to make sure the surface is precisely how I want it before moving to step 3. (See the two renders below for an example of this.)

With the basic surface in place, the next step is to create the ocean shader. Creating the first ocean shader was the most challenging work. With that now complete, I begin a new scene's shader by reusing one of the three ocean shaders I already have, and make adjustments from there.

Since the shader used in the example scene is in the download file, I leave going through all the settings details to the reader. Note: At this point, I have done just enough work on the ocean shader to create the basic scene. I am still working on making improvements, and will post what I learn in this thread. More on that in a later post.

Most of the changes I make to the basic shader are the following.

1) Adjusting the amount of "foam," which helps if I want to sell the idea my ocean is really smooth or rough. The "Global Shader" layer is the foam layer. (Hint: Modify this layer to adjust how the foam looks. You'll need to adjust the other layers' Distribution Slope settings to add or remove the amount of foam.)

2) Adjusting the ocean colors to get a good mix of blacks, blues, and greens. Many factors affect ocean (or sea) colors, so I spend a lot of time getting precisely what I want here. For example, I'll examine a number of real pictures and pick a few I would like in my scene and work from there.

3) Adjusting the reflection, to mix in more or less of the sky colors into the scene. Sky color will change the color of my water, so if I've gotten the scene set right (step 1), this should not be a problem.

It's important during these adjustments to examine the ocean from multiple angles to be sure it meets my needs. I've included a few examples of some of the adjustments possible and two views.

With the basic surface and shader set, I now replicate the surface to create the ocean. Drop in a replicator and go into the editor.

1) Add the terrain object for replication.

2) Set the number of replications. I start with 20 x 20 x 1, which I have been found to be adequate. I've never had to go higher than this, but I suppose if the camera angle is up high, this may need to be extended (which is easy enough to do).

3) Adjust the grid cell size to the same as the size of the cells (e.g., 1000 x 1000 x 300). Note: It is important to set the grid cell size to be the same as the size of each cell. I suppose you can have overlap, but I don't know what effect that would have on the rendering.

4) Select "Seamless" (turn the option on).

Then I go back to the Assemble room, select the terrain object, and make it invisible (turn Visible off), so that it does not get in the way.

Below is a view of the result. Note: Even though the ocean cells are replicated without rotation, you really have to look for similarities from cell to cell. The human eye will catch repetitions for smaller patterns. This is why I choose relatively large cells (1000 feet). Also, it is difficult to tell where the edges of the cells are. (You can see them if you know where to look.)

There's just a few things left to do now to have a ready-made ocean to work with!

First, I mentioned when I replicate a terrain surface, I have a horizon effect problem; that is, I may see some "surface area" along the horizon because the replicated ocean doesn't extend all the way out. But, this is fairly easy to deal with. Once I know which direction I will be pointing my camera for the final rendering, I will slide the ocean (the replicator object) in that direction, leaving just enough of the replicated surface to extend past the edges of the camera's lens. (See the image below. The ship in the scene is selected so you can see where it is relative to the ocean.)

Next, I often have to make adjustments to object placement. If I have been using a "model" of a ship I want to place into my scene, this is where I want to replace it. Working with objects on the surface of a replicated ocean is more challenging than working with a terrain cell. Unfortunately, you can't see the replicated surface in the Assemble room, so I may need to do a few renders to readjust the height of the ocean to match the ships and other objects.

Next, if I have objects in the water (e.g., boats), I need to add effects such as bow waves and aft ripples. This can be done by adding small terrains properly placed, copying the ocean shader (new master), and editing the new shader to create the right foam amounts and color differences. I've attached an Assemble room screen shot for a bow and dolphin splash effects I added for a scene I recently did.

This is amazing work. THANK YOU FractalDimensia for your insights. I too struggled with creating a realistic ocean. After 5 days of work and many renders I decided to do it in Post. But you have given me new HOPE!

Tremendous. I am emailing myself the link to this thread so that I always have it. Really appreciate that you have taken this time (and all of your other generous posts) to explain something that I'm sure I will want to use in the future.

I did change the shader , That is, I used one of my own Ocean shader, but reused yours distribution and color channels.
It has also transparency. I forgot to check the reflections. That is actually a very good point from you. My bad... :red:

This was rendered out with sky light.
What I have experienced earlier, is that when using transparency and skylight the ground and colour of the ground is important.
I used an infinite plane set at -1000 feet. and colour black.

One thing I have also discovered earlier is that the settings in the transparency channel in combination with the colour channel is also important for the colour of the ocean.
But I have not been able to break it down to something usefully.

I did change the shader , That is, I used one of my own Ocean shader, but reused yours distribution and color channels.
It has also transparency. I forgot to check the reflections. That is actually a very good point from you. My bad... :red:

This was rendered out with sky light.
What I have experienced earlier, is that when using transparency and skylight the ground and colour of the ground is important.
I used an infinite plane set at -1000 feet. and colour black.

One thing I have also discovered earlier is that the settings in the transparency channel in combination with the colour channel is also important for the colour of the ocean.
But I have not been able to break it down to something usefully.

Varsel, one of the great things about Carrarans is the willingness to experiment and share their thoughts and what they've learned. Well done!

I was going to start testing the use of transparency in my ocean shader sometime this month, and your experiences have definitely helped set the groundwork.

BTW, IMHO, I like the image w/o the ground plane. Maybe a "sea green" colored plane would do it for me. ;) You've definitely got me interested in doing more experimentation now. Thanks!

Basically your terrain, plane or ocean primitive is a 2D skin with no real thickness. A closed shape such as cube or sphere is basically a balloon with no volume. Basically, the transparency settings for In-scattering and Absorption are ways to mimic how light passes through a transparent or nearly transparent volume.

If you use a color in the channels, you not only effect the hue of the effect, but also the amount of light that is scattered or absorbed. The brighter the color, the less the light is scattered and absorbed, the darker the color, the more is scattered and absorbed. The lighting and camera angle, plus other settings can really change the look as well. For water, it's a great way to create deep or murky water.

Below is an image where I played around with the absorption and in-scattering.

Really great that this subject has come up for discussion - thanks for the really good explanation and sharing, Fractaldimensia.

I have also been playing around with getting a decent ocean using terrains and got some reasonable results.

My trusty old PC died this week, so can't show results (Right now I'm using a small laptop that is only used for e-mail and such). Will hopefully be able to recover the HD this weekend and be able to join in.

Couple of tricks which I can add, though. I found it difficult to get a balance between choppy and jagged, so your example will help me there. What has worked and worth trying is that as a starting point I've used a free app Caustic Generator, which generates fake caustic maps as a heightmap in the terrain editor.

Distant lights under the surface, pointing upwards, help to give the ocean some depth

The terrain responds well to the wave modifier, which can be animated . Once got a pretty good motorboat animation using Sparrowhawk's Follow Terrain plugin.

Looking forward to seeing a lot more great ideas - I too am a great ocean fan. :)

Very nicely done FractalDimensia---- thanks for taking the time to share your ideas and techniques -----have to get a chance to practice some of these. And hey folks......why don't we try and keep this thread going a bit with some of our ocean scenes from what we know or learned here to expand the topic........I have to get some done myself now -----

and I think its this kind of stuff in Carrara that out of the box with a little tweaking competes decently with a lot of high end applications. Certainly in terms of ease of doing it ---it's in a place by itself ----at any price!