Get Our Free Ebook
Beginners Guide to HTML

  Tutorials 3D Graphics Tutorials Tutorial: Procedural Sea with 3D Studio Max

Tutorial: Procedural Sea with 3D Studio Max

graffititools Tutorials Sep 15, 2010

Step 01

Welcome back to everyone. We are back again for a new tutorial and this time we'll talk about procedural shading used to create in a very fast way a CG Sea. Let's start creating a PLANE primitive with Lenght = 25m, Width = 15m like in the figure,

image 1
Step 02Change the Lenght and Width segments to 200 to obtain a more detailed mesh,

image 2Step 03

Create a camera as you can see in the figure and set the Lens = 43.45mm, activate the "Show" selector in the "Environment Ranges" and set Near Range = 2.26m and Far Range = 9.90m so later we'll work with it to setup the fog,

image 3Step 04

Now add a GRADIENT RAMP map as Environment Map in the "Environment and Effects" panel and try to set it in a similar way as we done in the figure, we'll
use this map to simulate the sky, remember to set W Angle rotation at -90.0 on the map,

image 4Step 05

Add a SUNLIGHT system and try to place it as in the figure, set the Shadows as "Ray Traced", the Multiplier = 1.63, the Color = 255,247,225, with this LIGHT we'll
simulate the sun illumination,

image 5Step 06

Place a TEAPOT primitive as in the figure and set the Radius = 0,23 and the Segments = 12, we'll use it to check the reflection and refraction quality,

image 6Step 07

Add a SHELL modifier to the Teapot to eliminate the face normal issue of the interior, and set Inner Amount = 0.0018 and Outer Amout = 0,

image 7Step 08

Add a NOISE modifier to the plane and set the Scale = 20.152, Z Strenght = 0.038 and activate the Fractal checker, with this modifier we'll simulate the main swell layer as in
the figure,

image 8Step 09

Duplicate the camera and zoom back with the new one to obtain a new point of view as in the figure,

image 9Step 10

Add a FOG athmospheric effect and set Far % = 50, turn off the Exponential checker and set the Fog color =

image 10Step 11

Now we can start working on the sea shader. Create a Standard Material, name it "Sea shader", set the Diffuse Color = 4,9,13, Specular Level = 95 and Glossiness =

image 11Step 12

Try to render a test, and you should obtain something similar to the figure,

image 12Step 13

Add a FALLOFF map in the "Reflection" slot and set Falloff Type = Fresnel, Black amount = 8, White amount = 68 to control the amount of reflection on the top zone of the swell and on the base of the sea, Index of Refraction = 1.75, try to modify the Mix Curve as in the figure to obtain the best result,

image 13Step 14

Add a RAYTRACE map into the two color slot on the Falloff map we just created, so we'll have real reflection of the environment and the entire scene, you can see the
test render in the figure,

image 14Step 15

Add a WAVE space warp and try to move it as in the figure so we can create a bigger swell layer over the sea, set the Amplitude 1 = 0.038, Amplitude 2 = 0.037 and Wave Lenght
= 2.0,

image 15Step 16

Link the Wave space warp just created to the plane mesh using the "Bind to Space Warp" feature,

image 16Step 17

Try to make a test render,

image 17Step 18

Change the default rendering engine to Mental Ray, and create a Skylight with Multiplier = 0.65 and Sky color set to 203,221,255,

image 18Step 19

In the "Indirect Illumination" panel that you can find in the mental ray renderer setup, please set "ON" the "Enable Final Gather" checker and choose the "Draft" preset, set Diffuse Bounces = 1,

image 19Step 20

Try to make a rendering test,

image 20Step 21

Go to the "Sea shader" we created before and add a "Refract (Base)" map in the "Refraction" slot, set Input = 0.101, 0.164, 0.219,

image 21Step 22

Now set Refraction = 0.513, 0.525, 0.533, in the figure you can see also the refraction in action,

image 22Step 23

Add a MASK map in the Bump slot, and set Amount = 20,

image 23Step 24

Enter in the Mask map just added. Add a NOISE map in the map slot and set Noise Type = Fractal, Size = 8.0, High = 0.855, Low = 0.185, Levels = 7.0, with this map we'll add a
new level of little swell over the sea using only the material,

image 24Step 25

Try to make a render, you can see the noise map in action all over the sea,

image 25Step 26

Add a GRADIENT MAP in the Mask added before to control the bump slot. We'll use it to control the visibility of the Noise map that generates the little swell layer just added. Set the W Angle rotation = 90.0, and try to setup the gradient as you can see in the figure, where the gradient is white the swell are visibile and at distance it disappear because the
gradient fade to black,

image 26Step 27

Try to make a render test, you will notice the difference,

image 27Step 28

Now you are ready for the final rendering. Please go to the rendering parameters and set Filter Type = Gauss, Minimum Samples per Pixel = 4, Maximum Samples per Pixel = 64, and Bucket Width = 128,

image 28 Step 29

Try to make a render from the 1st camera,

image 29 Step 30

And now using the 2nd camera. As you can see this is a very fast way to setup a still sea, using the parameters of the modifiers applied and the sea shader, it will be possible to animate it in a procedural way, it will be interesting to create a custom panel to control it over the time also. Please try to change the illumination and shading setup to find different results and understand better how you can use it in real productions.

Tutorial: Procedural Sea with 3D Studio Max


Dharaa VShah

I'm a Web-Graphic Designer, Freelance and Webmaster, blogger and more. I like to push the boundaries. I love creating unique, clean, usable design for the web and other digital sources.

subscribe to newsletter