Mathematical Formula For Picking Realistic Hair and Eye Colors
cwurts:
For hair colors:
1) choose random number x from (1 to 206); Green = x+39
2) choose random number y from (0 to 100); Blue = (102 - ABS(142-Green)) * y / 100
3) choose random number z from (0 to 80); Red = (102 - ABS(142-Green)) * 0.4 + z + Green
This gives a good range of black, brown, red and blonde hair colors, without any nonsense. Red is a bit more prominent than I'd like, but that's okay. I'm hoping someone will add this function as a randomize button in CAS, but all I can do is hope....
My apologies - I made a huge mistake here with the hair colors. Here is the real formula:
1) choose random number x from (0..1); Red = x*255
2) choose random number y from (0..1); Green = (y*0.2083+0.625)*Red
3) choose random number z from (0..1); Blue = 0.88*y*z*Green
For eye colors:
1) choose random number x from (0 to 223); Blue = x
2) choose random number y from (1 to 2);
3) choose random number z from (0 to 223/y); Red = z; Green = z*y
4) Flip a coin - if tails, switch the red and green values
This gives blues, golds, and any range between brown and green.
Moryrie:
You have way too much time on your hands.
J. M. Pescado:
Now if you can make those distributions match the real-world results, you'll be onto something.
jezzer:
Quote from: Moryrie on 2010 July 03, 04:21:39
You have way too much time on your hands.
This is the same guy whose greatest hits include "Rainy Day Activities! Come Help Me Sort Over 9000 Pointless Job Titles!" and "Get Me to the Grocery, I Like to Micromanage My Entire Sims 3 Neighborhood At Once". I'm not really shocked that his latest offering is "Let's Suck All the Fun Out of Create-a-Sim!"
J. M. Pescado:
I think this was more aimed for use by modders than use by players. It also has no relevance to the actual gameplay itself, so I am moving this out of Facts and Strategery, as it does not represent a usable strategery.
Navigation
[0] Message Index
[#] Next page