animate1978 / MB-Lab

MB-Lab is a character creation tool for Blender 4.0 and above, based off ManuelBastioniLAB
Other
1.83k stars 315 forks source link

Improved Randomization #223

Open torridgristle opened 4 years ago

torridgristle commented 4 years ago

Currently the random generator uses plain random numbers, but I've found that using the normal distribution random number generator from random.py results in more interesting characters. Instead of (I assume) having values that are all equally spaced within a range, it instead tends to favor the average but a few things change more than others, where large values are less common than small, rather than all being equally common. I don't have the code on hand but it was using 0.5 as the median and the sigma values I came up with to get half of the distribution within the original limits wasn't far off from the original random values for Light through Extreme. I'm planning on adding a smooth min and max to clamp the values within 0-1 instead of a hard min / max which should look nice. Also I added different scaling of the random values for the head and jaw since those seemed to look "distorted" earlier than others.

animate1978 commented 4 years ago

That sounds pretty cool actually. I cannot wait to see this in action

torridgristle commented 4 years ago

Sigma for 1/2 results meeting the old range: LI: 0.042 RE: 0.085 NO: 0.170 CA: 0.255 EX: 0.425

Hopefullyidontgetbanned commented 4 years ago

Having a parameter based randomizer would help with crowd generation too, such as average to extreme features.