Creating an Ocean in After Effects
By Quinn StephensRequires After Effects Pro.
For those of us who can't afford Maya Unlimited and its coveted Fluid Effects, here's a relatively simple way to create a convincing animated ocean scene using After Effects Pro.
Open up After Effects and create a new composition. I set mine at the NTSC DV preset, but if you'd like to pan and zoom over your footage, make it a bit bigger (keeping in mind this will bump up your render times). Name the comp "ocean_base" or something - it's good practice to name your comps so you don't get confused later.
Create a new solid that's a good deal wider and a bit taller than your comp - in my case I made it 2000 x 600, around three times my comp width. Don't worry about the color.
Apply Fractal Noise. First we create the greater variations in the water surface - we'll be adding smaller waves in a moment. Under the Transform tab, turn Uniform Scaling off and scale the width up and the height down. Drop the contrast a bit. You should end up with something like this:
Now apply Corner Pin to create perspective. You can also make the layer 3D and manipulate its rotation, but I find this is simpler. Move the top two corners until they meet the edges of the comp.
This gives us a nice base for the water texture. Now we'll create the smaller waves. Duplicate the layer and adjust the new layer's fractal noise settings to create much finer noise. Scale the width and height down, and bump up the complexity.
Set the new layer's transfer mode to Linear Light and drop its opacity to 50%. You should be looking at something like this:
Animate the water by setting Evolution keyframes. The top layer should evolve faster than the bottom layer. I set the top layer to evolve 5 rotations over 10 seconds, and the bottom layer to evolve one rotation. Experiment and preview the animation until it looks right. The more slowly the water evolves, the more distant it will appear.
Now we have a nice moving base for our ocean. From this point we can create any number of different versions of the ocean, simulating many atmospheric and weather effects. For our purposes right now, we'll set our scene at midday under a sunny sky. Create a new comp and call it "ocean_sunny". Drag "ocean_base" into this comp. Now create a new solid and line up its top edge so it exactly covers the water texture.
This layer will be our color base, and ocean_base will provide the texture. Create a Ramp and drag the End of Ramp point up to the bottom of the visible frame. Set the end color to a dark, deep blue with a little bit of green. The start color should be a slightly lighter variation. I recommend searching for a good reference photo and taking the color values directly from there.
Now place this layer underneath ocean_base and set ocean_base's transfer mode to Multiply and opacity to 50%.
Duplicate the ocean_base layer and apply Levels roughly to this effect:
Gaussian blur this layer about 2 pixels and drop its opacity to 25%.
Now is a good time to bring in a photo for the sky so you can better determine what the ocean should look like. Mayang's Free Textures has some very nice high-resolution ones, as you can see below. Place the photo as the lowest layer and scale to fit.
We're getting there, but the ocean still looks flat and unconvincing. Let's add some whitecaps for added realism. Duplicate the ocean_base layer again and bring it to the top. Set its transfer mode to Screen. Set Levels to cut out all but the brightest portions. This will take a lot of tweaking, and will vary based on your fractal noise settings. Play with it until you get something you like.
Play the animation to see how things are looking motion-wise. I found that slowing the speed of the whitecaps layer to 50% made for more realistic motion.
You also may want to blur the whitecaps layer slightly. This can be tricky, because if you blur it too much the whitecaps look like reflected sunlight. But it can also add to the illusion of distance. It's up to you.
These whitecaps were good enough for me, although they tend to bunch together with this method and look kind of like floating ice. For a more realistic look, it might be worthwhile to bring in a new fractal noise comp with smaller, more evenly spaced noise. But if you're lazy like me, the haze we're about to add will help distract from it.
Create a new comp called "horizon" and a gray solid. Scale it down vertically. Don't worry about the exact size.
Bring the horizon comp into ocean_sunny, line it up with the horizon line, drop its opacity to around 60%, and blur it about 22 pixels. This will pull the edges in a bit from either side, so scale it up horizontally until it stretches out of frame. Adjust the Hue/Saturation until the haze matches the color of the sky where it meets the ocean.
The horizon line is still a bit too sharp, so duplicate the horizon layer and drop the blur to around 12 pixels.
Now we just add a little noise and play with the levels if necessary, and we've got our ocean! Click the picture below for the final movie as a Quicktime.
For extra realism, I'd recommend cutting out different cloud layers, setting them up in 3D layers, and moving them slowly across the sky (for the above movie I just moved the flat image). Play around - now that you've got your ocean base you can also add sparkles from sunlight much as we added the whitecaps. Adding a new background and tweaking the Levels and saturation can evoke completely different weather. You can also fake camera motion to varying degrees by playing with the noise offset controls in your original fractal noise comp.
P.S. - If you're looking to simulate water up close and you're willing to pay for it, there's a very cool-looking plugin called
Aurora Water that's surprisingly cheap and can create some
very realistic water effects.