Tinting. (1 Viewer)

ResonanceChaos

Potential Patron
Joined
Jul 19, 2016
Easy question, right?
"How does skin tinting work?"
You would think with hundreds of guides on making hair, clothing, animations, dialogues, everything you can think of, that somewhere out there someone has put down in words how the HSL C tinting sliders function.

I've searched for days and found nothing.

From what I can infer, they're for Hue, Saturation, and Lumosity (plus the C which I haven't figured out yet). Except the Hue slider value of 0 doesn't correspond with hue 0, leaving me baffled.

Any insight would be greatly appreciated.
 

stuntcock

Content Creator
Joined
Jun 5, 2012
"How does skin tinting work?"
The HSL value describes a transformation in a cylindrical coordinate system. SDT applies the HSLC value via a built-in Flash transformation class (ColorMatrixFilter), but it uses an internal hardcoded function (g.getCMFMatrix) to express a 4-digit HSLC transform as a 4x5 matrix. It's complicated. The code isn't documented. There are many hardcoded magic numbers.

But what you meant was "how can I make skin tinting work for me?" As in: "I want the girl's skin to be bright red. How do I pull numbers out of my ass to make that happen?"

Open up an RGB slider (any of them) and use the eyedropper tool to grab a spot of skin. We usually don't know exactly what the girl is supposed to look like after the transformation, but I'll cheat by using @sclover13's mod. This gives us a set of before-and-after RGB values. If you're not cheating, then you'd need to estimate the target RGB value (which means that your transformation will need a bit more fine-tuning at the end).

lA1mE2F.jpg

Let's put those values on the HSL scale.
Before (dark skin): 27,40,43
After (red skin): 20, 92, 42
Note: if you're clever then you can skip the "target RGB" step and instead choose your target skin color via an online HSL slider tool.

How can we mathematically convert the before value into after?
Hue 27 → 20 ... Add -7
Saturation 40 → 92 ... Multiply by 2.3
Luminance 43 → 42 ... Multiply by 0.98

The main thing here is that we need to boost the Saturation significantly. You can plug those numbers into the skin HSL sliders (or just use this charcode skinhsl:-7,2.3,0.98,1; ). You'll see that the result doesn't perfectly match what we wanted; her skin is slightly too green. In fact, @sclover13's charcode is skinhsl:8,2.63,0.91,1; . Why is it different? The answer probably lies somewhere in @Konashion's hardcoded magic numbers. But we don't need a precise explanation. The result is close enough; you can now tinker with the sliders until you obtain a satisfactory result.

(plus the C which I haven't figured out yet)
Chromaticity. Rarely used in SDT mods, because it tends to make characters look very peculiar (e.g. "this girl is entirely composed of grey shadow" or "her skin is a big bright featureless orange blur" or just "that looks stupid and wrong").

Edit: Chromaticity is incorrect. See Faceless' post below.
 

Faceless

Content Creator
Joined
Jun 12, 2011
Pretty sure it's contrast, not chromaticity. Chromaticity, according to wiki, is roughly equivalent to the H and S of HSL color space, and playing with those two sliders won't let you duplicate the effects of the C slider at all.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.