The Water Engine
--------------------------------------------------------------------------------
 
Tomasz 'Millennium' Jachimczak
tomasz@planetunreal.com

This tutorial will explain how to use some of the features of the "water engine" and show you how to create animated water textures in making a water texture that is animated on a water texture that you either make in a third party software oackage, or the simple editoing of a texture that come with Unrealed.

For once I am writing this one at home, so I will be attaching a few good images with it,and I actually (wow) have the editor here so I can call up anything I like. I will start off in a quick little paragraph about how to make this base image. Ok, I am using a copy of PSP5 (Paint Shop Pro 5) as everyone can download a trial version and do exactly as I have done here. I have made a basic empty image 512x512 and used the spray can tool to make a base background a nice shade of blue. When I was creating this base color, I used the "ocean" setting to make it a little more "realistic" and less mundane. Then I made sure that the image was single layered, and had no transpericy and made a selection from the middle of it that was about 3/4 of the image size, and perfectly square. Then from the selections menu, I chose "Convert to seamless pattern". When the new image showed up, I made sure that the image was 256x256 in size,and cut the colors back to 256. Having done that, I saved the new selection as a .pcx file (Ver 5) and closed PSP.

Ok, that is one part out of the way. Into Ued :) I went to the "browse bar" and opened textures. (Ie chose "textures" from the drop down list, that contains "Textures, Classes, SoundFX, Music" ). Then opening the "import" function right at the bottom of the tool bar, I found the file, and imported into Unrealed.
 The import button is shaded a light green here, to make sure that you are using the right one. Ok, in the next window, I have selected the right file (remember the one that you just made in PSP?) and in the next window I made the following selections.

Ok here is what all the bits mean. The Name is what the texture will be called as a texture. The Group is what part of a package the texture will be situated in. You know like you can open up the "Ancient.utx" file, and it is split up into various catergories, like "Floor, Roof, Wall" etc. Well, that is what the group section decides. Import the image into a Group called "Still".The Packacge is what the actual name of the package when it has loaded. Enter "Water_tute" for this texture, so that everything will be the same for easy reference in this tutorial.


Do not change any of the other settings there, as they will not be required for this paricular texture. Ok, assuming that everything went according to plan there, you should now see a nice little thumbnail of the texture that you made in PSP and it should be in a package called "Water_Tute" in the group "Still".
 This will be the still version of your water. In every map that you do, try to include a still part of the water, so that it allows the player to seethe difference between the still and moving water. I mean a puddle would not be aminated (Unless you have stuff drippinginto it Hehee).

Cool easy so far innit? Hehe, that is the hard part...

Ok, now click on the "New" button (Right near the import button in the textures browser) and in the window that pops up, choose the following selections.
Name = Anim_1 : This is what the texture will be called, so it is a good idea to put the "anim" somewhere in the name for easy refernce later on...
Package = Water_tute : This should already be set, but just in case if it is something else, callit the same as you did earlier.
Group = Aminated : This should default to "Still" but change it to animated so that you can locate the texture easier later on. It is a good idea to store different textures in different groups (Hopefull have then arranged into some resemblence of order as well).
Class = Wet Texture : This is where you will find thetools needed to create the particular texture that you want. It is a dropdown menu. Select the "Wet Texture" and leave the Size at 256x256 (It should be at that size to begin with). Click on the "Create the Texture Button" and start to make the fun stuff.


You should see a nice large BLACK square and a Properties box. In the properties box, drop the "Water Paint" sub-menu (Click on the little + sign next to the name) and select "Source Texture" from it. Having your new package open, select the "water" texture (You know the one that you just made in PSP) and pressthe little "use"button in the SourceTexture menu-line.


Your large "black box" should now have the image of the texture that you just did in PSP in it, and you can finally start on the fun stuff.

Where you see "Drop Type" in the WaterPaint sub-menu, click on DROP_PhaseSpot and you will see a huge drop down menu.
These are the cool water and wave effects that you can use in the texture to make it look like real water. Here is a quick list of what they do :


Drop Fixed Depth - This will make a little "dint" in the water that does not go up ordown,but just stays at the level that you set it to. I findthisone quite useless. 

Drop Phase Spot - This will make a little drop in the water,that i just like having a drop of water falling into one part of thetexture all the time. It will also keep a nice little circular wave being formed around the drop center. 

Drop Shallow Spot - This willbe just like the "Drop Phase Spot" although itis much smaller. 

Drop Half Ampl - This is once again similar to the "Drop Phase Spot" but it uses exactly half the Amplitude that you have set (Explained later). The size is very close to the "Drop Phase Spot" 

Drop Random Mover - This will make a little pattern ofwaves dance all over your image. It follows no pattern, and actuallylooks quite like a little water bug running about on the surface of the water. Very cool and useful. 

Drop Fixed Random Spot - With that name, you ight expact it to move about the texture, but it actually stay almost in the one place, only moving a little bit to the sides, so that it willmake the waves collide with each other, thus making them look much more realistic, then if it were just in the exact same place each time. 

Drop Whirly Thing - Damn, I think that name is soooo creative.... ;) Anyways this setting will create a little "drop" of water that moves about in a small circle (not a regular one though :) and looks very much like a little vug once again that travels about on the water. 

Drop Big Whirly - Same as above, but bigger andmakes bigger waves. 

Drop Horizontal Line - Make a line that will go down into the texture. Ifyou place just one of these, it will most likely look like it dissapears soon, but if you place a LOT of them all over the texture, then you will see that it makes the texture look like it is all moving. 

Drop Vertical, Diagonal 1 & 2 Line - Same as above, but the wave is in a different direction. 

Drop Horizontal Osc - This will make a line wave (Like the above) but will actually keep the wave moving up and down allthetime, sothat it will akegreat looking waves on your texture. Very useful if you placeeven just a few on the surface, and let their waves meet and collide. 

Drop Vertical Osc, Diagonal 1 & 2 Osc - Same as above, but in a different direction. 

Drop Rain Drops - This will make a random drop fall in the general area of where you click the mouse. Very nice and useful. 

Drop Area Clamp - This will "raise" a part of the texture and make it look like there was a pipe under it pushing water up into the surface of the water. I have found very little use for this one. 

Drop Leaky Tap - This will make a drop fall into a set place (where you click) and it will keep dropping there in a steady and "leaky tap" like manner. 

Drop Drippy Tap - Damn, who makes up the names eh??? Anyways, this is just like the one above, although the drops seem to come about twice as fast. Very useful. 

Right that covers all of them.

There are a few othersettingin the screen though, so I better explain them eh? Ok. Another list methinks ;) 


FX Amplitude - This does not seem to do anything at all :( Please correct me if you find it to do something, but I have not noticed any changes between 1 and 255. 

FX Depth - By the name, I would guess thatit denotes how deep a particular wave will go, but once again, I have found it to do little. 

FX Frequency - This sets howmany times your particular will be shown in each cycle. I mean the higher the number, the more waves will be generated in a period of time. They will be no bigger, or cover a large area, but merely more of the willbe made in the same amount of time. 

FX Phase - This one doesn't seem to be doing anything right now, but I have used it before to change the speed of the actual animations ofthe waves that are created (although that wasin another part of the waterpainting program). 

FX Radius - This will not work with all drop types, but I think thatn in general, you will be able to use it for "semi random" drops like the Rain Drops wave, to restrict the size of the area effected by it. 

FX Size - Similar to the above. There are times that it seems to work, but other times it does nothng (like now) so I am guessing that it will only work for certian wave types. 

FX Speed - Once again as the above. 

FX Time - This will determine how long cetain waves functions take to finish. It doesn't work with all the wave types though. 

Wave Amp - This decides how "deep" the wave itself will be, and how far up and down it goes. The bigger the number, the bigger the wave made will be. Seems to work for all the wave types. 

Ok Now that one is outta the way as well :)

To use the different wave types, simply click on the image map when you have the right wave type seleceted and it willbe placed there. Really easy innit? Hehe, I told you making the right texture wasthe hard bit.

When you have made the waves on the surface of the image Simply close both boxes and you will have the new texture ready for use in the level.

One more thing, and this would be the most important bit. Save your package to the Hard drive. Heh, you might think that you already have the package saved, but this is not the case. Please for the sake of your textures, make sure that you save the file as soon as you finish making a new texture for it. To save the .utx file, press the button called (suprisingly enough) Save. Then you will be able to name the package file that you can then load into any level that you like, and you will also be able to send the filesto other people to use.
