Add reviewed MakeHuman head prototype (vision gate rejected)

This commit is contained in:
zwitschi committed 2026-11-04 17:04:20 +01:00
1 parent d1898b3221
commit 958d3ae0ff
13 files changed
+197 -14

No files matched your search

+24 -8
View File
@@ -968,11 +968,12 @@ def _head_proto(mats, spec, subdiv=48):
def _makehuman_head(mats, spec):
"""MakeHuman head shape plus the project's eye/mouth/brow pieces.
The AI-judged head rework (2026-11-04) picked the decimated MakeHuman head
over the displacement shell: it keeps the nose/chin/jaw landmarks at 1,573
tris. The MakeHuman mesh has no eyeballs, so the project's sclera/iris/lid/
brow pieces are added at the MakeHuman landmarks (eyes ≈ ±0.052, −0.160,
1.664) for readability. Blender Z-up, face front −Y.
The AI-judged head rework (2026-11-04) picked the MakeHuman head over the
displacement shell: it keeps the nose/chin/jaw landmarks. Newer part builds
carry their own embedded eye/iris/pupil/mouth geometry, so those materials
are preserved; the older shell-only asset still gets the project's
sclera/iris/lid/brow pieces added at the MakeHuman landmarks. Blender Z-up,
face front −Y.
"""
skin, acc, hair = mats["skin"], mats["accessory"], mats["hair"]
white = material("eye_white", textured_solid=True)
@@ -991,9 +992,24 @@ def _makehuman_head(mats, spec):
if head is None:
raise SystemExit(f"no head mesh in {src}")
head.name = "HeadShell"
# The decimated MakeHuman "hair" scalp slot reads as shaggy shards; collapse
# the head to one skin slot so the join does not collide with the body's
# cloth/pants slots (the project `_hair` cap provides hair later).
# Newer MakeHuman part builds carry their own eye/mouth/brow materials and
# geometry. Use those instead of adding the project's primitive face pieces
# a second time; only the old shell-only asset falls through to that path.
embedded = {m.name.split(".")[0] for m in head.data.materials if m}
if "eye_white" in embedded:
# Preserve the embedded iris/pupil/mouth materials; only map the
# project contract slots onto the imported head.
remap = {"skin": skin, "eye_white": white, "hair": hair}
for index, mat in enumerate(list(head.data.materials)):
if mat:
target = remap.get(mat.name.split(".")[0])
if target is not None:
head.data.materials[index] = target
return [head]
# The old decimated MakeHuman "hair" scalp slot reads as shaggy shards;
# collapse the head to one skin slot so the join does not collide with the
# body's cloth/pants slots (the project `_hair` cap provides hair later).
head.data.materials.clear()
head.data.materials.append(skin)
# Clean the ragged neck cut left by the Head-group extraction: bisect below