Random Faces Generator
Generate unique procedural human faces with customizable features. Create avatar portraits using algorithmic face synthesis with seed-based reproducibility.
About
Procedural face generation constructs human-like portraits from parameterized geometric primitives. Each face is a deterministic function of a seed value s, mapped through a pseudo-random number generator (Mulberry32) to produce 30+ independent feature parameters: cranial aspect ratio, orbital spacing, nasal bridge angle, labial curvature, and chromatic values in HSL space. Mismatched proportions - eyes placed outside the golden ratio zone of 0.38 - 0.42 of head height - trigger uncanny valley responses. This tool enforces anatomically plausible constraints while preserving visual diversity across 232 possible seed states.
The generator produces faces suitable for placeholder avatars, game character prototyping, and UI mockups. It approximates facial geometry using cubic BΓ©zier curves and elliptical arcs. Limitation: output is stylized, not photorealistic. Skin tones span hue range H β [15Β°, 45Β°] with saturation and lightness varied independently. Hair and eye colors are sampled from curated palettes to avoid implausible combinations. Pro tip: note the seed value if you need to regenerate an identical face later.
Formulas
Each face is generated from a seed s using a Mulberry32 pseudo-random number generator. The PRNG state advances sequentially, producing feature parameters pi normalized to the unit interval.
t = (t β (t >>> 15)) Γ (t | 1)
t = t β ((t β (t >>> 7)) Γ (t | 61))
return ((t β (t >>> 14)) >>> 0) Γ· 232
Each raw random value r β [0, 1) is scaled to a feature range:
Where mini and maxi are the anatomically constrained bounds for feature i. Facial geometry is rendered using quadratic and cubic BΓ©zier curves on an HTML Canvas. Skin color is computed in HSL space:
H β [15Β°, 45Β°], S β [25%, 75%], L β [35%, 85%]
Where H = hue (warm skin range), S = saturation (melanin proxy), L = lightness (reflectance). The total parameter space yields approximately 232 ≈ 4.29 Γ 109 unique face configurations.
Reference Data
| Feature | Parameters | Range | Anatomical Basis |
|---|---|---|---|
| Head Shape | Width/Height Ratio | 0.70 - 0.95 | Cephalic index norms |
| Eye Position | Vertical placement | 0.38 - 0.45 of head height | Golden ratio midline |
| Eye Spacing | Inter-pupillary distance | 0.28 - 0.38 of head width | Average adult IPD |
| Eye Size | Iris radius, sclera width | 0.06 - 0.12 of head width | Palpebral fissure norms |
| Nose Width | Alar base width | 0.15 - 0.30 of head width | Nasal index classification |
| Nose Length | Bridge to tip | 0.12 - 0.22 of head height | Nasion-to-subnasale ratio |
| Mouth Width | Commissure span | 0.25 - 0.45 of head width | Proportional to IPD |
| Mouth Curve | Lip curvature coefficient | β0.3 - 0.5 | Positive = smile, Negative = frown |
| Eyebrow Arch | Peak height, thickness | 0.1 - 0.4 arch ratio | Supraorbital ridge geometry |
| Skin Tone (Hue) | HSL Hue channel | 15Β° - 45Β° | Fitzpatrick scale I - VI |
| Skin Tone (Saturation) | HSL Saturation | 25% - 75% | Melanin concentration proxy |
| Skin Tone (Lightness) | HSL Lightness | 35% - 85% | Reflectance measurement |
| Hair Style | Style index | 12 predefined styles | Common hairstyle archetypes |
| Hair Color | HSL triplet | 8 curated palettes | Eumelanin/pheomelanin ratios |
| Eye Color | Iris HSL | 6 natural palettes | Rayleigh scattering + pigment |
| Glasses | Style, probability | 30% occurrence rate | Population wearing rate |
| Facial Hair | Style, density | 5 styles, 25% rate | Adult male distribution |
| Face Shape | Jawline curvature | 5 archetypes (oval, round, square, heart, oblong) | Anthropometric classification |
| Ear Size | Height ratio | 0.08 - 0.14 of head height | Auricular proportion |
| Chin Shape | Projection, width | 0.05 - 0.15 projection | Mentolabial fold depth |