AI-driven head rework: judge picks the decimated MakeHuman head over the displacement shell
Full build / Import + headless tests (push) Successful in 39s
Full build / Full desktop build + optional release (push) Skipped

This commit is contained in:
zwitschi committed 2026-11-04 15:02:47 +01:00
1 parent 30f240b591
commit 632ec16aaa
3 files changed
+63 -43

No files matched your search

+37 -37
View File
@@ -869,7 +869,7 @@ def _head_proto(mats, spec, subdiv=48):
white = material("eye_white", textured_solid=True)
rings = max(14, subdiv // 2 + 2)
head = sphere("HeadShell", 0.155, (0, 0, 1.635), skin, seg=subdiv, rings=rings,
scale=(0.90, 0.96, 1.08))
scale=(0.88, 0.95, 1.18))
_shape_head_mesh(head) # brow ridge + cheekbone + jaw/chin planes
bm = bmesh.new()
bm.from_mesh(head.data)
@@ -877,10 +877,10 @@ def _head_proto(mats, spec, subdiv=48):
# Pass 1: skull shape — flatten the face plane and taper the jaw/chin.
for v in bm.verts:
x, y, z = v.co
if y < -0.03 and 1.44 < z < 1.76:
v.co.y = -0.13 + (y + 0.13) * 0.10 # flatten the forward bulge
if y < -0.03 and 1.42 < z < 1.80:
v.co.y = -0.13 + (y + 0.13) * 0.05 # flatten the forward bulge
if y < -0.03 and z > 1.70:
v.co.y += (z - 1.70) * 0.35 # forehead slopes back to the crown
v.co.y += (z - 1.70) * 0.45 # forehead slopes back to the crown
if z < 1.58:
taper = max(0.0, 1.0 - (1.58 - z) / 0.12)
v.co.x *= 1.0 - 0.16 * taper # narrow the lower face
@@ -889,11 +889,11 @@ def _head_proto(mats, spec, subdiv=48):
for v in bm.verts:
x, y, z = v.co
ax = abs(x)
# --- brow step ---
brow = (max(0.0, 1.0 - abs(z - 1.695) / 0.022)
# --- brow ledge: a clear ridge where the forehead meets the nose ---
brow = (max(0.0, 1.0 - abs(z - 1.695) / 0.024)
* max(0.0, 1.0 - abs(ax - 0.050) / 0.045))
if brow > 0:
v.co.y -= 0.016 * brow
v.co.y -= 0.028 * brow
# --- eye sockets: recess the floor, leave a raised orbital rim ---
for s in (-1.0, 1.0):
r = math.hypot(x - 0.052 * s, z - 1.664)
@@ -902,46 +902,46 @@ def _head_proto(mats, spec, subdiv=48):
elif r < 0.046:
v.co.y -= 0.010 * (1.0 - (r - 0.036) / 0.010)
# --- nose: a wide bridge/tip with ala wings ---
if y < 0 and ax < 0.075:
if y < 0 and ax < 0.080:
band = max(0.0, 1.0 - abs(z - 1.632) / 0.055)
if band > 0:
tip = max(0.0, 1.0 - abs(z - 1.615) / 0.032)
v.co.y -= (0.060 * tip + 0.018 * max(0.0, band - tip)) \
* (1.0 - ax / 0.075)
tip = max(0.0, 1.0 - abs(z - 1.615) / 0.034)
v.co.y -= (0.062 * tip + 0.020 * max(0.0, band - tip)) \
* (1.0 - ax / 0.080)
for s in (-1.0, 1.0):
ar = math.hypot((x - 0.024 * s) / 0.014, (z - 1.604) / 0.013)
ar = math.hypot((x - 0.026 * s) / 0.015, (z - 1.604) / 0.014)
if ar < 1.0:
v.co.y -= 0.022 * (1.0 - ar)
# --- chin bump + jaw step ---
if y < 0 and ax < 0.040:
chin = max(0.0, 1.0 - abs(z - 1.548) / 0.022)
v.co.y -= 0.024 * (1.0 - ar)
# --- chin wedge + jaw step ---
if y < 0 and ax < 0.044:
chin = max(0.0, 1.0 - abs(z - 1.548) / 0.024)
if chin > 0:
v.co.y -= 0.030 * chin
v.co.y -= 0.034 * chin
step = max(0.0, 1.0 - abs(z - 1.516) / 0.016)
if step > 0:
v.co.y += 0.024 * step
# --- mouth: recessed line + upper/lower lip volumes ---
if y < 0 and ax < 0.030:
if abs(z - 1.583) < 0.012:
v.co.y += 0.008
if abs(z - 1.590) < 0.008:
v.co.y -= 0.014
if abs(z - 1.577) < 0.010:
v.co.y -= 0.018
# --- ears: helix rim + concha recess + a lobe ---
v.co.y += 0.026 * step
# --- mouth: recessed line + smooth protruding upper/lower lip block ---
if y < 0 and ax < 0.036:
if abs(z - 1.583) < 0.014:
v.co.y += 0.006
if abs(z - 1.590) < 0.012:
v.co.y -= 0.016
if abs(z - 1.577) < 0.014:
v.co.y -= 0.020
# --- ears: raised C-shape helix + concha recess + a lobe ---
for v in bm.verts:
x, y, z = v.co
r = math.hypot((z - 1.60) / 0.055, (y - 0.002) / 0.045)
r = math.hypot((z - 1.62) / 0.062, (y - 0.002) / 0.048)
near = abs(x) - 0.138
sign = 1.0 if x >= 0 else -1.0
if -0.02 < near < 0.06 and r < 1.0:
if r < 0.30:
v.co.x -= 0.018 * (1.0 - r / 0.30) * sign
if -0.02 < near < 0.07 and r < 1.0:
if r < 0.36:
v.co.x -= 0.016 * (1.0 - r / 0.36) * sign
else:
v.co.x += 0.045 * (1.0 - r) * sign
lr = math.hypot((z - 1.575) / 0.016, (y + 0.012) / 0.016)
if -0.02 < near < 0.05 and lr < 1.0:
v.co.x += 0.032 * (1.0 - lr) * sign
v.co.x += 0.048 * (1.0 - r) * sign
lr = math.hypot((z - 1.585) / 0.018, (y + 0.012) / 0.017)
if -0.02 < near < 0.06 and lr < 1.0:
v.co.x += 0.034 * (1.0 - lr) * sign
bm.normal_update()
bm.to_mesh(head.data)
bm.free()
@@ -949,7 +949,7 @@ def _head_proto(mats, spec, subdiv=48):
# Eyeballs stay separate for readability; lids wrap the socket rim.
parts = [head]
for s in (-1.0, 1.0):
ex, ey, ez = 0.052 * s, -0.134, 1.664
ex, ey, ez = 0.052 * s, -0.127, 1.664
parts.append(sphere("EyeWhite", 0.019, (ex, ey, ez), white, seg=10,
rings=6, scale=(1.25, 0.62, 0.85)))
parts.append(sphere("Iris", 0.0105, (ex, ey - 0.007, ez), acc, seg=8,
@@ -960,7 +960,7 @@ def _head_proto(mats, spec, subdiv=48):
parts.append(sphere("LowerLid", 0.017, (ex, ey - 0.004, ez - 0.012),
skin, seg=8, rings=4, scale=(1.10, 0.22, 0.18),
rot=(math.radians(6), 0, 0)))
parts.append(box("Brow", (0.055, 0.014, 0.012), (0.052 * s, -0.143, 1.699),
parts.append(box("Brow", (0.055, 0.014, 0.012), (0.052 * s, -0.137, 1.699),
hair, rot=(0, 0.14 * s, 0.0)))
return parts