19 December 2008

Underwater Scene with 3DS Max and Mental Ray

Step 01

Welcome back to my tutorials. This month we’ll move on an other side of CG, and we’ll try to find a very fast way to create a good underwater scene. So, let’s start with the 3ds max unit setup, we’ll use some physically correct features of Mental ray, so we need it. Set the scale at centimeters, and the assign renderer to Mental Ray.

Step 02

Create a Plane primitive approximately with Lenght = 4000cm and Width = 5300cm, set the Length Segs = 50 and the Width Segs = 50,

Step 03

Now put a Camera in a position similar to the figure, set Lens =43.5mm,

Step 04

Add a Bend modifier to plane just created, we’ll use it to avoid seeing the final part of the mesh, creating something like an underwater canyon, set Angle = 101.5, Bend Axis = X and move the center of the gizmo trying to obtain something similar to my scene,

Step 05

Now add to the plane a Noise modifier and set Scale = 500, Fractal = on, Z Strength = 147cm,

Step 06

Add an other Noise modifier and set Scale = 67.75, Fractal = on and Z Strength = 16.4, so we have the procedural ground terrain ready,

Step 07

Go in the Material Editor, create a Standard material, and set the Diffuse color = 173, 164, 151. Ensure that Mental ray as default rendering engine, to proceed to the next step.

Step 08

Put a Ambient/Reflective Occlusion map in the diffuse channel and set the Bright color like the Diffuse color, set the Max distance = 50cm,

Step 09

Go in the Bump channel and put inside it a Mask map, the 1st map will be a Noise map, with Noise Type = Turbulence, Levels = 6, Size = 1.5,

Step 10

In the mask channel put a Noise map and set Noise Type = Regular, Size = 15,

Step 11

Here you can find the result of the Mask map,

Step 12

Add a Skylight lightsource in the scene and set Multiplier = 0.59, Sky Color = 37,120,144,

<

Step 13

Create a Target Light like in the figure and set Shadows = On, Shadow type = mental ray shadow map, Overshoot = on, mental ray Map Size = 2048, Sample Range = 1cm, Samples = 16,

Step 14

Now go in the Environment and Effects panel and set the Background Color = 7,12,20,

Step 15

Go in the mental ray setting panel and in the Indirect Illumination section set Enable Final Gather = on, Multiplier = 0.5 to make it less powered, FG Precision Preset = Low, Diffuse Bounces = 1,

Step 16

Add an other Target Light as in the figure, set Multiplier = 3.0, Far Use = on, Far Start = 535, Far End = 630, Hotspot = 100, Falloff = 105, and put a Noise map in the Projector Map channel, copy it with drag & drop feature inside an empty slot in the material editor, and set Noise Type = Turbulence, Noise Threshold High = 0.31, Levels = 1.5 and Size = 30, now we have a good base to simulate the caustics created by the sea level over the objects,

<

Step 17

If you try to render the scene you can obtain something similar to this figure, nothing so similar to an underwater environment,

Step 18

Now we need to use a series of tricks to change it, go in the Camera Effects panel in the mental ray settings, set Output shader (Glare) = on, and put a Shader List (Volume) inside the Volume slot, make an instance copy of it in the Material Editor like in the figure and add, (using the Add Shader button), a Mist (Lume) shader and a Beam (Lume) shader in it,

Step 19

Make an istance copy of the Mist shader in an empty slot, we’ll use it to create the fog effect for the underwater look, set Transparency = 0, Solid Color like the environment background color, Density = 0.25, Custom middle = 500cm and Custom End = 1000cm,

Step 20

Create a new Target Light as in the figure and set Color = 109,189,250, Shadows = on, Shadows type = mental ray shadow map, Multiplier = 0.46, Far Use = on, Far Start = 457, Far End = 550, Hotspot = 20, Falloff = 38, we’ll use this light to make some visible light rays coming down from the sea level,

Step 21

Go back in the material editor, make an istance copy of the Beam shader in an empty slot, and set color = 109,189,250, Density = 120, Lights = on and Add the light we created for the caustics and the light just created,

Step 22

Try to make a render test, now we are beginning to obtain something,

Step 23

Create some little boxes and put it in a random position near to the light just created like in the figure, we’ll use it to create the broken visible volumetric rays,

Step 24

In the Environment panel, add a Volume Light in the Atmosphere section, set Density = 3.0, Filter Shadow = high, and pick the light just created, try to render and you’ll see the visible rays,

Step 25

Create a Sphere with Radius = 65, Segments = 100, and move it and scale it as in the figure,

Step 26

Add an Edit Poly modifier to it, go in the polygon selection mode and make a selection like in the figure,

Step 27

Add a Meshsmooth modifier to the selected polygons and set Iterations = 3, Apply to Whole Mesh = off, now we have enough polys to work on it,

Step 28

Add a Poly Select modifier to the Sphere to close the selection, then add a Noise modifier and set Scale = 50, Fractal = on, X strength = 50cm, Y strength = 8.5cm and Z strenght = -4.37cm,

<

Step 29

Apply a Displace modifier and set Strenght = -12, Map = Shrink Wrap, put a Mix map in the Map slot, make an istance copy of it in the material editor, put a Noise map in the Color #1 slot and an other in the Color #2 map, set Mix Amount = 50,

<

Step 30

Go in the Color #1 noise map and set Noise Type = Turbulence, Noise threshold High = 0.665, Noise threshold low = 0.265, Levels = 3, Size = 5,

Step 31

Go in the Color #2 noise map and set Noise Type = Turbulence, Noise threshold High = 0.425, Noise threshold low = 0.335, Levels = 3, Size = 35,

Step 32

Now we can create the shader for this mesh, go in the material editor, and create a standard material, set the Diffuse color = 173, 164, 151, Specular Level = 16, Glossiness =
20, put a Ambient/Reflective Occlusion map in the diffuse color slot and copy in the Bump slot, the same Mask map used for the ground mesh before,

Step 33

Go inside the Ambient Occlusion map, and put a ,Composite map in the Bright color, set Max distance = 50cm,

Step 34

Go inside the Composite map and set the Layer 1 as RGB Tint, (set the color like the diffuse color of the material), add a 2nd layer and put in the map channel a white RGB tint and in the mask channel a Noise map,

Step 35

Here you can see the RGB Tint of the Layer 1,

Step 36

Go in the mask Noise map and set Noise type = Turbulence, High = 0.38, Low = 0.335, Size = 3,

Step 37

Try to make a render,

Step 38

Make a copy of the rock model just created and put it in the same position you can see in the figure and
scale it a little,

Step 39

Try to make a new render test, the look is not bad now,

Step 40

Let’s make the rendering coming more dirty, so go in the Effects panel, and add a Film Grain effect, set
Grain = 0.18,

Step 41

We need to add a depth of field effect also, so select the camera, set Enable = on, click on the Preview button and you’ll see the DOF preview in the viewport like in the
figure,

Step 42

Set Multi-Pass effect = Depth of Field (mental ray), and then set f-Stop = 2.0, try to render it and you’ll notice the DOF fx is visible,

Step 43

You are ready for the final rendering, so in the mental ray anti aliasing section set Minimum = 1, Maximum = 16, Filter type = Gauss,

Step 44

If you’d like to add more realism, create a Particle Cloud emitter like in the figure, set Particle Quantity to Use total and put 35000 particles, set Speed = 2cm, Variation = 50%, Particle Size = 0.5cm Variation = 50%, Particle Type = Constant and assign a completely white material with Self Illumination = 100, we’ll use this tricks to create a very simple plankton in the water,

Step 45

Try to make the final rendering, you should obtain something similar to the figure.

No comments:

Post a Comment

Follow on Buzz