In minecraft things like leaves are black and white then changed with a colour modifier multiplicatively. However this does not produce the desired colour when using the exact same rgb values with $color. In screen left side is the colour values used with $color, on right which is how it is supposed to look are the same colours but used with another layer that is multiplied (in photoshop). Any way to make it look like the right side without painstakingly adjusting each value?
#Can you match a dyed black and white texture's colour by using $color?
1 messages · Page 1 of 1 (latest)
$color might be additive
not multiplicative
that's just my guess though
it would explain why it isn't the same
not sure since $additive is a thing and it makes the pixels brighter as you would expect
actually idk if that makes sense but yeah it makes them brighter
I'd use the term subtractive
$color is "[1 1 1]" by default
("{255 255 255}" if you prefer)
by setting it to, say, "[0 0.5 0]", you're saying to darken the red and blue completely, and darken the green to half of what it originally was
so a black texel will always be black
(unless you set something like "[0 2 0]", but then that'd make the non-black texels neon)
tldr: just bake the color variants in an image editor
yeah i already did that but it's just a ton of file size for no reason if there's an ez way to get it to look the same
maybe with carefully-authored mono-color detail textures, using blend mode 1
It would certainly be cheaper, having a high-res I8 for diffuse and a low-res DXT1 for color
yeah using i8, dxt1 has compression artifacts
blend mode 1 is same as $additive according to vdc anyway
it doesn't ignore lighting, though (thats what modes 5+6 are for… which don't work on brushes in the vanilla shaders)
okay so using a pure white texture as $basetexture with the normal $color values then the leaves texture as the $detail texture with blendmode 8 appears to give the exact same colours as baking with photoshop however only if it's an unlitgeneric...so no good
wish valve made $color work the same way as every other program in the entirety of the universe
yeah, blendmode 8 doesn't work on LightmappedGeneric (almost none of the blend modes do); LightmappedTwoTexture basically does the same thing
okay i give up. would have saved 34KB give or take
assuming i used every texture that's black and white
yeah, that's not worth the savings
why not
no reason to bloat ppls hard drives if i dont have to whether its 1KB or 1GB
if it's not a single-player game, l4d2, Portal 2, or Gmod, then BSP compression will bring the file size down to where the difference is even more negligible
sure, but still not gonna bloat if i can help it. within reason
are you applying the sRGB gamma correcion to your colour value?
because it looks like you didn't and that's your problem
for each channel do
(value / 255) ^ 2.2 to get the corrected value
that's why this is actually wrong btw, as exactly half colour would be 0.216
yeah this works. i knew about this but didn't think it was applicable. didn't know the value would have to be 255. unfortunately however, even with 5 decimal places it's only like 99.99% accurate, very very slightly noticably different
you can notice the difference here
yea, to me that would be good enough :D
it would for me in most cases but for this map in particular i've been making it to be as accurate as humanly possible
