$color help

  • If you're asking a question make sure to set the thread type to be a question!

CapellanCitizen

L2: Junior Member
Mar 31, 2010
77
16
I'm making a texture to represent rubber conveyor track, and to save space (and avoid undue fuss), I've decided to use the $color material parameter to darken up the metal door texture.

However, the texture's color hasn't been changed, and still looks like the door. Also, I did select the correct material in the map, it does have rubber hit effects in game.

Here is the VMT:
Code:
"LightmappedGeneric"
{
	"$basetexture" "Metal/metaldoor001"
	"$bumpmap" "Metal/metaldoor001_normal"
	"$color" "[0.3 0.3 0.3]"
	"$surfaceprop" "rubber"
	"%keywords" "tf"
}

Any Ideas?
 
Feb 18, 2009
640
629
I would have thought that the 3 values have to be normal RGB values, up to 255, so 0.3 is having a tiny tiny effect (or none at all it the engine is rounding that number to 0). So, try bumbing up the numbers a load (you'll have to play around with them to get what you want).
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Numbers in brackets [] are 0-1 values, numbers in braces {} are 0-255.

That said, I've never encountered $color not working, though I've seen a few materials use $color2 which is totally undocumented and I don't know the difference, might try that though.
 

Ravidge

Grand Vizier
aa
May 14, 2008
1,544
2,818
Boojum got it.
"$color" "{0.3 0.3 0.3}" should work, but this would create a (practically) pitch black texture.
I might also add that you can safely go above 255 to brighten the texture.

$color2 works identical to $color. And both can be used at the same time to blend colors or just having color2 lower/increase the overall brightness.