#Can you match a dyed black and white texture's colour by using $color?

1 messages · Page 1 of 1 (latest)

tribal summit
#

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?

cerulean vine
#

$color might be additive
not multiplicative

#

that's just my guess though
it would explain why it isn't the same

tribal summit
#

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

lucid swan
#

I'd use the term subtractive

tribal summit
#

for what

#

i also tried messing with the gamma but it looked way off

lucid swan
#

$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

tribal summit
#

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

lucid swan
#

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

tribal summit
#

yeah using i8, dxt1 has compression artifacts

tribal summit
lucid swan
#

it doesn't ignore lighting, though (thats what modes 5+6 are for… which don't work on brushes in the vanilla shaders)

tribal summit
#

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

lucid swan
#

yeah, blendmode 8 doesn't work on LightmappedGeneric (almost none of the blend modes do); LightmappedTwoTexture basically does the same thing

tribal summit
#

okay i give up. would have saved 34KB give or take

#

assuming i used every texture that's black and white

lucid swan
#

yeah, that's not worth the savings

tribal summit
#

why not

#

no reason to bloat ppls hard drives if i dont have to whether its 1KB or 1GB

lucid swan
#

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

tribal summit
#

sure, but still not gonna bloat if i can help it. within reason

wet lintel
#

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

wet lintel
tribal summit
#

you can notice the difference here

wet lintel
#

yea, to me that would be good enough :D

tribal summit
#

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

wet lintel