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

The wave engine in the editor is a great thing that does not seem to have been used in the actual Unreal Game. I have made quite a few water textures using this method, and I think (so do all the people that have seen them) that this type of water is much more realistic for outdoor areas, and has that "real water" feel to it. It will also make the impressiont aht the water in the game is moving up and down and has little waves all over it. Well enough blabbering, time to get to the tute eh?



Opening up the Wave Engine
Ok, this is really easy. To open up Wave Engine, all you have to do is to go to the "textures" browser, Click on "NEW" and you will see a little dialog box appear. There are a few options here.


These options are basically what you will need to get you in. Here is a list of what each "setting" will do. 

Name : This will determine the name of the texture when you have the texture package (.utx file) open in the editor. 

package : This will be the name of the texture package when it is inside the editor. Note that this is not the name of the actual file. 

Group : This will be the name of the group that the particular texture belongs to. You know how you can open up the Unreal textures, and they are nicely divided into things like "Roof, Floor, Walls" etc? Well that's how it's done. Enter the name of the group that you want the texture to be in. If you want it to be in a group that already exists, just enter the name of the group (Case sensetive) and it will be there. 

Class : This is the type of class that the texture will be. For this tutorial, make sure that you have "Wave Texture" selected, otherwise you will have serious problems tryin to follow what is going on ;-) 

Size : This is going to be the size of the texture that you make (in pixels). Most of the time, you will want a larger texture, although you could of course use a small one (say 64x64) if it's going to be repetitve, or placed on a small item. I would however suggest that textures to be made for general purpose (and certinaly for this tutorial) are at least 256x256 large ;-> 

Create this Texture : Well, this is the wonderful button that you will want to press when you have entered in all the stuff that you have to enter in. Simply really :) 

Cancel : If you don't know what this will do, then I ain't gonna tell ya. Hehee 

Ok, now that we got that out of the way, we can actually start to do some cool editing here. 



This is what your screen should look like now. Ok, you got that? Now there are a few things that I will explain first. Here is a lit of what you will be playing with. Click on any of the entries to change their values. This image will explain what I am talking about here.




Bump Map Angle : This setting will determine what angle the Map will be "bumped" from. Not all that important really from what I have found. It seems to go very wierd if you set it to high levels (above 230) and also mkaes your phongs dissapear if it is set to a very low level. 

Bump Map Light : This setting will determine just how much light there is on the Texture. It has got nothing to do with where lights will be placed in the actual game, just while you are making the texture. The more light there is, the lighter the water will be, and the less Phongs you will see (Phongs are explained later). I would suggest that you keep the Light at either the level that it starts off at, or add in a little more. Dark waters tend to look too black to be realistic, but everyone to their own eh? This setting bar will be brightest at 128. The scale will work in such a way that 0 is pretty much black water with little "phongs" of light (Yes, I will explain them in a sec) appear on the tops of the water, 128 is the brightest level possible with the water being almost white and the waves showing up nicely, and 255 will set the water to show waves once again, but there will be no Phongs Visible at all. 

Drop Type : This will choose the type of "brush" you will be using to "paint" the waves onto the water. This is a drop menu, and there are heaps of options in it. I will list them all and what they do further down. Right now, all you need to know is that it chooses the type of drop/plop/gloop that you will be adding to the water.


FX Amplitude : Sadly, this feature does not seem to do anytihng right now. Perhaps it is a setting that will be implemented in the retial version of the editor. 

FX Depth : I cannot find a real use for this entry, as it does not seem to change anything. I might be wrong, and if you find out what it doesn, then please tell me so that I might be able to explain it here, but until then, it gets a "Not Here" rating. 

FX Frequency : This setting will change the speed at which the waves are produced from the actual wave brush. Ie, if you make an Oscillating Horizontal bar, and set it to 8 (The defualt) then you will get say, three waves every second. Set it to 32 and you will get 12 waves a second. This will not make the waves any larger, or higher, or make them cover a larger area, just will make more of the appear each second. 

FX Phase : Well, here is another "I don't know if it does anyrthing" setting. It does not seem to make any real changes when you are playing with it, but Once again, if someone finds what it does (or knows) then please drop me a line, and I will correct myself here :) 

FX Radius : Well, I would have thought that this setting would alter the radius that "random" water brushes (like rain drops) take the value of. Ie a larger number would make the rain fall into a larger area, but this does not seem to be the case. It doesn't seem to do much at all. Perhaps I am using the wrong bursh here, but I have tried it with MOSt of them, and it has done nothing. Oh well, I guess we are using a BETA editor eh? 

FX Size : This one, I can tell you what it does :) When you change the setting here, it will change the size of the brush that you are using to "pain" the waves with. For example, if you choose a small setting (like 4) and use a vertical osillating brush, then you will make a waves that looks almost like a drop of water, but if you change the setting to say 32, then it will mkae a brush that is almost a quarter of the texture. This setting comes in handy when you want to make a wave texture that is not "repetitive" and so that you can make it look more natural and make the waves vary in size ond shape. 

FX Speed : Ok, this one has got me beat. Sorry, No real idea what (if anything) it changes. 

FX Time : Unfortunately this feature does not seem to be implemented here. I have once again tried it with a few different brushes, and it seems to make no difference to anything. Perhaps someone out there knows what it does, and want to mail me to tell me? 

Phong Range : Well, I said that I would tell you what this means so here it comes. A Phong is the little bit of light that is reflected off a wave as it passes along near a light, or with a light behind it somewhere. When you have looked at the ocean or a lake, you will see that the water is full of little "glints" of light, and there is always a little bit of a sparkle somewhere. Well, this is called a Phong. The Phong Range setting basically determines how far away from the center of the brush, this particular phong can travel. If you play with just one oscillating brush, you will see what it really does. I would suggest that you set it to something small (like 4) and make a wave. You will see it right near the actual center of the brush but it will not travel all the way with the wave. If you set it to a higher number (like 128) then you will see that it should travel along with the wave to almost (if not all the way) to the end of the actual wave. Phongs will also be created when you have waves meet each other to form new waves. 

Phong Size : This will determine just how large a phong is on a wave that is made. You can make the phong very small (like 4 or 8) and you will only see a small glimmer on the crest of the wave, or you can set it to a high number (255?) and you will be able to see that almost half the actual wave is covered in a bright light (ie the phong). I would suggest making it a fairly small number so that the glints look realistic, and not like they are all over the place, and I would also plan ahead and choose just how much light will be falling on that particular texture. If it is a small amount of light, then I would only use a few phongs here and there, but if you want to place the water right in the middle of a brightly lit up courtyard, then have a fair few of these things floating about, and it will enhance the effect of the lights, especially if you have water somewhere else that is a lot more "dull" so to speak. 

Wave Amplitude : Well this one is easy :) This setting will determine just how large your waves are. The higher the number, the deeper and higher your waves will be. A low setting would be great to use if you want to make a water texture look as if it is almost calm, and a high setting would be good to use near a water fall. Play and see with this one, as it depends completely on what type of water you are trying to make. 




Ok, that pretty much covers all of the settings. here is a list of what each of the differnt drop types do. There are a lot of brush types to use, although most of them are actually just alterations of each other.



Drop Fixed Depth - This will make a little "dint" in the water that does not go up or down, but just stays at the level that you set it to. I find this one 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 will be just like the "Drop Phase Spot" although it is 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 of waves dance all over your image. It follows no pattern, and actually looks 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 bug 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 all the time, so that it will akegreat looking waves on your texture. Very useful if you place even 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 is out of the way. Now to actually paint with the stuff, all you have to do is to choose a wave brush (one of the things in the list above here) and click on the blue texture box. This is the box that has opened itself along with the properties bar. Nothing that hard there really is there? heh. Enjoy and make good water.
