Tutorial-LumeWater

The LumeWater set is made up of four individual shaders: Ocean, WaterSurface, Submerge, and Wet. This tutorial will show you a few quick examples of how to use each one.

Part I: Making Waves

Part I of this tutorial will show you how to create a simple ocean, complete with animating waves. Go ahead and open up a new scene, and we'll get started -

Set up the objects

Make a grid. This will be the surface of your water.

Choose Get -> Primitive -> Grid. In the grid dialogue box, make the cell sizes 2500, and the cell counts 4. (It doesn't matter what type of object you make the grid, so let's just make it polygonal)

Get a sky and a few wood posts. We made these for you.

Choose Get -> Element. In the LumeTutorials MODELS chapter, get the model called "Sky." You'll see that it's a really big dome with a sky texture, and a constant material to make it bright.

Again, choose Get -> Element. This time from the LumeTutorials MODELS chapter, get the model called, you guessed it, "WoodPosts." These posts will help us see the neat things that LumeWater can do.

Set the camera. To make sure we're all looking at the same thing.

Translate your camera to x:0, y:10, z:25. Keep the camera interest at the origin, x:0, y:0, z:0.

Choose Camera -> Settings. Set the Camera lens to Custom Angle, 50.0 degrees.

Preview! Let's see what we've got so far.

Choose Preview -> All. Remember these are mental ray shaders, so make sure that in your Preview -> Setup you've got the preview renderer set to "mental ray."

Doesn't look like much, does it? That's because we haven't actually attached any shaders yet. Now for the fun part.

Add the shaders.

Set the water's material. We're just setting the regular old material parameters.

Select your water grid. (Be careful that you select the grid and not the sky.) Choose Material. In the Material dialogue box, set both the reflectivity and transparency to 1.0. Click OK to exit the dialogue box.

Preview!

Remember to Preview -> All so that we can see the water's interaction with other objects in the scene.

NOTE: You may notice that Previewing in this scene is actually slower than Rendering. This is because during previews, Softimage forces the maximum depth of the BSP acceleration to 25, when for a scene of this scale a max depth setting of 36 or higher would speed the renderings significantly. If you'd like to Render using these settings, rather than Preview, be our guests. (You can find the Acceleration Method settings in the mental ray Options dialogue box, which you get to by clicking the Options button in the Render dialogue box.)

This water doesn't look like much...in fact it's completely transparent! Now for the shaders -

Add the Submerge shader. This will add depth fading to the water.

With the water grid still selected, go back to the Material Editor. Click on the Volume Shader check box; then go to the LumeTools database, and choose Submerge.

Still in the Material dialogue box, click on Submerge to highlight it, then click the Edit button. In the Submerge dialogue box, change the Density to 8.0 and the Vertical Gradation to 3.0. Also, change the Color settings to R: 0.0, G: 0.10, B: 0.20. Then click OK to exit the Submerge, and click OK again to exit the Material Editor.

Preview!

Notice that the water has now taken on the color that we set in Submerge. Also notice the depth fading of the water around the base of the posts, along with the subtle shift of the water's color off in the distance, as the angle of our view into the water changes.

NOTE: You may see some banding in the water at this point: don't worry, it will go away as we continue. If you ever find that it does become a problem, however, simply render with `dithering' turned on which can be found in the Render dialogue box.

Continuing -

Add the WaterSurface shader. This will add realistic, physics-modeled light-interaction properties.

Go back to Material. This time click on the Material Shader check box; then go to the LumeTools database, and choose WaterSurface.

Click on WaterSurface to highlight it, then click the Edit button. In the WaterSurface dialogue box, you'll see the Index of Refraction is set to 1.33, and that we're "looking into" the water. That's what we want, so go ahead and click OK. Click OK again to go back to your scene.

Preview!

It's beginning to look like a bit better; notice the way that the amount of reflectance/transmission changes according to the angle at which we are looking into the water. But of course no ocean is complete without waves -

Add the Ocean shader. This is the shader that makes waves.

This time choose Texture -> 2D Local. In the lower left side of the 2D Texture dialogue box, click on the Shader check box; then go to the LumeTools database, and choose Ocean.

Click the edit button to go to the Ocean dialogue box; then, in the Wave Size box change the Smallest to 0.10, and the Number between to 6. Set the Steepness to 1.5. Click OK to accept your changes.

Get a `stand in' picture. While still in the 2D Texture dialogue box, go to select a .pic file by clicking on the Select button of the Picture Filename box; then go to the LumeTutorials database, and choose the .pic called "StandIn."Click OK to go back to your scene.

NOTE: This last step may seem odd, and in fact it is a bit odd, but due to the way Softimage handles texture shaders we've gotta do this. Any .pic file will serve the purpose here as an invisible place holder, but since SIoftimage will actually load the .pic, you might as well make it a very small one.

Preview! Let's see what we've done.

Now that should look like water and you should notice very little slow down in your rendering time. The waves, particularly the distant ones, will look even nicer if you render them with antialiasing, so you might want to save your scene here and go ahead and try a full size, antialiased rendering. And if you've got even more time, you might want to try an animation-

Create a looping wave animation. It's simple, using the Ocean shader.

Go to the Ocean shader dialogue box; click on the Loop Animation check box. Keep the frames set to 50, and the rest of the default settings the same. Go back to your scene.

Render looping animation.

Render 50 frames. That's it!

When your animation is done you'll see that the water loops in a 50 frame cycle. Feel free to experiment with all of the settings that's what they're there for! Remember to refer back to the Reference section of the manual to learn more about these shaders.

If you're ready to get wet, save your scene and let's go to part II of the LumeWater tutorial...Part II: Getting Wet

Part II of this tutorial will teach you how to make objects `wet,' as well as how to create an underwater look.

Making objects wet

Preview! Or just look at the latest rendering from the previous section.

Notice that the sections of the posts that are underwater still have that dry, dusty texture on it, which doesn't look too good. Let's try and substitute a different texture, wherever the posts are underwater...

Add second texture.

With your right mouse button, select the entire Woodposts hierarchy.

Go to Texture -> 2D Local. Click the Next button, so that we can add a second texture to our posts. Then click the Select button of the 2D Texture box, go to the LumeTutorials database, and choose "WetWood" as your texture. This new texture is identical to the first, except we have substituted a slightly darker, wetter looking .pic file.

Add the Wet shader. In order to indicate which texture will be the `wet' one.

With the new texture still selected, go to the lower left side of the 2D Texture dialogue box, click on the Shader check box; then go to the LumeTools database, and choose Wet.

Now go to the right side of the 2D Texture dialogue box, and change the Blending setting to "Alpha Channel Mask."

Check the WaterSurface shader. We're checking to see that the water grid knows to make the objects that are underneath it `wet.'

Select the water grid. Choose Material. Highlight the WaterSurface shader and click edit.

Make sure that the Stain Underneath box is checked. Click OK, then OK again to go back to your scene.

Preview!

Now you'll see that the sections of the posts that are under the water surface have the second texture on it the one we designated as `wet.' You'll find that this feature can be useful in any number of circumstances where you would want to swap textures; for further info check out the reference section.

OK, now it's time for us to take the plunge

Camera underwater

Place the camera underwater.

Translate the camera position to x: 0.0, y: -4.0, z: 25.0

Now that we're placing the camera in the water, we'll need to reverse most of the shaders that we've set so far...

Remove the Submerge shader from the water surface.

Select your water grid.

Go to Material; Click on the Volume Shader check box to deactivate the Submerge shader. You might also want to delete the word `submerge' from the dialogue box, so that it's clear that the shader is no longer active.

NOTE: If perhaps you're wondering why we've removed Submerge from the water surface, here's the answer: Since we are now in the water, when we look through the water surface we will be looking into the air, and thus do not want Submerge to further effect the light rays which are above the water surface. Instead, we want all the light rays that are on our side of the surface of the water, in other words all of the light rays that are `wet,' to be effected by our shader, which we will do in the next two steps:

Add the Submerge shader as an atmosphere.

From the Texture module, choose Atmosphere -> Depth-Fading. First click on the Depth Fading check box to turn this function on, then click on the "Shader" check box to pick a shader; go to the LumeTools database and choose Submerge.

Still in the Atmosphere dialogue box, click on Submerge to highlight it, then click the Edit button. In the Submerge dialogue box, change the Density to 1.5 and the Vertical Gradation to 3.0. Click OK to exit Submerge, and then click OK again to return to your scene.

Edit the WaterSurface shader. We need to tell it that we're underwater now. Make sure that your water grid is still selected.

Go back to Material; then highlight the WaterSurface shader and click edit. In the WaterSurface dialogue box change the Surface setting to "looking out of water." Click OK to accept the change, and then OK again to go back to your scene.

Swap `wet' textures. Since we're underwater now, the texture that we need to see through the surface of the water is in fact the dry, dusty-looking one.

With your right mouse button, select the entire Woodposts hierarchy.

Go to Texture -> 2D Local. Go to the dry texture, and click the Delete button to delete it. Then, with the the `wet' texture showing, change its blending back to "Without Mask." Deactivate the Wet shader by clicking the Shader check box, and deleting the text.

Click the Next button, so that we can once again add the dry texture, but this time place it on top of the wet one. Click the Select button of the 2D Texture box, go to the LumeTutorials database, and choose "DryWood."

Still on the new `dry' texture, change its blending to "Alpha Channel Mask," and attach the wet shader to this one instead, by clicking on the "Shader" check box, going to the LumeTools database, and choosing Wet.

Preview!

Notice the vertical light fall off as the water gets deeper. If you point the camera up and render you will see patches of sky, as well as the dry tops of the wood posts, refracted through the water...you might also want to shrink the size of the smallest waves, to break up the surface even further.

Before we finish we'll show you one more aspect of LumeWater...

Making Bubbles

Get bubbles. We made these for you.

Make sure the camera is still positioned to x: 0.0, y: -4.0, z: 25.0, with the interest at x: 0.0, y: 0.0, z: 0.0

Choose Get -> Element. In the LumeTutorials MODELS chapter, get the model called "Bubbles." You'll see that they're just a bunch of simple spheres.

Add the WaterSurface shader. Since that's what bubbles are spherical water surfaces, enclosing air.

With the right mouse button, select the entire Bubbles hierarchy.

Go to Material. Set both the Reflectivity and Transparency to 1.0. Then click on the "Material Shader" check box; go to the LumeTools database, and choose WaterSurface.

Click on WaterSurface to highlight it, then click the Edit button. In the WaterSurface dialogue box, change the Surface setting to "looking out of water," since that's what we're doing looking out of the water, into a pocket of air. Click OK to accept the changes, then Click OK again to go back to your scene.

Preview!

Bubbles! Notice the refraction and highlights on each. Pretty.

That's it for the LumeWater tutorial. Remember to check out the Reference section for more information on all of the shaders.