Adjust HSL vs. Tint

Discussion and feedback on Construct 2

Post » Thu Mar 14, 2013 1:11 pm

Hey all,

I'm working on color shading for my game's levels. The two effects I have seen that may be pertinent are 'Tint' and 'Adjust HSL'. Adjust HSL seems to be more user friendly - i.e. I like being able to directly control hue, stauration, and lightness, however it seems like I don't have the same range of color options as with Tint - HSL only allows hue rotation, so it seems like I couldn't really have a color 'overlay' as in tint. Or could I?

I'm basically asking:

-Can Adjust HSL do everything that Tint does?
-Can Tint do everything that Adjust HSL does?
-What's the performance difference like?

Thanks!sqiddster2013-03-14 13:12:20
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Mar 14, 2013 3:36 pm

They're different. Tint just does:
red * red tint
green * green tint
blue * blue tint

Adjust HSL does:
convert RGB to HSL
hue * hue adjust
sat * sat adjust
lum * lum adjust
convert HSL to RGB

Basically, tint treats each RGB color channel individually, but Adjust HSL treats the whole image evenly. Comparing Adjust HSL to Tint:

Hue rotate: this is a true rotation, so for example red turns green, green turns blue, and blue turns red - in a circle. Tint can't do that, it just boosts or filters individual RGB channels.

Saturation: basically how greyscale the image is. Tint can't do that, it could only brighten or darken the entire image.

Luminance: how bright the image is. Tint can't adjust this either: tinting all colors down will reduce the saturation, whereas turning down the luminance preserves saturation. IMO this makes luminance look visually better than tint or multiply for brightness adjustments.

On the other hand, Adjust HSL can't make something appear only in shades of red, like Tint can: it will only rotate the hues, giving a weird multi-colored effect.

So:
If you want to make something look a certain color - use tint
If you want to adjust the brightness or greyscale-ness, or make a weird color rotate effect - use Adjust HSL

Both run all on the GPU so are probably both very fast, but if you benchmark them tint will probably be faster because it doesn't have to convert the color system.Ashley2013-03-14 15:37:42
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Mar 14, 2013 4:55 pm

Thanks for the clarification, @Ashley .
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400


Return to Construct 2 General

Who is online

Users browsing this forum: spacedoubt, Unconnected and 0 guests