Show HN: Simple algorithm and color space to generate diverse skin tones
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Show HN: Simple algorithm and color space to generate diverse skin tones
Unofficial Hacker News client; not affiliated with Y Combinator.
[deleted] · · focus · HN ↗
[deleted]
m_w_ · · focus · HN ↗
Wish I had this on hand like this three or four years ago when I was working on VR avatar software - we had hard-coded skin tone options at the time - would have been a cool addition!
automatoney · · focus · HN ↗
But absolutely the hope is that this is a tool that stays accessible to people for whatever they're building and everyone can slow down on reinventing the wheel here for every character creator/digital art application.
tyromaniac · · focus · HN ↗
[dead]
moralestapia · · focus · HN ↗
[dead]
Tossrock · · focus · HN ↗
4848489449 · · focus · HN ↗
[dead]
andai · · focus · HN ↗
"Only realistic colors" would be a different problem. And I'm not sure if there's a way to solve that problem without excluding some real colors too.
(Maybe if the colour selector was a different shape? I don't know much about color spaces.)
automatoney · · focus · HN ↗
"not sure if there's a way to solve that problem without excluding some real colors too" - 100% right on that too. A big part of this work was to define a way to tweak/improve the equations in order to approach a solution to these issues - part of my hope in sharing is to get more eyes and brains thinking about this and proposing improvements!
compass_copium · · focus · HN ↗
This is a really nice project. Great work and a great write-up. Thanks for sharing.
wongarsu · · focus · HN ↗
richiebful1 · · focus · HN ↗
rsynnott · · focus · HN ↗
You'd be surprised: <a href="https://en.wikipedia.org/wiki/Argyria" rel="nofollow">https://en.wikipedia.org/wiki/Argyria
[deleted] · · focus · HN ↗
[deleted]
Abh1Works · · focus · HN ↗
383toast · · focus · HN ↗
LocalH · · focus · HN ↗
BHSPitMonkey · · focus · HN ↗
lstodd · · focus · HN ↗
sph · · focus · HN ↗
numpad0 · · focus · HN ↗
vermarish · · focus · HN ↗
Then, I thought this would stop at using the U-space vectors (the ones that form the basis of the PCA image) and their corresponding ellipse to form our color space, but no, the function fitting is a very slick idea, even if it was executed by hand.
Lastly, I love the presentation of sampling from different r values. Whether you sample from a fixed r value or a range of r values, I bet this has great applications in game design or animation.
I still don't quite get the manual data labeling process at the beginning? It seems like it would encode some bias, but the consistency of the first point cloud and the results certainly speak for themselves.
automatoney · · focus · HN ↗
dr_scully · · focus · HN ↗
<a href="https://discovery.ucl.ac.uk/id/eprint/10093345/" rel="nofollow">https://discovery.ucl.ac.uk/id/eprint/10093345/
GolDDranks · · focus · HN ↗
skydhash · · focus · HN ↗
Joel_Mckay · · focus · HN ↗
People only turn yellow if they have kidney or liver damage. However, some distinctive features like Lucy Liu's natural freckles are tough to draw right.
We looked around a lot for a procedural texture/shader to help make the project characters look less sickly, and please also consider supporting the persons work if you are able:
<a href="https://kuhantilope.gumroad.com/l/ultimate-skin" rel="nofollow">https://kuhantilope.gumroad.com/l/ultimate-skin
Best of luck =3
iwontberude · · focus · HN ↗
This is not true. Roughly 5% of people have Gilbert's Syndrome which is genetic, metabolic abnormality where the bilirubin from dead blood cells are conjugated slower than the baseline patient leading to yellowing of the skin. It is not due to liver damage or disease and is a benign condition. Not to mention there is carotenemia from eating too many carrots or squash -- again not kidney/liver damage related.
Joel_Mckay · · focus · HN ↗
[dead]
itishappy · · focus · HN ↗
<a href="https://my.clevelandclinic.org/health/diseases/17661-gilberts-syndrome" rel="nofollow">https://my.clevelandclinic.org/health/diseases/17661-gilbert...
iwontberude · · focus · HN ↗
[dead]
CITIZENDOT · · focus · HN ↗
Joel_Mckay · · focus · HN ↗
The "The Ultimate Blender 3D Sculpting Course" covers several sculpting techniques, and while this course has a number of challenges it does cover several basics. Probably wise to wait for a sale event if interested.
<a href="https://www.udemy.com/course/blender-3d-sculpting-course/" rel="nofollow">https://www.udemy.com/course/blender-3d-sculpting-course/
Best of luck =3
dr_scully · · focus · HN ↗
There is a separate effect of increased bilirubin content, that would appear if someone was ill.
HanClinto · · focus · HN ↗
It's fascinating to learn that melanin and haemoglobin are the two primary factors (and cover the vast majority of cases), but I'm curious how many other illnesses / disorders can produce compounds with visible effects.
Thank you for your posts on this thread -- I appreciate you knowledge-sharing on this!
dr_scully · · focus · HN ↗
numpad0 · · focus · HN ↗
dTal · · focus · HN ↗
Once upon a time, I encountered a sort of interactive museum book called "Earthsearch". One of its "exhibits" was a color wheel, made of two spinnable pieces of tinted acetate, that purported to be able to generate any skin tone. I suppose this is three degrees of freedom, since for any position of the two wheels you could access a range of colors around the edge - but the printed page underneath was simply a grayscale gradient, so one degree of freedom was simply luminance.
The book was released in 1994, and was very confident. It even went as far as to encourage the reader to see a doctor, should their skin tone not be achievable! What color model were they using?
mhink · · focus · HN ↗
dTal · · focus · HN ↗
vector_spaces · · focus · HN ↗
ReactiveJelly · · focus · HN ↗
dr_scully · · focus · HN ↗
But I can’t vouch for the accuracy of the book, but I suspect it was an approximation.
The haemoglobin and melanin are roughly in separate layers of the skin. There is an approximation known as Beer-Lambert that models the skin as two semi-transparent layers. This ignores subsurface scattering, but is roughly correct.
So, in theory two acetate sheets might replicate this. That’s my intuitive opinion. It has been many years since I did this work.
mdnahas · · focus · HN ↗
RIMR · · focus · HN ↗
automatoney · · focus · HN ↗
stephantul · · focus · HN ↗
automatoney · · focus · HN ↗
E-Reverance · · focus · HN ↗
benj111 · · focus · HN ↗
hluska · · focus · HN ↗
ptsneves · · focus · HN ↗
PullJosh · · focus · HN ↗
rrradical · · focus · HN ↗
automatoney · · focus · HN ↗
Joel_Mckay · · focus · HN ↗
<a href="https://kuhantilope.gumroad.com/l/ultimate-skin" rel="nofollow">https://kuhantilope.gumroad.com/l/ultimate-skin
<a href="https://extensions.blender.org/add-ons/mpfb/" rel="nofollow">https://extensions.blender.org/add-ons/mpfb/
<a href="https://github.com/alessandro-zomparelli/tissue" rel="nofollow">https://github.com/alessandro-zomparelli/tissue
ymmv, as some paid plugins actually speed up the funky blender workflow (the auto-Bake plugin by the same author is important for procedural generated textures.)
<a href="https://sanctus.gumroad.com/l/SLibrary?layout=profile" rel="nofollow">https://sanctus.gumroad.com/l/SLibrary?layout=profile
Have a great day =3
bellowsgulch · · focus · HN ↗
There is at least one article published by a technical artist at Pixar who describes modeling a skull within a human scan so that subsurface lighting is more accurately rendered.
I suspect you could combine this with dr_scully’s comment and GolDDranks’ to reach the nuance involved in long tail realism details.
automatoney · · focus · HN ↗
dofm · · focus · HN ↗
The 2.0 “outliers” cover those skin tones.
Masai and some Somali skin tones, similarly, look better represented by the outliers.
The full range of possible human skin tones is perhaps a bit of a challenge for technical colour representation, partly because diffuse reflectance seems to vary so much and that is hard to approximate on screen (e.g. as any website designer could attest, the difference between representing silver and grey is the use of highlights), though the representation of skin tones is a lot better than the early colour film era.
automatoney · · focus · HN ↗
The issue I ran into was what happens when the space moves beyond RGB, but I think the fix is to just add clamps to the end R, G, B values.
efitz · · focus · HN ↗
An albino that consumed too much colloidal silver for years?
hneqy2wqls · · focus · HN ↗
xp84 · · focus · HN ↗
Would love to see this 3-D picker ability in the many character designers out there, instead of the lame 8 swatches or whatever.
barbecue_sauce · · focus · HN ↗
mbo · · focus · HN ↗
I was looking at this a little while ago, and used some of The Pudding's data on makeup/foundation shades (<a href="https://pudding.cool/2018/06/makeup-shades/" rel="nofollow">https://pudding.cool/2018/06/makeup-shades/) and plotted it into the Oklab colorspace (<a href="https://observablehq.com/@55th/foundation-shades" rel="nofollow">https://observablehq.com/@55th/foundation-shades). The shades form themselves into that same crescent as seen in the article.
automatoney · · focus · HN ↗
manoDev · · focus · HN ↗
So even when you get the palette right, to paint it like a believable material in a convincing way is still super hard!
noobahoi · · focus · HN ↗
[dead]
ralusek · · focus · HN ↗
aaroninsf · · focus · HN ↗
but this is just lovely and inspirational work. A unique marriage of hacking in the celebratory sense, thoughtfulness, and meaningful contribution. Outstanding.
automatoney · · focus · HN ↗
drnick1 · · focus · HN ↗
[dead]
s1mon · · focus · HN ↗
It seems like some work was done to research existing approaches, but I don't see any reference to Pantone Skin Tones [0]. Without intending to, I've worked on 3 different projects which involved measuring skin tones for makeup applications. The Pantone range is not 100% perfect, but it's pretty well done and easy to understand. There are two axes: a light/dark one, and red-yellow one [1].
[0] <a href="https://www.pantone.com/na/en-us/skintone" rel="nofollow">https://www.pantone.com/na/en-us/skintone
[1] <a href="https://cosmeticsbusiness.com/pantone-skintone-guide-80945" rel="nofollow">https://cosmeticsbusiness.com/pantone-skintone-guide-80945
ptmkenny · · focus · HN ↗
zild3d · · focus · HN ↗
itishappy · · focus · HN ↗
tialaramex · · focus · HN ↗
The person inviting you to a picnic "next week" might need to know about Time Zones if they live some distance away. The requirement to update the CSS on the web site to match a new company logo might need to know about Colour Spaces. But that picnic invite doesn't care about Calendar systems or Leap Seconds, and the logo mandate doesn't care about Sub-surface scattering or a Quantum theory of light.
richard_chase · · focus · HN ↗
[dead]
dshoemaker · · focus · HN ↗
> It's your art, you can choose whatever skin tones you wish.
This is pretty self evident, no?
richard_chase · · focus · HN ↗
[dead]
DonHopkins · · focus · HN ↗
[dead]
richard_chase · · focus · HN ↗
[dead]
DonHopkins · · focus · HN ↗
[dead]
kentm · · focus · HN ↗
richard_chase · · focus · HN ↗
[dead]
DonHopkins · · focus · HN ↗
[dead]
richard_chase · · focus · HN ↗
[dead]
richard_chase · · focus · HN ↗
uhdozo · · focus · HN ↗
ecesena · · focus · HN ↗
zetanor · · focus · HN ↗
nahidmahmud555 · · focus · HN ↗
[dead]
Sharlin · · focus · HN ↗
Nb. I'd advise against calling the PCA'd space XYZ because that's a well known standard color space: <a href="https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_XYZ_color_space" rel="nofollow">https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_XYZ_c...
dahart · · focus · HN ↗
Pete Shirley (author of Ray Tracing In One Weekend) is also a part time color scientist, and he clued me into the fact that if you crank the saturation to 100% of pictures of people of any race, the skin color comes out orange. I think I heard that some face detectors may work on this principle, but I don’t remember where I heard that.
madcaptenor · · focus · HN ↗
dahart · · focus · HN ↗
So it might not be that surprising that dark skin people turn orange when sat is cranked, but perhaps slightly surprising that light skin people do.
Anyway, I suspect it’s computationally easier to turn everyone orange than brown. Plus, given that brown skin is already a category, orange could be useful terminology/category.
adamhartenz · · focus · HN ↗
jagged-chisel · · focus · HN ↗
mryingster · · focus · HN ↗
<a href="https://www.youtube.com/watch?v=wh4aWZRtTwU" rel="nofollow">https://www.youtube.com/watch?v=wh4aWZRtTwU
a3w · · focus · HN ↗
[dead]
mathgeek · · focus · HN ↗
That’s also subjective. It’s taxonomically a subspecies. I find it best to keep that discussion simple rather than argue the pseudoscience argument.
JuniperMesos · · focus · HN ↗
binaryturtle · · focus · HN ↗
Also it would be one human "species", not "race".
dahart · · focus · HN ↗
I meant race. We’re only talking about skin color here.
“Today, race refers to a group sharing some outward physical characteristics and some commonalities of culture and history. Ethnicity refers to markers acquired from the group with which one shares cultural, traditional, and familial bonds.”
<a href="https://www.merriam-webster.com/grammar/difference-between-race-and-ethnicity" rel="nofollow">https://www.merriam-webster.com/grammar/difference-between-r...
Race does exist (as does racism, unfortunately), and Wikipedia does have a page on race, as does any dictionary you choose. It would be a fair point that people should be sensitive to which word they choose based on context, and race is sometimes not the right word, but in this case it is the better choice, and the distinction in this context between race and ethnicity isn’t super relevant.
jhgb · · focus · HN ↗
stu2b50 · · focus · HN ↗
When you’re actually painting, skin can really be any color. Blue is a perfectly valid (and fairly common) skin color - just look at someone in the moonlight. It takes two to tango, and the other dancer is the light source.
JacobAsmuth · · focus · HN ↗
kaitlinseng · · focus · HN ↗
xdennis · · focus · HN ↗
[dead]
BHSPitMonkey · · focus · HN ↗
mkesper · · focus · HN ↗
peepsick · · focus · HN ↗
rebuilder · · focus · HN ↗
1-6 · · focus · HN ↗
juleiie · · focus · HN ↗
[dead]
szvsw · · focus · HN ↗
<a href="https://canopycanopycanopy.com/contents/color-goes-electric" rel="nofollow">https://canopycanopycanopy.com/contents/color-goes-electric
The Kodak “Shirley cards” and test shots are of course famous in the media theory world for how they baked notions of race and “standard” or “normal” conditions into the medium of photography. Not dissimilar from the various discussions around facial recognition from approximately 10 yr ago.
analog31 · · focus · HN ↗
<a href="https://econocrafts.com/products/crayola-colors-of-the-world-crayons-8-colors" rel="nofollow">https://econocrafts.com/products/crayola-colors-of-the-world...
kazinator · · focus · HN ↗
nullsanity · · focus · HN ↗
[dead]
Roselol · · focus · HN ↗
[dead]
fenestella · · focus · HN ↗
[dead]
zestyping · · focus · HN ↗
From the way the article is written, it sounds like you presented yourself with a bunch of faces of completely random colours and then manually sorted them into two categories, "plausible skin colour" and "implausible skin colour".
But I feel like I must be misunderstanding, because I don't see why you would do that. Why wouldn't you gather photographs of actual faces and sample colours directly from the photos?
herf · · focus · HN ↗
The JS code seems to output linear RGB directly to the webpage (missing gamma). I guess the difficulty with "adding gamma" to it is this: if the training data were also gamma encoded, then it might need to be refit with linear values.
jademcd · · focus · HN ↗
[dead]
BLACKCRAB · · focus · HN ↗
[dead]
mediumdeviation · · focus · HN ↗
[dead]