$color help

Discussion in 'Mapping Questions & Discussion' started by CapellanCitizen, Jul 21, 2010.

  1. CapellanCitizen

    CapellanCitizen L2: Junior Member

    Messages:
    77
    Positive Ratings:
    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?
     
  2. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    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).
     
  3. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    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.
     
    • Thanks Thanks x 2
  4. Ravidge

    aa Ravidge Grand Vizier

    Messages:
    1,544
    Positive Ratings:
    2,495
    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.
     
    • Thanks Thanks x 1
  5. CapellanCitizen

    CapellanCitizen L2: Junior Member

    Messages:
    77
    Positive Ratings:
    16
    Thanks, I'll see if it works

    EDIT: It didn't. I'm using the setting {75 75 75}. Perhaps it's too light?
     
    Last edited: Jul 21, 2010
  6. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    Interesting, I'll try to remember that (if ever I need it). Thank you.
     
  7. CapellanCitizen

    CapellanCitizen L2: Junior Member

    Messages:
    77
    Positive Ratings:
    16
    The color value that I added must have been too light, because it's working now.

    *censored* Gamma Correction, how does it work?