Introduction
In this tutorial you will learn to create a realistic looking stormy ocean. We will also be setting it up to animate so you know how to breathe life into your static scenes. Full credit for this tutorial has to go to TimTamFin and his extraordinary knowledge of all things wet and watery!
As always, if there's anything unclear or confusing, please let us know either by email or in the forum and we'll be happy to help and also ensure the tutorial is made clearer for others.
Let's Begin!
Create a plane in the top viewport:
- Width: 750
- Height: 750
- Length Segs: 50
- Width Segs: 50
- Density: 10.0
This'll be our water surface. If you've done everything correctly, you should have a total faces count of 500,000 - this'll give us a suitable detail level in the final render.
Making Waves
Next open the material editor ('m') and click on the first free material slot. Scroll down and in the diffuse slot add a noise modifier.
Go back up to the top level and drag the noise box over the actual preview window (the first slot you selected). Choose instance (doesn't matter) and you'll see the slot change to a 2D representation.
Click the text box where it says "01 - Default" and rename it to 'small waves'.
Now go down to the noise settings and alter it as follows:
- X Tiling: 2.54
- Y Tiling: 1.27
- Z Tiling: 2.54
- Noise Type: Turbulence
- Size: 70
- Levels: 10
- Click the 'swap' button so the black color is at the bottom.
Next click the top map slot in the noise parameters and add another noise effect to this noise effect!
For this noise map, fill in as follows:
- X Tiling: 2.54
- Y Tiling: 2.54
- Z Tiling: 2.54
- Noise Type: Fractal
- Size: 100
- Levels: 10
- Color #1: click the color selector and choose a mid grey (R157,G157,B157)
Now close the material editor and select our wave object again, click 'modifiers' and add a 'displace' modifier to it.
Right-click on this in the stack and choose 'rename' and set it's name to 'displace-small'.
Set Strength to 7.874 (you can tweak this according to your scene size) and under Map click 'none' and choose your wave material you just made (you'll need to click Browse From: Mtl Editor to see it) - it should be called 'small waves' as you named it earlier.
You should immediately see your scene update in the viewport with some subtle wave effects, but let's render at this point to see a higher resolution version and to make sure we're all at the same place! ![]()
Here's my render (look similar?):
Not bad eh? You can see this displacement layer is adding all the small details of a real wave and will eventually add a lot of realism to our scene.
Incidentally, if you're just looking for a slightly choppy scene, you could skip the Making Bigger Waves section on the next page and end up with something neatly between the ocean waves tutorial and this stormy ocean tutorial.
Making bigger waves
Now we want to follow exactly the same process, but we're going to be adding larger waves to add a stronger roll to the surface. This layer of effect will be what actually adds the big waves to your scene.
Open your material editor again ('m') and drag your map from slot one into the next slot.
You now have two maps and they are identical - so before you do anything else click on the name dropdown and change it from 'Small waves' to 'Large waves'.
In the top noise setting (it should already be visible when you click the large wave material) we need to adjust a few settings to scale up our waves!
- Tiling needs to be set to X:1.0 Y:0.3 Z:1.0
- Size: 150
- Noise Type: Fractal
- Levels: 4.0
- Click the Swap button
Finally let's get rid of that extra sub-noise layer - so just drag the 'none' box up and drop it on the other slot (which contains something like Noise #3).
Now let's apply it to our object.
Close the material editor and add another displace modifier.
- Rename it as before but to 'Displace - Large'
- Click the map slot and select your large waves material as before.
- Tick Luminance Center
At this point, you'll need to tweak according to your scene ratio and your object size.
The two values you'll need to tweak are (a) the noise size in the material editor and (b) the displacement strength.
To give you an idea, my settings worked well at noise size: 250 and displacement strength: 150.
This gave me something like this:
Adding smaller waves
This next step is the first part of material building. We'll use a bump map to add some really small details to the wave object to give us some really intricate details - it'll also be very useful in adding a realistic reflection to light.
So, open the material editor and click the third slot - apply this to your object straight away.
Scroll right down and under the Maps rollout click the bump slot. Click the <none> box and choose Mix.
You'll see there are three slots, and in these we want to add various sizes and shapes of noise maps to add some randomness. The first two are our actual details and the third slot (mix amount) is what'll decide which of the above two to use.Click the first slot and choose a noise map fill in as follows:
- Noise Type: Fractal
- Size: 10.0
- Levels: 10
Click the second slot and choose a noise map fill in as follows:
- Noise Type: Turbulence
- Size: 20.0
- Levels: 10
This'll give us two fairly different styles of detail.
Finally choose the third slot at the mix level and add a noise material with the following settings:
- Noise Type: Fractal
- Size: 150 (you may want to tweak this according to your scene scale)
- Noise threshold high: 0.7
- Noise threshold low: 0.3
If you render, you'll see your object now has some subtle, but very nifty, bump mapping, adding thousands of intricate details to your wave.
Adding materials
Now let's add some colour!
Now I'm going to step you through this so you can understand what's happening and so you'll be able to go back to tweak as your scene requires.
What we want to achieve is a material that'll automatically deal with the wave colour depending on the height of the wave. So if the wave is low, we want a deep ocean colour, if it's high we want a lighter tone with a touch of foam.
To do this we need to first apply a planar UVW map - so click your object and add UVW Mapping to the modifier stack. Then set the Map Channel to 2 and the alignment to Y.
If you now click the Fit button, the gizmo should nicely frame the wave in the front viewport.
Go back to the top level of your material and under diffuse color click the slot and apply a mix material. First click the Mix amount slot and add a gradient map.
In this gradient map set it's Map channel to 2 (to match our UVW map) and set color #1 to white, #2 to black and #3 to black.
Set the Color #2 position to 0.7.
If you render you should find you have only the highest parts of your map visible with a foam effect being applied to them.
Now let's fill the black areas in.
Go back up to your mix map and click the top slot (with none in it) and choose a falloff map.
Fill it in as follows:
- Top colour - dark blue - R0 G43 B57 looked good
- Bottom Colour - light blue - try R169 G188 B191.
If you render you should have something like:
A wet look
Now we want to add a wet look to our water and so we need to deal with the reflection. So go to the top layer again.
Under Shader Basic Parameters at the top, set the material to Anisotropic.
Under Anisotropic Basic Parameters set:
- Specular Level: 69
- Glossiness: 99
- Specular colour to white.
Scroll down and under the Maps rollout add a falloff material to the reflection slot. In this material add a raytrace to the top slot and set the falloff type to fresnel.
Finally set the index of refraction to 1.33
Render and you should have something like:
Not looking too bad? Let's add some environment colour (depending on your scene you may or may not have to do this, but hey no harm in telling you).
Click a free material slot and under the diffuse slot add a gradient map - drag it up and drop it on the material sphere itself (as we did before) so you have a 2d map.
Now enter the following:
- Tick Environ and choose Screen.
Set the three colours to:
- Color #1: R22 G28 B33
- Color #2: R51 G57 B62
- Color #3: R59 G71 B80
At the very top menu of Max choose Rendering > Environment and drag your gradient material into the envrionment map slot.
Now render and you should see a subtle difference in the color of your waves.
Lighting
Now we're going to add some basic lighting - lighting is what'll tranform our scene into something that looks even more nifty.I'll show you the basic setup, however I also want to play extensively at this point. Move the lights around and see how it affects your render. Play with the colour of the lights and the intensity and so on!
Anyway here's the setup from the front viewport:
You'll see I've added two lights a target direct light and an omni light.
Here are the settings I used, but remember to play yourself!
Omni Light:
- Multiplier: 0.1
- Color:R214,G214,B214
Direct Light:
- Multiplier: 0.3
- Color:R214,G214,B214
Under Directional Parameters tweak the hotspot and falloff/field sizes so the light covers an area much bigger than your scene.
Now render your scene - looks awesome!
Add a camera and position it as you desire and hit render. You'll see the water looks great, however the contrast with the background is a little harsh.
So add some fog (click Rendering > Environment, click the Add button under Atmosphere and choose fog).
- Scroll down and set its colour to R57 G65 B7
- Tick exponential and reduce far to 70.0
- Click your camera and tick the show box under environment ranges
- Adjust the far range to the end of your scene.
You should now have something like this:
