This tutorial covers building and setting up a river and falls system. I have included the map for you to rip apart and a crappy water texture I made(you'll see if you compile and play the map). I am not covering water textures in depth as it involves alpha channels. This is an advanced tut so I am assuming you understand alpha channels. There are several tutorials on the net for that. The falls.vmt and falls.vft are both included in the falls.zip. You can simply edit the falls.vmt and replace with your texture name and rename the file. If there is no alpha channel in the texture, you cannot see into the water, but it will get you by for now. In the .vmt you can set the frame rate and scroll speed and direction.* i have not test with a single frame.

"animatedtextureframerate" 20.00 <- for animated materials.
"texturescrollrate" .025 <- The speed for the scroll.
"texturescrollangle" 45.00 <- Change this match the angle of your river(I have not tested but you will need to setup serveral files with the same texture file .vft but each one will need a new .vmt file to set the angle, I recommend renaming them water45,water90, water270, for the angles which it will flow.) My texture scroll angle for this map is set to 270.

If you use the water that you find in the game/editor it will not look right and just set on the falls. The texture I created for the falls effect is not water like in the game, there is no bump mapping and no reflections. I have not fully figured out what the format of what the texture needs (open water_normal with GCFscape to see a real water setup in the .vmt file) The vmt I copied to get this work was the water_dx70_beneath. If you use a real water texture this is what you see from below because there can be no reflections. I choose to animate my falls texture too and this also is not covered here as there are tuts on the net for this. I just got the whole texture working together and have not had the time to complete a nice looking falls texture yet.

Step one.
Setup your room with a channel for the water in the middle. Set one part higher for the falls.

news post image

Step two.
You will need to offset your brushes to fit the water.

news post image

Step three.
You will need 3 brushes for the water in this sample. The top and bottom and the part that goes down. Don't over lap water into water. You can extend the water in the regular brushes, just don't extend outside you map or it will leak(compiler error with entities, not the water)

news post image

I suggest covering the whole brush with the nodraw texture first, then apply the water on top. Set you finished bushes into the channel. Now you have your water that looks like it is flowing.

Step four -optional.
If your careful, you can clip off the front of the falls to lose the hard 90 degree angle.

news post image

Step 5.
Make 3 brushes to the fill the channel again the same size and shape of the original water brushes (before clipping, the push can extend outside the water if needed). Cover the whole brush with the nodraw texture. With the brush selected, click the to entity button and set to trigger_push.

Step 6.
Setup up the properties in the trigger_push. For this example you only need to set the push direction and speed. I found some figures.(edited) 100 will push the player but they can swim aginst the current, 200 will make the player struggle giving him hope of making it, but won't, +300 and the player can not re-enter against it and will be pushed regardless. *Note- do not set your trigger_push to 400, down and place against the bottom of a regular brush or you force the player to drown, you will pinned and cannot move out.

news post image

Also you will need to tell the trigger_push, what to push. While in the properties select the flags tab. For the example I used everything.

news post image

Step 7 -optional.
If you want group your water and push brushes and lift them out of the channel. Use the displacement tool to round out the river bed and surrounding area(the displacement tool is not covered in this tutorial). If you go to low you will need to stretch your water to reach past those areas. This applies to the sides too, just stretch to fill in the holes. Remember the water can extend into the brush, just not out side the map.

news post image

Step 8.
Compile and test.

news post image

*If you can not animate then use single simple texture and set the scroll speed, but it will look like conveyor belt.
*You can set the trigger_push to odd angles. For example you can make a water pool that carries your around in circles, or snaky or steep river.
*You can use the any of the water textures on ALL sides of a brush. I have even made floating water spheres. That you only can texture the top of a water brush is a myth.
*With the trigger_push to set to push other objects you should be able to set up a raft or a log ride.
*Watch out using displacement maps that have large bumps sticking out to high or at steep angles as the player will get pinched in between push and bottom. Softer more flowing angles work best.
*You can apply displacements maps to the water bush to rough it up, like a rushing river, but there will be no water underneath, you can use for decorational use.
*Displacement maps on the trigger_push will cause crashing. Be careful not to select one by mistake when using.

Reasons why a water won't work- bad material, water brush out side of the map, leaks, displacements, tied to an entity, improper texturing.

Example Map


View comments ( 11 )

Back to top