Flowing water: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (→Flowing Water) |
||
Line 2: | Line 2: | ||
=Flowing Water= | =Flowing Water= | ||
#Use [[GCFScape]] to extract "root\cstrike\materials\models\props\CS_militia\river01.vtf" from "counter-strike source shared.gcf" | #Use [[GCFScape]] to extract "root\cstrike\materials\models\props\CS_militia\river01.vtf" from "counter-strike source shared.gcf" | ||
#Create a .[[VMT]] file called "flow" and paste the following inside it: | #Place this file in your "<game>/[[materials]]/flow" directory and then restart [[Hammer]] and/or the [[Source SDK]]. | ||
#Create a .[[VMT]] file called "flow" in the same directory and paste the following inside it: | |||
<pre> | <pre> | ||
UnLitGeneric | UnLitGeneric | ||
{ | { | ||
"$basetexture" "river01" | "$basetexture" "flow/river01" | ||
"$translucent | "$translucent" 1 | ||
"$nocull | "$nocull" 1 | ||
"$decal" 1 | "$decal" 1 | ||
"Proxies" | "Proxies" | ||
{ | { | ||
"TextureScroll" | "TextureScroll" | ||
{ | { | ||
"texturescrollvar" "$baseTextureTransform" | "texturescrollvar" "$baseTextureTransform" | ||
"texturescrollrate" .15 | "texturescrollrate" .15 | ||
"texturescrollangle" 270.00 | "texturescrollangle" 270.00 | ||
} | } | ||
} | } | ||
} | } | ||
</pre> | </pre> | ||
#Create your [[water]] [[geometry]] and give it a nice water [[material]]. | |||
#Create your [[water]] [[geometry]] and give it a nice water [[ | #Copy all of your water geometry and place this copy one unit above and away from the original geometry. | ||
# | |||
#Texture the surface of this new geometry in the new "flow" material. | #Texture the surface of this new geometry in the new "flow" material. | ||
#Adjust the | #Adjust the scale and shift to conform with the edges of the water. | ||
#Compile. | #Compile. | ||
Revision as of 18:27, 25 January 2006
Flowing Water
- Use GCFScape to extract "root\cstrike\materials\models\props\CS_militia\river01.vtf" from "counter-strike source shared.gcf"
- Place this file in your "<game>/materials/flow" directory and then restart Hammer and/or the Source SDK.
- Create a .VMT file called "flow" in the same directory and paste the following inside it:
UnLitGeneric { "$basetexture" "flow/river01" "$translucent" 1 "$nocull" 1 "$decal" 1 "Proxies" { "TextureScroll" { "texturescrollvar" "$baseTextureTransform" "texturescrollrate" .15 "texturescrollangle" 270.00 } } }
- Create your water geometry and give it a nice water material.
- Copy all of your water geometry and place this copy one unit above and away from the original geometry.
- Texture the surface of this new geometry in the new "flow" material.
- Adjust the scale and shift to conform with the edges of the water.
- Compile.
Troubleshooting and Notes
- To distribute a map using this method you must include the "river01.vtf" and "flow.vmt" files in the BSP using a program such as BSPzip.
- 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.
See Also
- Alpha channel
- Creating a Material Tutorial
- Creating Decals
- Creating Materials
- Half-Life 2 Shader Fallbacks
- Shader Types and Parameters
- Water
External Links
- Interlopers.net Waterfalls Tutorial - A similar method for creating flowing water.