Thread: (Released) ff_dong
View Single Post
Old 01-01-2015, 07:52 PM   #14
oaties
 
Join Date: Nov 2010
Gametype: Capture the Flag
Posts Rated Helpful 38 Times
Quote:
Originally Posted by aleXtric View Post
do u know how to make white or yellow water? cause if not stfu with your unreasonable requests. enjoy your day.
If you actually want to change the color of the water, you are going to have to use a custom water material.

In order to do this, we can create our own water texture pretty easily by modifying an existing FF water. If you check the current water texture you are using, then navigate to it in the FF folder, you will find a .vmt file named after it. For example, using the water of openfire, there is a file called openfire_water.vmt in "sourcemods/Fortress Forever/materials/ff_openfire".

Create a copy of that and rename it. This will be the custom water.

A VMT is a valve material file, it contains the properties of the texture, such as the base texture it uses and any modifications to it. In order to edit these files, you need a program called VTFEdit (http://nemesis.thewavelength.net/index.php?c=178).

When we open the VMT, we will see its properties. Using openfire_water.vmt as an example:

Code:
"Water"
{
	"%keywords" "FF"
	
	"Water_DX60"
	{
		"$fallbackmaterial" "ff_hunted/ff_water_lake_dx70"
	}
	"Water_DX80"
	{
		"$refractamount" "0.2"
	}
	"Water_DX81"
	{
		"$refractamount" "0.2"
	}


	"$abovewater" "1"
	"%compilewater" 1

	"%tooltexture" "dev/water_normal"
	"$bumpmap" "dev/water_dudv"
	"$normalmap" "dev/water_normal"
	"$bottommaterial" "ff_openfire/ff_openfire_water_beneath"
	"$envmap" "env_cubemap"
	"$envmaptint" "[ 0.5 0.5 0.5 ]"

	"$surfaceprop" "water"

	"$refracttexture" "_rt_WaterRefraction"
	"$refractamount" "0.3"
	//"$refracttint" "[.8 .75 .65]"
	"$refracttint" "[.6 .9 .95]"


	"$scale" "[1 1]"

	"$fogenable" 1
	"$fogcolor" "{15 40 50}"
	"$fogstart" "0"
	"$fogend" "300"

	"$bumpframe" "0"

	"Proxies"
	{
		"AnimatedTexture"
		{
			"animatedtexturevar" "$normalmap"
			"animatedtextureframenumvar" "$bumpframe"
			"animatedtextureframerate" "20.00"
		}

		"TextureScroll"
		{
			"texturescrollvar" "$bumptransform"
			"texturescrollrate" "0.025"
			"texturescrollangle" "45.00"
		}

		"WaterLOD"
		{
		}
	}
}
If you see these properties, there is a certain one, $color that can be added in order to change the base "tint" of the texture. (https://developer.valvesoftware.com/wiki/$color)

By simply adding "$color" "{ R G B }" to the code with the other statements starting with $, you can change the tint: 1 1 1 corresponds to white, 255 255 255 corresponds to black etc. If you look through the above example, you might also see the line ""$fogcolor" "{15 40 50}". This corresponds to the fog of the water (obviously) and should also be changed.

The above example uses:

Code:
"$bottommaterial" "ff_openfire/ff_openfire_water_beneath"
This means that in this case, for this water, you are going to have to also create a new copy of ff_openfire_water_beneath.vmt, follow the similar steps as above to change the color tints, then point the original vmf to it:

Code:
"$bottommaterial" "ff_dong/ff_dong_water_beneath"

Where ff_dong/ff_dong_water_beneath.vmt if an edited copy of the original with the tints applied.
Use this custom texture in Hammer and now you have tinted water. If you don't want to include this texture into your map, a good solution could be to pakrat the new texture into the map .bsp file, since you only have one texture it shouldn't matter too much.
oaties is offline   Reply With Quote


4 members found this post helpful.