Softimage XSI 3.01

"How to create perfect water"

(c) by Garry Runke 2003

www.garryrunke.com

This tutorial is about how you give your water the look you want and renders way faster than the XSI ocean shader.

Hope you enjoy creating your own ocean. If you have further questions or anything else, feel free to ask.

PART I – know the rules

As you are about to read this tutorial on how to create really cool water, you probably want to learn a bit about water behaviour first.

Here are several pics of oceans. I refer here mainly to oceans, but this tutorial can also be used to create lakes or anything else.


What do we see on the pics? Water reflects, yeah well, I guess you knew that .. but look at the next pic.


I scribbled you the typical layout of an ocean water over it. You can see huge waves and on the huge waves, a couple of small waves.

That's the whole trick. That was easy wasn't it? It's the ratio of the huge waves to the small waves that makes an ocean, a lake, a stormy day, a sunny day, whatever.

A rough windy ocean would have 1 huge wave and at least 8 small waves on it.

A lake would have 1 huge wave on 1 small wave, or no huge waves at all, sometimes not even small waves, then it's a mountain lake. Or a place where no wind blows.

Water is also a little bit transparent. But that depends on many things. Normally you don't have to make this shader transparent. Only in close-ups. But this shader is nothing for close-ups. You would also have the problems of wakes. But that's a way other story.

Now you can look at some pics of lakes, normally very reflective.



PART II – basic ocean

Ok, enough sweet talk. Let's start XSI. Create a new scene.

File -> New Scene

Now we need a standard grid to be our water.

Get -> Primitive -> Polygon Mesh -> Grid

Leave all attributes and close the property window.



If the grid is no longer selected, now would be a good time to do so.

Give the grid a phong material.

Material -> Phong


Again there is no need to adjust anything. Just close the property window.

Let's add a cool shining sun. We'll use a point light for that.

Get -> Light -> Point Light


Move the point light to the following position. x=0, y=10, z=-3.


Select the grid. Push 7 to open the Render Tree window.

Now we have to create several nodes.

Nodes -> Mixers -> Mix 2 Colors

Nodes -> Mixers -> Mix 2 Colors

Nodes -> Texture -> Fractal .. rename that to „stretched waves“

To rename something, select the node and push F2.

You can also middle click on the NODES pulldown icon. Your last action "create a fractal node" will be repeated without opening the dropdown menu. I love XSI.

Nodes -> Texture -> Fractal .. rename to „huge waves“

Nodes -> Texture -> Fractal .. rename to „small waves“

Nodes -> Texture -> Fractal .. rename to „water“


Open a render region around the grid in the perspective view. (shortcut: q)

Push 3 to open the render options tab.

Deactivate Render -> Region -> Auto Refresh (for performance)


From now on you have to click the Refresh button to refresh the render region.

Adjust the render quality to perfect.



Now drag and drop the red dot from Mix_2colors to Phong. Connect it with the bump parameter. A Color2vector will automatically be created.

Drag and drop the red dot from huge_waves to Mix_2colors. Connect it with the base_color.

Drag and drop the red dot from small_waves to Mix_2colors. Connect it with the color1 parameter.

Both waves will now blended with 50%.



Double click the huge_waves. In the property window select Texture and define a New Texture Space. New -> Planar XZ.

That creates a simple planar mapping.

Now enable Bump Mapping and set the Factor to 10.


Set under Advanced the Maximum UV Remap values to 5,5,5.



Double click on small_waves and select Texture_Projection (Planar XZ) in the texture pulldown menu.


Enable Bump Mapping and set the factor to 4.

Set under Advanced the Maximum UV Remap values to 30,30,30.

Time for a little REFRESH.

You might want to double click the phong and select another diffuse color and change the Specular Decay to 300.



Now we allready have a great ocean shader. It can be used for a lot of ocean types and lakes.

Part III – enhance it baby!

So far so good, but you are here to get it all. So let's improve our weird node system.

Connect the red dot from stretched_waves to Color2vector. Connect it with the input.

This step is not really necessary. But now you can see how the fractal will look like and you can give it the correct texture space. Click refresh to see what I mean.

Double click the stretched_waves node and give it the only available Texture Space (Texture_Projection (Planar XZ)). Enable Bump Mapping. Give it Factor 4.

Set the UV Remap Maximum to 2,20,0.

REFRESH. Now you have another nice ocean type.



We need something that controls if we see these "normal" waves or the "stretched" ones. Therefore we have to adjust the water node.

Now connect the water with the Color2vector. Connect it with the input. That will kill the stretched_waves connection.

Double click the water node. Give it the texture space. Set the UVRemap Max to 3,3,3.

Change to the Fractal tab and set the Level Decay to 5. This will increase the contrast of the fractal. Umpf .. well .. that's something good, try other values, if you like.


Now that we set all fractals we can start a connection orgy.

Red dot from Mix_2colors1 to Color2vector. Connect to input.

Stretched_waves to Mix_2colors1 parameter base_color.

Mix_2colors to Mix_2colors1 parameter color1.

Water to Mix_2colors1 parameter weight1.

REFRESH. We could stop here but we are going for gold.



Part IV – Go for gold

Red dot from water to Material. Parameter Displacement. (Make scary sound, when doing so. We need atmosphere.)

Now we have a displacement. But it's too strong. Here is our adjustment node.

Nodes -> Image Processing -> Intensity

Plug it between the water node and the Color2scalar that has been automatically created. 

Double click the Intensity node and set it to 0,2.

The render tree should look like that:


That's it for the render tree. You can close it.

Select the grid.

Click on Selection. Choose Geometry Approximation. Make it local. Select the Displacement tab on the new window.


Change the Refinement Settings to 1. The higher the more polygons are created when rendered, the smoother it looks, the longer it renders. 2 is a good setting for final rendering.


REFRESH


Now we have a pretty nice water. The important thing is you hopefully understood what you were doing and are now able to enhance the shader and fit it to your needs.

At least you can adjust your water simply by playing with the UV Remap Maximum values, the higher, the more waves are created.

The water node is our "blending" control. It blends the huge and small waves with the stretched waves.

You can duplicate the water node and attach it to the diffuse of the phong. Disable bump mapping and change the colors. Adds a lot of depth.

You could also animate the time attribute in the fractals, to have an animated ocean :-). But remember, XSI will create a spline curve so check the animation editor for a linear curve.

Now it's up to you what you make of it. Go through the tutorial and figure out what you did and what those fractals, do.

No more water problems around your dektop.

Except fluids, water drops, wakes, spray etc. But that's another story for someone else to tell.

Thanks for reading.

FINISHED XSI 3.01 SCENE FILE zipped, 48 kb

FINISHED WATER ANIMATION avi, 215 kb