Flowing water: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 31: Line 31:
=Troubleshooting and Notes=
=Troubleshooting and Notes=


*To distribute a map using this method you must include the "river01.[[VTF|vtf]]" and "flow.[[VMT|vmt]]" files in the [[BSP]] using a program such as [[BSPzip]].
*To distribute a map using this method you should include the "river01.[[VTF|vtf]]" and "flow.[[VMT|vmt]]" files in the [[BSP]] using a program such as [[BSPzip]], or distribute a .[[RES]] file with the map (zipping is more reliable).
*If the water appears to be flowing the wrong way, or upstream, set the texture's [[rotation]] to 180.
*If the water appears to be flowing the wrong way, or upstream, set the texture's [[rotation]] to 180.
*For extra realism [[Env smokestack|particle]], [[Env splash|splash]] and [[sound]] effects will be required. The [[env_embers]] entity can be used to simulate a splash effect.
*For extra realism [[Env smokestack|particle]], [[Env splash|splash]] and [[sound]] effects will be required. The [[env_embers]] entity can be used to simulate a splash effect.

Revision as of 12:07, 27 January 2006

Flowing Water

  1. Use GCFScape to extract "root\cstrike\materials\models\props\CS_militia\river01.vtf" from "counter-strike source shared.gcf"
  2. Place this file in your "<game>/materials/flow" directory and then restart Hammer and/or the Source SDK.
  3. Create a .VMT file called "flow" in the same directory and paste the following inside it:
"LightmappedGeneric"
{
	"$basetexture"	"flow/river01"
	"$translucent"	1
	"$nocull"	1
    	"$decal"	1

	"Proxies"
	{
		"TextureScroll"
		{
			"texturescrollvar" "$baseTextureTransform"
			"texturescrollrate" .15
			"texturescrollangle" 270.00
		}
	}
}
  1. Create your water geometry and give it a nice water material.
  2. Copy all of your water geometry and place this copy one unit above and away from the original geometry.
  3. Texture the surface of this new geometry in the new "flow" material.
  4. Adjust the scale and shift to conform with the edges of the water.
  5. Compile.

Troubleshooting and Notes

  • To distribute a map using this method you should include the "river01.vtf" and "flow.vmt" files in the BSP using a program such as BSPzip, or distribute a .RES file with the map (zipping is more reliable).
  • If the water appears to be flowing the wrong way, or upstream, set the texture's rotation to 180.
  • For extra realism particle, splash and sound effects will be required. The env_embers entity can be used to simulate a splash effect.

See Also

External Links