Author Topic: Tinting  (Read 172 times)  Share 

Radiant

  • AGS Baker
  • Mittens Knight
  • With a gaze, you can command dragons.
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Tinting
« on: 16 Jul 2017, 20:57 »
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?

Re: Tinting
« Reply #1 on: 16 Jul 2017, 21:28 »
Are you using which version of AGS?

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Tinting
« Reply #2 on: 17 Jul 2017, 03:25 »
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

  • AGS Baker
  • Mittens Knight
  • With a gaze, you can command dragons.
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: Tinting
« Reply #3 on: 17 Jul 2017, 11:34 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
Re: Tinting
« Reply #4 on: 17 Jul 2017, 13:48 »
(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).
« Last Edit: 17 Jul 2017, 13:52 by Crimson Wizard »

Radiant

  • AGS Baker
  • Mittens Knight
  • With a gaze, you can command dragons.
    • I can help with publishing
    •  
    • I can help with story design
    •  
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: Tinting
« Reply #5 on: 17 Jul 2017, 16:27 »
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

  • Cavefish
  • In Four Glorious Colours!
    • I can help with animation
    •  
    • I can help with backgrounds
    •  
    • I can help with characters
    •  
    • I can help with scripting
    •  
  • Scavenger worked on a game that was nominated for an AGS Award!Scavenger worked on a game that won an AGS Award!
Re: Tinting
« Reply #6 on: 17 Jul 2017, 16:39 »
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.