[Solved] Tinting

Started by Radiant, Sun 16/07/2017 20:57:37

Previous topic - Next topic

Radiant

I haven't used tinting in a while, but isn't

SetRegionTint (i, 1, 1, 1, 50);

supposed to tint characters dark black (with a 50% transparency)? Because it appears to be tinting characters bright white instead. Is this one of those functions where parameters are reversed?

eri0o

Are you using which version of AGS?

Crimson Wizard

Luminance parameter was added to Region.Tint in 3.4.0. But SetRegionTint is obsolete function, maybe there is a bug and it passes wrong default luminance to standart function.

Radiant

Fair point, I'll try Region.Tint() instead.

(I'm talking about the 'amount' paramater that has been there since several versions back; I don't think that's the same as 'luminance'?)

Crimson Wizard

#4
Quote from: Radiant on Mon 17/07/2017 11:34:57
(I'm talking about the 'amount' paramater that has been there since several versions back; I don't think that's the same as 'luminance'?)

"Amount" is same thing as "saturation", as it is referred in some other tinting articles. Luminance is a separate parameter which increases or decreases brightness at the same time. The concept is rather confusing to me, I cannot tell which "standard" operation it resembles (like add or multiply, or combination of them).

IDK if there are tint parameters which correspond to setting LightLevel in 32-bit games (something like [255,255,255,?,N] maybe?). But LightLevel has a special method for 8-bit games, that Tinting does not (I think built-in tinting does not work in 8-bit games at all, because of the palettes).

Radiant

I don't see how either tinting or lightlevel can work in paletted games, frankly. As far as I can tell, luminance is the equivalent of amount for regiontint of (1,1,1), or a percentual multiplier to saturation which works out to more or less the same thing. Luminance can be used to make things more black, saturation can be used to make things more of any one color which could also be black.

Scavenger

Quote from: Radiant on Mon 17/07/2017 16:27:26
I don't see how either tinting or lightlevel can work in paletted games, frankly.

Look up tables, mainly. I believe the 8-bit lightlevel uses this allegro function.

SMF spam blocked by CleanTalk