Snarkpit Articles


Those of you who have played the source remake of cs_militia will have noticed the impressive effect at the edges of the river that show how it is flowing. This tutorial will demonstrate how to create the same effect in your own map.

1. Use GCFScape to extract "rootcstrikematerialsmodelspropsCS_militiariver01.vtf" from "counter-strike source shared.gcf"

2. Open Notepad and paste this, then save it as "flow.vmt" (without the .txt extension):

UnLitGeneric

{
"$basetexture" "river01" // Texture (.vtf) that this material uses
"$translucent" "1" // Material should be rendered as translucent
"$nocull" "1" // Material should be rendered when viewed from either side
"$surfaceprop" "water" // Type of surface; determines bullet impacts etc...
"$decal" "1" // This is a decal / overlay

"Proxies"
{
// Texture scrolls over time
"TextureScroll"
{
"texturescrollvar" "$baseTextureTransform"
"texturescrollrate" ".15" // Speed of scrolling
"texturescrollangle" "270.00" // Direction of scrolling
}
}
}


3. Place both these files in your "<game>/materials" directory, or a sub-directory of your choice (eg. "<game>/materials/mapname") and then restart Hammer and/or the SourceSDK.



4. Create the shape of your water geometry (slanted, waterfall, flat?) and texture it as normal water.



5. Copy the entire water geometry and place it 1 unit above and away from the original.



6. Texture the surface of this in your new "flow" material and adjust scale and offset to suit.

7. Compile, and if the water is running upstream, rotate the flow 180 degrees, either in your map or in your .vmt file that defines the texture scrolling properties.

7a. Enjoy.

-Kizza

Note: If you wish to distribute maps with these textures you will need to use BSPZip to include the files.


Post ReplyView Topic
Discussion
0 starsPosted by warlord on Wed Feb 8th 2006 at 6:47pm

The reason it doesent work the way you want is because in militia the running water effect is a prop model with not solid properties.
so it will be possible to remake it only if you where to model it
0 starsPosted by parakeet on Wed Feb 8th 2006 at 1:49am

If you can't use displacements.. just go back to hl1 tactics , possibly with more complex geometry. There's quite a few tuts on Triangle terrain.
0 starsPosted by Naklajat on Mon Feb 6th 2006 at 2:40pm

There is still one problem: this water is very blocky. Usually a stream is going to snake around by using displacements over the water that dip under it to get a more natural look. I got the visual effect right with displacements and the texture used on the models in militia, but because it was a displacement it was not passable. I'm now wondering if altering the vmt properties might make the displacement passable... I'll have to try it. Also, I'm pretty sure you don't have to extract the vtf from the gcf, all you need to do is write the vmt and call the texture from within the gcf.
0 starsPosted by ReNo on Mon Feb 6th 2006 at 2:21pm

Isn't the point of making the material a decal (ie. specifying &quot;$decal&quot; &quot;1&quot;) so that you can simply use the overlay tool to place it on top of the water geometry rather than building a clone of it? I haven't tried it myself and don't know what the deal is with placing decals on water materials, but it seems like an easier option if it works.
Post ReplyView Topic