home about gallery publications education links contact


..::perfect stormy wave::..

Note from the author: This article was written with 3ds max 3.x in mind. Due to software improvements, bug fixes, user interface amendments and added features, some items listed below may not apply to 3ds max after version 3.x...

Creating effective water scenes is something CG artists strive for, sometimes having to resort to third party plug-ins to generate the desired effect. It can take numerous renders to determine the best surface texture and wave pattern, depending on the ‘weather conditions’. Fortunately, Max has one of the best material editors and surface deformation tools already built in, so in most cases there is no need to purchase additional software to do something that, with a little time and a few extra stress lines on the forehead, it can do on it’s own. Over the next few pages we shall create a large tidal wave (looks slightly familiar?!) using Max’s stock tools, using Particle Systems, Spacewarps, materials and surface deformation. And the best thing is that you can animate the entire wave just by modifying the phase on a few basic settings!

Enlarge Screenshot In the top view, create a Plane Primitive at 0,0,0 , length 500, width 1000 with 100 Length and Width segments. Label this ‘Sea’. Unfortunately, the poly count has to be relatively high due to later deformation and sub-object vertex selection.
Enlarge Screenshot Add a UVW Map modifier to the plane. This is to control the custom gradient we are going to design later on to create a foamy water texture for the crest of the wave. Select sub-object and rotate the Gizmo 90 degrees clockwise along the z-axis whilst still in the top view. Click on the Fit button in the modifier’s rollout.
Enlarge Screenshot Add an FFD(box) Modifier to the Plane, click on the ‘Set Number of Points’ button and set the FFD dimensions to 10, 4 and 4 in the Length, Width and Height spinners respectively (Width and Height being default at 4). This should give us ample Control Points to deform the plane into a rough shape that resembles a wave.
Enlarge Screenshot To amend the shape of the plane, click on the Sub-Object button in the FFD modifier and in the left Viewport, amend the Control points (group select each one to ensure you’ve also selected those behind it) so they resemble the rough shape shown.
Enlarge Screenshot We will now create our initial basic material. In the Material Editor, select a new material slot and label it ‘Sea’. Check off the Self-Illumination and enter 20 in the spinner, enter 33 for Glossiness and amend the Specular colour to RGB 255,255,255 (white). Check on Reflection Dimming and enter a Dim Level of 1. Assign the material to the Sea Plane.
Enlarge Screenshot In the Diffuse slot, add a Gradient Ramp map, and label it ‘Sea Surface’. Add keys in the gradient and amend their colours to either white, RGB 37,37,37 (dark grey) or RGB 218,218,222 (for the base of the wave) so it represents the gradient shown. Increase the Noise Amount to 0.1, and change the type to Turbulence.
Enlarge Screenshot Check on the ‘Show Map in Viewport’ button and whilst viewing the plane in the Perspective Viewport, amend the position of the gradient’s keys so that the solid white band is at the top of the wave and the gradient build up is at the base of it.
Enlarge Screenshot Back at the top of the Material’s stack, add another Gradient Ramp map in the Opacity Slot. Label this ‘Foam Opacity’. Check off Mirror and Tile radio icons and increase the Map Channel spinner value to 2. Create a black and white gradient like the one shown. This is to feather off the crest of the wave so it’s not so sharp.
Enlarge Screenshot Add another UVW Map to the plane, click on Sub-Object and rotate the Gizmo in the Perspective Viewport along the x-axis so it faces the wave. Click on the Fit button and amend it’s Map Channel spinner value to 2.
Enlarge Screenshot We will now add a general sea-motion to the plane. Add a Noise modifier and amend the Scale value to 50, check on Fractal and increase the Z strength to 20. Due to Max’s stack hierarchy, the mapping will now be distorted with the shape of the wave.
Enlarge Screenshot This global noise is all well and good for the top of the wave, but we need the water at the bottom of the wave to be a little choppier. Add a Volume Select Modifier, check on Vertex selection, check on Soft-Selection and increase the Falloff spinner to 100.
Enlarge Screenshot Click on Sub-Object and in the Left Viewport, move the Volume Select Gizmo so that it intersects the ‘wave’ halfway down, and so the vertex falloff colours turn blue before the peak of the wave, as shown.
Enlarge Screenshot Add an additional Noise Modifier. This will now only act on the selected vertices, and it’s strength will fade off up to the crest of the wave, exactly as we have designed it using Soft-Selection Falloff. Leave all of the Noise Modifier’s settings as default, except for the Z Strength spinner; increase this to 50.
Enlarge Screenshot As the wave will still maintain the same specular value where the ‘Foam Opacity’ gradient masks part of it out, instance copy this into the Specular Level slot in the sea’s material.
Enlarge Screenshot Add a Noise map to the Bump slot and label this ‘Sea Bump’. Amend it to Turbulence with 10 Levels and a Size of 25. This will break up the surface of the wave and add the impression of ripples.
Enlarge Screenshot Finally, we need to add a reflection to the surface. Add a Mask map to the Reflection slot and label it ‘Sea Reflection’. Add a Raytrace map in the Map slot and a Falloff in the Mask slot. In the Falloff map, click on the white slot, check on Browse from: Scene and select the ‘Foam Opacity’ gradient. Select Instance when prompted. Back at the top of the material, set the Reflection spinner value to 80.
Enlarge Screenshot Next, create the sky by creating a large Geosphere Primitive at 0,0,0 that encompasses the wave twofold. Label this ‘Sky’. Check on hemisphere and move it so the bottom of the sky is below the lowest wave. Add a Normal modifier and check on Flip Normals. Scale down the Geosphere along the z-axis by about 20% to flatten it out a bit.
Enlarge Screenshot Add a UVW Map modifier to the sky. Select a new material and label this ‘Sky’. Check off Self-Illumination and increase it’s spinner to 100. Create a new bitmap map in the Diffuse slot and select the Sky.jpg that is in Max’s ‘Skies’ map folder. Assign the material to the ‘Sky’ Geosphere.
Enlarge Screenshot The sky is a little on the bright side for this scene (unless you want it to be in pleasant weather!), so expand the sky bitmap’s Output rollout and darken the bitmap down a bit by amending the RGB Level spinner to 0.23.
Enlarge Screenshot Select the Sea Plane and add another Volume Select modifier to the top of the stack. Select Vertex as the Stack Selection Level and move the Gizmo in the Left Viewport as shown so it just intersects the peak of the wave, highlighting a few vertices where the gradient’s ‘foam’ is shown in the Perspective Viewport.
Enlarge Screenshot Create a PArray particle system and label it ‘Spray’. Click on the Pick Object button and select the Sea Plane. Under Particle Formation, check At All Vertices and check on Use Selected SubObjects. Under Particle Generation, set Use Rate to 50, Speed 0, Emit Start at –100 and Emit Stop and Display Until to 100. Set Life to 20 and Variation to 10.
Enlarge Screenshot Under Particle Size, set the Size spinner to 10 with 10 Variation and set the Grow For spinner to 30 with the Fade For spinner at 0. Under the Particle Type rollout, set the Standard Particle type to Facing.
Enlarge Screenshot Create a new material and label it ‘Particle Spray’. Assign it to the ‘Spray’ particle system. Check on Face Map and check off Self-Illumination. Set the Ambient, Diffuse and Specular colours to white. In the Opacity slot, create a new Mask map and label it ‘Particle Foam’.
Enlarge Screenshot Add a Particle Age map to the ‘Particle Foam’ mask’s Map slot and swap the black and white. In the mask’s Mask slot, add a new Gradient map. Amend the colours so the order is black, mid grey (RGB 129,129,129), light mid grey (RGB 156,156,156). Set the gradient type to radial. Instance copy the ‘Particle Foam’ mask into the Self-Illumination and Bump slots of the material.
Enlarge Screenshot Create a Wind Spacewarp and rotate it in the direction of the wave, pointing down slightly. Edit the Strength to 0.05 and the Turbulence to 0.25. Bind the particle system to the Spacewarp to displace the particles. Select the particle system, right click it and edit it’s properties to turn cast and receive shadows off.
Enlarge Screenshot Create omni lights with RGB 91,91,91, a multiplier of 0.1 with shadows casting on (or off if placed under the Sea Plane), facing around the front of the wave to slightly illuminate the scene. Also, create a single omni with an RGB value of 179,200,200 with a multiplier of 1 and shadows on to act as the diffused sun. You may also want to add a touch of motion blur to blend the particles together.
Enlarge Screenshot You may want to play with the particle settings and / or exclude them from being raytraced in the sea’s reflection to bring render times down. You could even replace the raytraced reflection altogether with a bitmap reflection if needs be. To complete the scene, I’ve added a quick fishing boat model, a material blend for the wake, an additional particle system and a Render effect or two to bring out the contrast and to slightly tint the scene.
Download the max file! Download the max file!
View the animation! The resulting rendered animation.

Initially published: 3D World magazine, Issue 9, February 2001.

Copyright Pete Draper, February 2001. Reproduction without permission prohibited.

www.xenomorphic.co.uk