Page 1 of 1

[0.17.42] Out-or-range tint makes animation invisible.

Posted: Fri May 24, 2019 6:26 pm
by eradicator
What?
An animation layer with "oversaturated" tint becomes invisible instead.
The other layers (shadow) are unaffected.

Code: Select all

data.raw['assembling-machine']['assembling-machine-3'].animation.layers[1].tint = {r=1,g=1.1,b=1,a=1},
shadowonly.png
shadowonly.png (31.34 KiB) Viewed 676 times

Hoped for Behavior
I was hoping tint could be used to multiply the original color channel to become brighter like this:

Code: Select all

new_green = math.min(1,old_green * green_tint_factor)

Actually expected Behavior
An out of range error.


Why?
In this thread there's a discussion about hue, and i was testing if it can actually be done. because it'd be awesomely useful if it could be done.

Re: [0.17.42] Out-or-range tint makes animation invisible.

Posted: Fri May 24, 2019 6:40 pm
by Bilka

Code: Select all

tint = {r=1,g=1.1,b=1,a=1}
The game is interpreting this as 1 out of 255 alpha, due to you going above 1 for the g. Don't go above 1 if you want to use 0-1 color values.

Re: [0.17.42] Out-or-range tint makes animation invisible.

Posted: Fri May 24, 2019 6:49 pm
by eradicator
#$@&%*! I never realized the engine accepted the 1-255 range as everything in base seems to be converted to 0-1 range. "1.1" is a float though so it's not valid for that range, not that it matters i guess. Thanks for bothering to tell me :).