Custom water material problem

May 25, 2015
390
307
I've been working on a new map, and decided to have a custom water material to go with it.
I included every vmt parameter listed on the VDC page for the water shader. However, in Hammer, the top of the water brush is only displaying a missing texture (purple/black checkerboard), and the bottom part is invisible (in difference to official water materials). When the map is compiled and loaded in-game, the brush is there, but instead of being water, it just looks roughed up with the water normalmap (wich isn't animated even though it is set up to), and is opaque with the fog color, and have a slight shine of the missing texture behind it, probably becuase it can't load up _rt_WaterReflection due to it not compiling as water. The brush is also solid and blocks lighting.

Here's the vmt for the water material:
"Water"
{
"$abovewater" 1
"$bottommaterial" "water/water_2fort_beneath.vmt"
"$underwateroverlay" "effects/water_warp"
"$normalmap" "water/tfwater001_normal"
//"$bumpmap" "water/dx80_tfwater001_dudv"
"$bumpframe" "0"

"$fogcolor" "{89 124 145}
"$fogenable" "1"
"$fogend" "512"
"$fogstart" "0"

"$envmap" "env_cubemap"
"$reflectamount" "1.25"
"$reflectentities" "1"
"$reflecttexture" "_rt_WaterReflection"
"$reflecttint" "[1 1 1]"
"$refractamount" "0.3"
"$refracttexture" "_rt_WaterRefraction"
"$refracttint" "{255 255 255}"

"%compilewater" 1
"$surfaceprop" "water"
"%tooltexture" "dev/tfwater_normal"
"%keywords" "tf"

"proxies"
{
"AnimatedTexture"
{
"animatedtexturevar" "$normalmap"
"animatedtextureframenumvar" "$bumpframe"
"animatedtextureframerate" 30.00
}


"WaterLOD"
{
// fixme! This has to be here, or material loading barfs.
"dummy" 0
}
}
}

And here's the vmt for the bottom material:
"Water"
{
"$abovewater" 0
//"$bottommaterial" "water/water_rivermelt_beneath.vmt"
"$underwateroverlay" "effects/water_warp"
"$normalmap" "water/tfwater001_normal"
"$bumpmap" "water/dx80_tfwater001_dudv"
//"$dudvframe" "0"
"$bumpframe" "0"

"$fogcolor" "{89 124 145}
"$fogenable" "1"
"$fogend" "512"
"$fogstart" "0"

//"$envmap" "env_cubemap"
"$reflectamount" "1.25"
//"$reflectentities" "1"
//"$reflecttexture" "_rt_WaterReflection"
"$reflecttint" "[1 1 1]"
"$refractamount" "0.3"
"$refracttexture" "_rt_WaterRefraction"
"$refracttint" "{255 255 255}"

"%compilewater" "1"
"$surfaceprop" "water"
"%tooltexture" "water/tfwater001_normal"
"%keywords" "tf"

"proxies"
{
"AnimatedTexture"
{
"animatedtexturevar" "$normalmap"
"animatedtextureframenumvar" "$bumpframe"
"animatedtextureframerate" 30.00
}


"WaterLOD"
{
// fixme! This has to be here, or material loading barfs.
"dummy" 0
}
}
}

If anyone can help with this, please reply.