Finish the head prototype: forehead slope, brow step, jaw step, defined ear helix/lobe
This commit is contained in:
1 parent
00bd197173
commit
b386a21173
3 files changed
+30
-17
No files matched your search
+18
-7
@@ -116,6 +116,8 @@ def _head_proto(mats, spec):
|
||||
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 z > 1.70:
|
||||
v.co.y += (z - 1.70) * 0.35 # 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
|
||||
@@ -124,6 +126,11 @@ def _head_proto(mats, spec):
|
||||
for v in bm.verts:
|
||||
x, y, z = v.co
|
||||
ax = abs(x)
|
||||
# --- brow step: a clear ridge where the forehead meets the nose ---
|
||||
brow = (max(0.0, 1.0 - abs(z - 1.695) / 0.022)
|
||||
* max(0.0, 1.0 - abs(ax - 0.050) / 0.045))
|
||||
if brow > 0:
|
||||
v.co.y -= 0.016 * 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)
|
||||
@@ -148,9 +155,9 @@ def _head_proto(mats, spec):
|
||||
if chin > 0:
|
||||
v.co.y -= 0.030 * chin
|
||||
# jaw step: recess just below the chin so it reads as a chin-to-neck
|
||||
step = max(0.0, 1.0 - abs(z - 1.516) / 0.014)
|
||||
step = max(0.0, 1.0 - abs(z - 1.516) / 0.016)
|
||||
if step > 0:
|
||||
v.co.y += 0.012 * step
|
||||
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:
|
||||
@@ -159,17 +166,21 @@ def _head_proto(mats, spec):
|
||||
v.co.y -= 0.014 # upper lip
|
||||
if abs(z - 1.577) < 0.010:
|
||||
v.co.y -= 0.018 # fuller lower lip
|
||||
# --- ears: extrude outward with a concha recess, lower (brow-to-nose band) ---
|
||||
# --- ears: helix rim + 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)
|
||||
near = abs(x) - 0.138
|
||||
sign = 1.0 if x >= 0 else -1.0
|
||||
if -0.02 < near < 0.055 and r < 1.0:
|
||||
if r < 0.35:
|
||||
v.co.x -= 0.016 * (1.0 - r / 0.35) * sign # concha recess (inward)
|
||||
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 # concha recess (inward)
|
||||
else:
|
||||
v.co.x += 0.034 * (1.0 - r) * sign # helix rim outward
|
||||
v.co.x += 0.045 * (1.0 - r) * sign # helix rim outward
|
||||
# lobe: a distinct bump at the lower front of the ear
|
||||
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
|
||||
bm.normal_update()
|
||||
bm.to_mesh(head.data)
|
||||
bm.free()
|
||||
|
||||
Reference in new issue
Block a user