A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
feat(art): preserve Qinglan native sculpt revision and comparison
yhhafad79a9b4c4
diff --git a/art/characters/qinglan/README.md b/art/characters/qinglan/README.mdindex 5c6163ff4..4cd2974b6 100644--- a/art/characters/qinglan/README.md+++ b/art/characters/qinglan/README.md@@ -4,7 +4,9 @@用户已否决 `face-study-v3` 的脸部效果。该版本保留用于定位变形问题和回退,不应作为后续细节制作的造型基础;见 [脸部审查记录](face-study-v3/review/art-review.json)。网格与导出检查通过不能代表人物造型合格。-最新脸部候选位于 [face-study-v5](face-study-v5/README.md)。本版改用 Blender 官方 CC0 女性基网格,实际接入 Scenario 的 Blender、雕刻与拓扑技能,保留原作者的多级雕刻数据及分区可撤销修改。当前仍需继续修正五官气质与参考接近程度,未进入服装或精细表面制作。+最新脸部候选位于 [face-study-v6](face-study-v6/README.md)。本版在用户打开的 Blender 中通过 MCP 调用原生 Grab 与 Smooth 笔刷,保留 V5 来源和三组可回退的局部雕刻修改,并提供同机位前后对照。当前仍需继续修正五官气质与参考接近程度。++[face-study-v5](face-study-v5/README.md) 保留 Blender 官方 CC0 女性基网格来源、原作者的多级雕刻数据,以及 Scenario Blender、雕刻与拓扑技能的接入记录。此前的人体版本保留了参数化人体来源、手臂姿态、眉毛及睫毛试作。相关文件用于过程记录;最新 V5 是独立脸部候选,下方完整角色与导出说明对应此前版本。@@ -12,7 +14,8 @@| 文件 | 用途 || --- | --- |-| `face-study-v5/qinglan-face-candidate.blend` | 最新可编辑脸部候选、11 个分区形态键及灰模/拓扑检查;尚未美术验收 |+| `face-study-v6/qinglan-live-face.blend` | 最新实时雕刻候选、3 个原生笔刷修订形态键及前后对照;尚未美术验收 |+| `face-study-v5/qinglan-face-candidate.blend` | V5 脸部来源、11 个分区形态键及灰模/拓扑检查;尚未美术验收 || `qinglan-human-study.blend` | 完整人体与独立头部检查场景;灰色区域是检查材质,不是服装网格 || `qinglan-highpoly.blend` | 带完整衣饰、头发、佩剑的高模,保留多级细分、曲线和来源集合 || `export/qinglan-static.glb` | 12 个语义部件的静态检查模型,包含贴图 |diff --git a/art/characters/qinglan/face-study-v5/README.md b/art/characters/qinglan/face-study-v5/README.mdindex ae968359d..4f70be881 100644--- a/art/characters/qinglan/face-study-v5/README.md+++ b/art/characters/qinglan/face-study-v5/README.md@@ -23,7 +23,7 @@头部渲染检查的通过仅覆盖网格交付项目,不表示角色已美术验收,也不表示已完成面部表情、闭眼、口腔变形、眼部材质、游戏运行时导出或 Estella 验收。高密度自交检查与低模口腔相接部位需要单独复核,详见检查文件;本版不能作为可发布游戏角色。-控制网格的交叉面逐对与原始基网格对比:原始 57 对,本版 55 对,新增 0 对。剩余相接不是清理完成的证据。高密度网格的自交检查因密度限制未执行;其检查报告中的 `null` 表示未检查。开放颈部边界仅作为头部连接处,尚未制作最终胸像切面。+控制网格的 BVH 重叠候选面逐对与原始基网格对比:原始 57 对,本版 55 对,新增 0 对。这些候选计数未经三角面求交确认,不能直接解释为实际穿插,也不是清理完成的证据。高密度网格的自交检查因密度限制未执行;其检查报告中的 `null` 表示未检查。开放颈部边界仅作为头部连接处,尚未制作最终胸像切面。目前与参考的差距仍包括眼睑气质、鼻唇细腻程度和整体身份特征。该版本的目的在于提供可靠且可回退的脸部来源,不推进衣饰、毛孔或其他表面细节来掩盖这些差距。diff --git a/art/characters/qinglan/face-study-v6/README.md b/art/characters/qinglan/face-study-v6/README.mdnew file mode 100644index 000000000..9b2082567--- /dev/null+++ b/art/characters/qinglan/face-study-v6/README.md@@ -0,0 +1,34 @@+# 青岚 · V6 实时雕刻候选++本版在用户已打开的 Blender 5.2.1 LTS 中,通过 Blender MCP 实际调用原生 `bpy.ops.sculpt.brush_stroke`,使用 Grab 与 Smooth 修整眼睑、鼻底和鼻唇过渡。没有使用 computer use。依然是脸部候选,未通过仙侠角色的造型验收。++## 编辑来源++打开 `qinglan-live-face.blend`,编辑 `Qinglan_Live_Sculpt`。其 Basis 来自 V5 的实际 Multires 表面,保留 243,328 个四边面和三个独立的局部雕刻形态键。形态键可分别关闭;将全部新键设为零可恢复 V5 头部表面。++`Qinglan_Head_Multires` 是隐藏保留的 V5 控制网格来源,其 11 个旧形态键和原作者 Multires 数据仍在。新雕刻尚未回传到该低分辨率控制网格,也未完成表情拓扑或蒙皮。++眼球、虹膜及瞳孔另外保留来源与调整形态键,用于眼睑贴合。这些调整是网格数据修改,未计作雕刻笔刷成果。相机、照明和中性材质保持一致;前后比较图同时包含雕刻与眼部几何调整。++## 检查记录++- `review/before-after.png`:相同相机、灯光和材质下的修改前后正面、侧面、三分之四对照。+- `review/after-low.png`:低角度鼻底与眼睑检查。+- `review/native-brush-log.json`:每笔的工具、世界坐标、尺寸、强度、实际移动点数和最大位移;回退的试笔有明确标记。+- `review/eye-fit.json`:眼球与虹膜几何调整。+- `review/post-sculpt-protection.json`:雕刻后恢复口内连接处顶点的保护范围;这一部分原生笔刷位移没有全部保留。+- `review/verification.json`:重开文件后的形态键求值、表面审查及局部交叉检查。++本机实时调用需要显式更新 `RegionView3D.update()`,并显式设置 Sculpt 的统一笔刷尺寸。仅填写笔画元素的 `size` 会被当前统一设置覆盖。这两项修正在 `scripts/live_sculpt.py` 中保留。++原生操作返回 `FINISHED` 只证明执行成功。渲染检查、局部几何检查也不能替代美术验收。当前仍需继续修正脸型、眼神与鼻唇的精致程度;未完成游戏导出、表情、骨骼、Estella 或设备验收。++交叉检查先取 BVH 候选,再在毫米尺度、局部原点附近计算线段与三角面的交点,避免高密度小三角面落入固定浮点容差。检查范围是脸部局部网格,原始来源的口内交叉仍保留;相切、共面重叠以及其余高密度表面不在该专项结论内。++## 重现检查++`scripts/live_sculpt.py` 供已连接的 Blender 会话导入调用,不能在后台重放原生笔刷。原生笔画已保存在形态键与日志中。++`scripts/review_saved.py` 可用 Blender 后台 CLI 检查与渲染保存的副本,不会打开可见窗口;附加 `-- --audit-only` 仅做几何检查。`scripts/compose_review.py` 使用 Matplotlib 排列原始渲染图,不对脸部图像做修补。++来源与授权沿用 [V5 资产记录](../face-study-v5/provenance.json):Blender 官方 Human Base Meshes v1.4.1 中 Dan Ulrich 的 CC0 女性基网格。技能版本为 Scenario `d44410f058991f677ccf733a8e86ce95110857eb`。diff --git a/art/characters/qinglan/face-study-v6/provenance.json b/art/characters/qinglan/face-study-v6/provenance.jsonnew file mode 100644index 000000000..effd871ff--- /dev/null+++ b/art/characters/qinglan/face-study-v6/provenance.json@@ -0,0 +1,43 @@+{+ "asset": "Qinglan V6 live sculpt candidate",+ "status": "needs_art_revision",+ "source": {+ "file": "../face-study-v5/qinglan-face-candidate.blend",+ "sha256": "19f5e9271b7b51d1ed9879425b7cb9a2d5609063324f89fe10a68c848b71613d",+ "license_record": "../face-study-v5/provenance.json",+ "original_author": "Dan Ulrich / Blender Human Base Meshes v1.4.1",+ "original_asset_license": "CC0-1.0",+ "reference": "../references/qinglan-face-target.png"+ },+ "execution": {+ "modeling": "User-opened Blender 5.2.1 LTS GUI session through Blender MCP",+ "addon_version": [1, 6],+ "protocol_version": 5,+ "native_operator": "bpy.ops.sculpt.brush_stroke",+ "native_brushes": ["Grab", "Smooth"],+ "kept_brush_passes": 9,+ "reverted_trial_passes": 6,+ "computer_use": false,+ "review": "Saved copy audited and rendered by headless Blender CLI",+ "eye_geometry": "Direct reversible mesh shape keys; explicitly separate from native brush passes",+ "post_sculpt_protection": "Native nose/lip deltas below world Z 1.530 m are restored to the source, with a smooth transition to full sculpt delta at 1.537 m. See review/post-sculpt-protection.json."+ },+ "skills": {+ "repository": "https://github.com/scenario-labs/skills",+ "revision": "d44410f058991f677ccf733a8e86ce95110857eb",+ "names": ["scenario-blender-expert", "scenario-blender-sculpting", "scenario-blender-retopology"],+ "live_helpers_used": ["bx_gui.set_view", "bx_gui.stroke", "bx_sculpt.expert_brush"],+ "session_corrections": [+ "Explicit RegionView3D.update after view changes",+ "Explicit unified Sculpt brush diameter; stroke payload size alone did not override the user's existing unified size"+ ]+ },+ "reversibility": {+ "head_source_preserved": "Hidden Qinglan_Head_Multires retains V5 control geometry and original Multires detail",+ "live_surface": "Qinglan_Live_Sculpt",+ "baseline": "Basis_V5_Evaluated",+ "head_keys": ["01_Lid_Refinement", "02_Nose_Lip_Refinement", "03_Upper_Lid_Fit"],+ "eyes": "Separate source and fit keys on eye globes, iris patches and pupil patches",+ "low_poly_transfer": "Not performed"+ }+}diff --git a/art/characters/qinglan/face-study-v6/qinglan-live-face.blend b/art/characters/qinglan/face-study-v6/qinglan-live-face.blendnew file mode 100644index 000000000..5c1333f29Binary files /dev/null and b/art/characters/qinglan/face-study-v6/qinglan-live-face.blend differdiff --git a/art/characters/qinglan/face-study-v6/review/after-front.png b/art/characters/qinglan/face-study-v6/review/after-front.pngnew file mode 100644index 000000000..f9ff89cdeBinary files /dev/null and b/art/characters/qinglan/face-study-v6/review/after-front.png differdiff --git a/art/characters/qinglan/face-study-v6/review/after-low.png b/art/characters/qinglan/face-study-v6/review/after-low.pngnew file mode 100644index 000000000..21088c84fBinary files /dev/null and b/art/characters/qinglan/face-study-v6/review/after-low.png differdiff --git a/art/characters/qinglan/face-study-v6/review/after-profile.png b/art/characters/qinglan/face-study-v6/review/after-profile.pngnew file mode 100644index 000000000..6714d6abdBinary files /dev/null and b/art/characters/qinglan/face-study-v6/review/after-profile.png differdiff --git a/art/characters/qinglan/face-study-v6/review/after-threequarter.png b/art/characters/qinglan/face-study-v6/review/after-threequarter.pngnew file mode 100644index 000000000..86a2c0091Binary files /dev/null and b/art/characters/qinglan/face-study-v6/review/after-threequarter.png differdiff --git a/art/characters/qinglan/face-study-v6/review/art-review.json b/art/characters/qinglan/face-study-v6/review/art-review.jsonnew file mode 100644index 000000000..966229188--- /dev/null+++ b/art/characters/qinglan/face-study-v6/review/art-review.json@@ -0,0 +1,31 @@+{+ "asset": "qinglan-live-face.blend",+ "status": "needs_revision",+ "user_approved": false,+ "stage": "Local native-brush iteration on the V5 face source",+ "reviewed_views": ["front", "profile", "threequarter", "low"],+ "comparison": "before-after.png",+ "visible_result": [+ "Upper lids cover more of the iris and the outer orbital transition is less abrupt than the rejected first brush trial.",+ "The nasal base and upper lip have small local changes; the source face remains visually dominant.",+ "Iris and pupil geometry were adjusted separately, so the eye appearance change is not all attributable to sculpting."+ ],+ "remaining_art_issues": [+ "The face still lacks the intended delicate xianxia identity.",+ "Eye expression, brow forms and nose-to-lip relationship need further coordinated shaping.",+ "Jaw and cheek transitions remain firmer than the design reference.",+ "Neutral gray material does not establish final skin, eyebrow or eyelash quality."+ ],+ "revision_handling": {+ "reverted": "Six initial native brush passes were reverted after visible canthal creases and a unified-size override were identified.",+ "retained": "Nine subsequent native brush passes contribute to three independent high-resolution shape keys.",+ "post_sculpt_protection": "Nose/lip deltas near the internal mouth seam were attenuated to zero using the documented protection mask; source interior vertices were restored."+ },+ "technical_limits": [+ "The source contains existing mouth-region crossings; this is not a cleaned production head.",+ "The additional intersection check covers the selected face patch, with tangencies and coplanar overlap excluded.",+ "Live high-resolution sculpt changes have not been transferred back to the low-resolution source cage.",+ "No facial expressions, blink, rig, skinning, game export or Estella acceptance were completed."+ ],+ "next_work": "Continue face identity and mouth-interior cleanup before moving to hair, clothing or skin detail."+}diff --git a/art/characters/qinglan/face-study-v6/review/before-after.png b/art/characters/qinglan/face-study-v6/review/before-after.pngnew file mode 100644index 000000000..5a87128d8Binary files /dev/null and b/art/characters/qinglan/face-study-v6/review/before-after.png differdiff --git a/art/characters/qinglan/face-study-v6/review/before-front.png b/art/characters/qinglan/face-study-v6/review/before-front.pngnew file mode 100644index 000000000..e398a976eBinary files /dev/null and b/art/characters/qinglan/face-study-v6/review/before-front.png differdiff --git a/art/characters/qinglan/face-study-v6/review/before-low.png b/art/characters/qinglan/face-study-v6/review/before-low.pngnew file mode 100644index 000000000..233288a46Binary files /dev/null and b/art/characters/qinglan/face-study-v6/review/before-low.png differdiff --git a/art/characters/qinglan/face-study-v6/review/before-profile.png b/art/characters/qinglan/face-study-v6/review/before-profile.pngnew file mode 100644index 000000000..34589a83bBinary files /dev/null and b/art/characters/qinglan/face-study-v6/review/before-profile.png differdiff --git a/art/characters/qinglan/face-study-v6/review/before-threequarter.png b/art/characters/qinglan/face-study-v6/review/before-threequarter.pngnew file mode 100644index 000000000..296298a54Binary files /dev/null and b/art/characters/qinglan/face-study-v6/review/before-threequarter.png differdiff --git a/art/characters/qinglan/face-study-v6/review/eye-fit.json b/art/characters/qinglan/face-study-v6/review/eye-fit.jsonnew file mode 100644index 000000000..148932f6c--- /dev/null+++ b/art/characters/qinglan/face-study-v6/review/eye-fit.json@@ -0,0 +1,36 @@+[+ {+ "side": "L",+ "eye_center_world_m": [+ 0.032859278842806816,+ -0.12403267994523048,+ 1.6024056673049927+ ],+ "fitted_eye_radii_m": [+ 0.012838987652212383,+ 0.012186940759420395,+ 0.013212323188781738+ ],+ "globe_width_scale": 1.07,+ "iris_radius_m": 0.0062,+ "pupil_radius_m": 0.0017,+ "method": "Reversible eye shape keys; iris patches projected onto fitted ellipsoid, not sculpt brush work"+ },+ {+ "side": "R",+ "eye_center_world_m": [+ -0.03288150578737259,+ -0.12384172156453133,+ 1.602405309677124+ ],+ "fitted_eye_radii_m": [+ 0.012842421643435955,+ 0.012197863310575485,+ 0.013212323188781738+ ],+ "globe_width_scale": 1.07,+ "iris_radius_m": 0.0062,+ "pupil_radius_m": 0.0017,+ "method": "Reversible eye shape keys; iris patches projected onto fitted ellipsoid, not sculpt brush work"+ }+]\ No newline at end of filediff --git a/art/characters/qinglan/face-study-v6/review/face-review.png b/art/characters/qinglan/face-study-v6/review/face-review.pngnew file mode 100644index 000000000..1e43a7808Binary files /dev/null and b/art/characters/qinglan/face-study-v6/review/face-review.png differdiff --git a/art/characters/qinglan/face-study-v6/review/native-brush-log.json b/art/characters/qinglan/face-study-v6/review/native-brush-log.jsonnew file mode 100644index 000000000..98bb66691--- /dev/null+++ b/art/characters/qinglan/face-study-v6/review/native-brush-log.json@@ -0,0 +1,727 @@+[+ {+ "label": "Outer canthus: 2.8 mm lateral, 1.8 mm upward target",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.044,+ -0.128,+ 1.603+ ],+ [+ 0.0468,+ -0.128,+ 1.6048+ ]+ ],+ "size_px": 70,+ "strength": 0.65,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 7031,+ "max_move_mm": 2.1517906188964844,+ "affected_bounds": [+ [+ -0.05588022619485855,+ 0.05595085397362709+ ],+ [+ -0.12975119054317474,+ -0.12001834064722061+ ],+ [+ 1.5896135568618774,+ 1.6161177158355713+ ]+ ],+ "disposition": "reverted: outer-canthus transition too sharp"+ },+ {+ "label": "Upper lid settles over iris",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.033,+ -0.135,+ 1.61+ ],+ [+ 0.033,+ -0.135,+ 1.6078+ ]+ ],+ "size_px": 67,+ "strength": 0.62,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 8686,+ "max_move_mm": 1.3539791107177734,+ "affected_bounds": [+ [+ -0.04754820838570595,+ 0.04753661900758743+ ],+ [+ -0.13950683176517487,+ -0.12152357399463654+ ],+ [+ 1.604036569595337,+ 1.625248670578003+ ]+ ],+ "disposition": "reverted: outer-canthus transition too sharp"+ },+ {+ "label": "Lower lid slight support",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.033,+ -0.136,+ 1.5958+ ],+ [+ 0.033,+ -0.136,+ 1.5966+ ]+ ],+ "size_px": 62,+ "strength": 0.5,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 10342,+ "max_move_mm": 0.3992319107055664,+ "affected_bounds": [+ [+ -0.04651070758700371,+ 0.04644991084933281+ ],+ [+ -0.137876957654953,+ -0.1226886510848999+ ],+ [+ 1.5860549211502075,+ 1.6028873920440674+ ]+ ],+ "disposition": "reverted: outer-canthus transition too sharp"+ },+ {+ "label": "Blend canthal transition after grab",+ "brush": "Smooth",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.041,+ -0.13,+ 1.606+ ],+ [+ 0.044,+ -0.128,+ 1.604+ ],+ [+ 0.046,+ -0.127,+ 1.602+ ],+ [+ 0.044,+ -0.128,+ 1.604+ ],+ [+ 0.041,+ -0.13,+ 1.606+ ]+ ],+ "size_px": 52,+ "strength": 0.2,+ "invert": false,+ "snap": true,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 18098,+ "max_move_mm": 0.3029106855392456,+ "affected_bounds": [+ [+ -0.05939071998000145,+ 0.05928749218583107+ ],+ [+ -0.1367182433605194,+ -0.11228320747613907+ ],+ [+ 1.589415192604065,+ 1.620786190032959+ ]+ ],+ "disposition": "reverted: outer-canthus transition too sharp"+ },+ {+ "label": "Broader, smaller canthal correction",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.044,+ -0.128,+ 1.603+ ],+ [+ 0.0463,+ -0.128,+ 1.6043+ ]+ ],+ "size_px": 104,+ "strength": 0.55,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 8408,+ "max_move_mm": 1.4460169076919556,+ "affected_bounds": [+ [+ -0.056276820600032806,+ 0.05635283142328262+ ],+ [+ -0.12975119054317474,+ -0.11247067153453827+ ],+ [+ 1.589613914489746,+ 1.61611807346344+ ]+ ],+ "disposition": "reverted: unified size override identified"+ },+ {+ "label": "Upper lid coverage with relaxed depth mask",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.033,+ -0.135,+ 1.61+ ],+ [+ 0.033,+ -0.135,+ 1.6084+ ]+ ],+ "size_px": 67,+ "strength": 0.55,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 8955,+ "max_move_mm": 0.873565673828125,+ "affected_bounds": [+ [+ -0.04754820838570595,+ 0.04753661900758743+ ],+ [+ -0.13950683176517487,+ -0.12152357399463654+ ],+ [+ 1.603084921836853,+ 1.625266194343567+ ]+ ],+ "disposition": "reverted: unified size override identified"+ },+ {+ "label": "Calibrated broad canthus transition",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.044,+ -0.128,+ 1.603+ ],+ [+ 0.046,+ -0.128,+ 1.6042+ ]+ ],+ "size_px": 150,+ "strength": 0.55,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 19578,+ "max_move_mm": 1.212084412574768,+ "affected_bounds": [+ [+ -0.06111980974674225,+ 0.06100403890013695+ ],+ [+ -0.13560718297958374,+ -0.10779318958520889+ ],+ [+ 1.584457278251648,+ 1.6218005418777466+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Calibrated upper lid coverage",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.033,+ -0.135,+ 1.61+ ],+ [+ 0.033,+ -0.135,+ 1.6086+ ]+ ],+ "size_px": 85,+ "strength": 0.6,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 4569,+ "max_move_mm": 0.8255243301391602,+ "affected_bounds": [+ [+ -0.04554356634616852,+ 0.04548172280192375+ ],+ [+ -0.13841889798641205,+ -0.12886202335357666+ ],+ [+ 1.6030569076538086,+ 1.6229445934295654+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Soften orbital transition",+ "brush": "Smooth",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.04,+ -0.132,+ 1.61+ ],+ [+ 0.044,+ -0.128,+ 1.606+ ],+ [+ 0.047,+ -0.125,+ 1.6+ ],+ [+ 0.045,+ -0.127,+ 1.597+ ],+ [+ 0.041,+ -0.13,+ 1.599+ ]+ ],+ "size_px": 88,+ "strength": 0.2,+ "invert": false,+ "snap": true,+ "missed_points": [],+ "key": "01_Lid_Refinement",+ "moved_vertices": 17716,+ "max_move_mm": 0.03879344463348389,+ "affected_bounds": [+ [+ -0.055597927421331406,+ 0.0558912418782711+ ],+ [+ -0.13708342611789703,+ -0.10779320448637009+ ],+ [+ 1.5864027738571167,+ 1.623029351234436+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Lift columella slightly",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0,+ -0.1603,+ 1.554+ ],+ [+ 0,+ -0.1603,+ 1.5555+ ]+ ],+ "size_px": 90,+ "strength": 0.5,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "02_Nose_Lip_Refinement",+ "moved_vertices": 3151,+ "max_move_mm": 0.5741119384765625,+ "affected_bounds": [+ [+ -0.012565771117806435,+ 0.01249012816697359+ ],+ [+ -0.16886413097381592,+ -0.15172000229358673+ ],+ [+ 1.5461803674697876,+ 1.5650076866149902+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Blend alar transition",+ "brush": "Smooth",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.012,+ -0.158,+ 1.564+ ],+ [+ 0.014,+ -0.157,+ 1.561+ ],+ [+ 0.015,+ -0.154,+ 1.557+ ],+ [+ 0.014,+ -0.152,+ 1.555+ ],+ [+ 0.012,+ -0.153,+ 1.557+ ]+ ],+ "size_px": 65,+ "strength": 0.3,+ "invert": false,+ "snap": true,+ "missed_points": [],+ "key": "02_Nose_Lip_Refinement",+ "moved_vertices": 4575,+ "max_move_mm": 0.023905960842967033,+ "affected_bounds": [+ [+ -0.02237733080983162,+ 0.02224775403738022+ ],+ [+ -0.16769939661026,+ -0.14387144148349762+ ],+ [+ 1.5472384691238403,+ 1.5730088949203491+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Upper lip gentle lift",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0,+ -0.159,+ 1.539+ ],+ [+ 0,+ -0.159,+ 1.5402+ ]+ ],+ "size_px": 105,+ "strength": 0.5,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "02_Nose_Lip_Refinement",+ "moved_vertices": 2821,+ "max_move_mm": 0.5850791931152344,+ "affected_bounds": [+ [+ -0.015303056687116623,+ 0.015439045615494251+ ],+ [+ -0.15976199507713318,+ -0.15221823751926422+ ],+ [+ 1.5282063484191895,+ 1.553644061088562+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Relax mouth corners",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.021,+ -0.1495,+ 1.534+ ],+ [+ 0.021,+ -0.1495,+ 1.5347+ ]+ ],+ "size_px": 100,+ "strength": 0.5,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "02_Nose_Lip_Refinement",+ "moved_vertices": 8598,+ "max_move_mm": 0.2759695053100586,+ "affected_bounds": [+ [+ -0.03373004496097565,+ 0.033792994916439056+ ],+ [+ -0.15797536075115204,+ -0.1388566792011261+ ],+ [+ 1.5231273174285889,+ 1.5493338108062744+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Soften philtrum transition",+ "brush": "Smooth",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.004,+ -0.158,+ 1.541+ ],+ [+ 0.005,+ -0.156,+ 1.545+ ],+ [+ 0.004,+ -0.156,+ 1.549+ ],+ [+ 0.003,+ -0.158,+ 1.552+ ],+ [+ 0.005,+ -0.156,+ 1.548+ ],+ [+ 0.004,+ -0.156,+ 1.544+ ]+ ],+ "size_px": 70,+ "strength": 0.35,+ "invert": false,+ "snap": true,+ "missed_points": [],+ "key": "02_Nose_Lip_Refinement",+ "moved_vertices": 2302,+ "max_move_mm": 0.020536230877041817,+ "affected_bounds": [+ [+ -0.013965517282485962,+ 0.01417971309274435+ ],+ [+ -0.16561192274093628,+ -0.1502401977777481+ ],+ [+ 1.5390836000442505,+ 1.557784080505371+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ },+ {+ "label": "Upper lid follows iris edge",+ "brush": "Grab",+ "operator": "bpy.ops.sculpt.brush_stroke",+ "result": [+ "FINISHED"+ ],+ "axis": "FRONT",+ "points_world_m": [+ [+ 0.033,+ -0.135,+ 1.6095+ ],+ [+ 0.033,+ -0.135,+ 1.608+ ]+ ],+ "size_px": 100,+ "strength": 0.5,+ "invert": false,+ "snap": false,+ "missed_points": [],+ "key": "03_Upper_Lid_Fit",+ "moved_vertices": 6017,+ "max_move_mm": 0.7377862930297852,+ "affected_bounds": [+ [+ -0.04758965224027634,+ 0.04757438227534294+ ],+ [+ -0.13934703171253204,+ -0.12698377668857574+ ],+ [+ 1.6000579595565796,+ 1.624807596206665+ ]+ ],+ "disposition": "kept in V6 candidate; art acceptance pending"+ }+]\ No newline at end of filediff --git a/art/characters/qinglan/face-study-v6/review/post-sculpt-protection.json b/art/characters/qinglan/face-study-v6/review/post-sculpt-protection.jsonnew file mode 100644index 000000000..bdd34fb58--- /dev/null+++ b/art/characters/qinglan/face-study-v6/review/post-sculpt-protection.json@@ -0,0 +1,10 @@+{+ "operation": "Protect internal lip seam after native sculpt",+ "key": "02_Nose_Lip_Refinement",+ "zero_delta_below_world_z_m": 1.53,+ "full_brush_delta_above_world_z_m": 1.537,+ "feather": "smoothstep",+ "vertices_whose_delta_was_reduced": 7887,+ "max_removed_delta_mm": 0.2694692015647888,+ "purpose": "Keep source mouth interior untouched while retaining external upper-lip and nose brush deltas"+}\ No newline at end of filediff --git a/art/characters/qinglan/face-study-v6/review/verification.json b/art/characters/qinglan/face-study-v6/review/verification.jsonnew file mode 100644index 000000000..4946f0ea5--- /dev/null+++ b/art/characters/qinglan/face-study-v6/review/verification.json@@ -0,0 +1,352 @@+{+ "scope": "Saved head and local facial self-intersection comparison; not facial likeness, rig or game acceptance.",+ "vertices": 243617,+ "faces": 243328,+ "keys": [+ {+ "name": "01_Lid_Refinement",+ "value": 1.0,+ "affected_vertices": 24564,+ "max_delta_mm": 1.2068066596984863+ },+ {+ "name": "02_Nose_Lip_Refinement",+ "value": 1.0,+ "affected_vertices": 10771,+ "max_delta_mm": 0.5850791931152344+ },+ {+ "name": "03_Upper_Lid_Fit",+ "value": 1.0,+ "affected_vertices": 6017,+ "max_delta_mm": 0.7377862930297852+ }+ ],+ "shape_key_mix_error_m": 0.0,+ "max_total_delta_mm": 1.563072681427002,+ "unchanged_vertices": 207303,+ "source_control_mesh": "Preserved hidden V5 Multires source; live brush edits are high-resolution shape keys.",+ "audit": {+ "object": "Audit_Only",+ "verts": 243617,+ "edges": 486944,+ "faces": 243328,+ "tris_equivalent": 486656,+ "tris": 0,+ "quads": 243328,+ "ngons": 0,+ "quads_pct": 100.0,+ "valence_hist_interior": {+ "3": 88,+ "4": 242869,+ "5": 84+ },+ "poles_e3": 88,+ "poles_e5plus": 84,+ "valence_6plus": 0,+ "non_manifold_edges": 0,+ "boundary_loops": [+ 576+ ],+ "loose_verts": 0,+ "loose_edges": 0,+ "zero_area_faces": 0,+ "duplicate_verts": 0,+ "flipped_faces": 0,+ "self_intersections": null,+ "edge_len_mean": 0.000817,+ "edge_len_cv": 0.883,+ "symmetry_pct": 84.06,+ "dimensions": [+ 0.2917,+ 0.2327,+ 0.3221+ ],+ "ngon_faces_sample": [],+ "pole_e5_sample": [+ [+ -0.0207,+ -0.1402,+ 1.5272+ ],+ [+ -0.0218,+ -0.1391,+ 1.5283+ ],+ [+ -0.0236,+ -0.1329,+ 1.5984+ ],+ [+ -0.0223,+ -0.1318,+ 1.6033+ ],+ [+ -0.0482,+ -0.1261,+ 1.6013+ ],+ [+ -0.0076,+ -0.1622,+ 1.5596+ ],+ [+ -0.0735,+ -0.0632,+ 1.6051+ ],+ [+ -0.0445,+ -0.1305,+ 1.5892+ ],+ [+ -0.0079,+ -0.1482,+ 1.5924+ ],+ [+ -0.0752,+ -0.0574,+ 1.6253+ ],+ [+ -0.0296,+ -0.1357,+ 1.6145+ ],+ [+ -0.0209,+ -0.141,+ 1.5141+ ],+ [+ -0.016,+ -0.1339,+ 1.6025+ ],+ [+ -0.0153,+ -0.1496,+ 1.5492+ ],+ [+ -0.0638,+ -0.064,+ 1.5381+ ],+ [+ -0.0086,+ -0.1419,+ 1.6169+ ],+ [+ -0.0199,+ -0.1442,+ 1.5624+ ],+ [+ -0.0189,+ -0.1353,+ 1.594+ ],+ [+ -0.014,+ -0.1503,+ 1.5555+ ],+ [+ -0.0635,+ -0.0967,+ 1.551+ ],+ [+ -0.005,+ -0.156,+ 1.5553+ ],+ [+ -0.0044,+ -0.1544,+ 1.5596+ ],+ [+ -0.0283,+ -0.1305,+ 1.5364+ ],+ [+ -0.015,+ -0.1446,+ 1.5429+ ],+ [+ -0.0156,+ -0.1348,+ 1.5124+ ]+ ],+ "pole_e3_sample": [+ [+ -0.0267,+ -0.1094,+ 1.6043+ ],+ [+ -0.0286,+ -0.1086,+ 1.6005+ ],+ [+ -0.0322,+ -0.1078,+ 1.6021+ ],+ [+ -0.0302,+ -0.1086,+ 1.6063+ ],+ [+ -0.0213,+ -0.1374,+ 1.5263+ ],+ [+ -0.0223,+ -0.1376,+ 1.5284+ ],+ [+ -0.0184,+ -0.1328,+ 1.6004+ ],+ [+ -0.0192,+ -0.1334,+ 1.5982+ ],+ [+ -0.007,+ -0.1601,+ 1.5597+ ],+ [+ -0.0172,+ -0.1466,+ 1.5628+ ],+ [+ -0.0095,+ -0.1442,+ 1.5011+ ],+ [+ -0.0502,+ -0.1253,+ 1.6028+ ],+ [+ -0.0232,+ -0.1412,+ 1.6259+ ],+ [+ -0.0281,+ -0.136,+ 1.593+ ],+ [+ -0.0247,+ -0.1033,+ 1.6965+ ],+ [+ -0.0113,+ -0.1533,+ 1.5597+ ],+ [+ -0.0064,+ -0.1552,+ 1.5635+ ],+ [+ -0.0027,+ -0.1592,+ 1.5609+ ],+ [+ -0.023,+ -0.1333,+ 1.6075+ ],+ [+ -0.009,+ -0.1519,+ 1.5609+ ],+ [+ -0.0264,+ -0.1324,+ 1.5316+ ],+ [+ -0.0262,+ -0.1312,+ 1.5275+ ],+ [+ -0.0109,+ -0.1462,+ 1.5473+ ],+ [+ -0.024,+ -0.0782,+ 1.5118+ ],+ [+ -0.0279,+ -0.0799,+ 1.5586+ ]+ ]+ },+ "head_render_gate": {+ "profile": "render",+ "eps": 4.9e-05,+ "tol": 0.000986,+ "gap": 0.004929,+ "pass": true,+ "errors": [],+ "warnings": [],+ "per_object": {+ "Audit_Only": {+ "tris": 486656,+ "parts": 1,+ "errors": [],+ "warnings": []+ }+ },+ "skipped": []+ },+ "face_patch_intersections": {+ "faces_checked": 137844,+ "source_bvh_candidates": 1074,+ "current_bvh_candidates": 1073,+ "new_bvh_candidates": 0,+ "source_confirmed_crossings": 1042,+ "current_confirmed_crossings": 1038,+ "new_confirmed_crossings": 0,+ "new_face_pairs": [],+ "new_crossing_centers": [],+ "limits": "Local face patch only. BVH candidates narrowed by segment/triangle intersections in millimetres near the origin; tangencies and coplanar overlap are not confirmed by this test. Full dense-mesh intersection test remains outside scope."+ },+ "art_acceptance": "needs review; not implied by gate or native operator completion"+}\ No newline at end of filediff --git a/art/characters/qinglan/face-study-v6/scripts/compose_review.py b/art/characters/qinglan/face-study-v6/scripts/compose_review.pynew file mode 100644index 000000000..36b7dacb2--- /dev/null+++ b/art/characters/qinglan/face-study-v6/scripts/compose_review.py@@ -0,0 +1,23 @@+"""Lay out unchanged renders; no painted corrections or synthesized face images."""+from pathlib import Path+import matplotlib+matplotlib.use('Agg')+import matplotlib.pyplot as plt+ROOT=Path(__file__).resolve().parents[1]+fig,axes=plt.subplots(2,3,figsize=(12,10),dpi=140,facecolor='#e7e9ec')+for row,state in enumerate(('before','after')):+ for col,name in enumerate(('front','threequarter','profile')):+ ax=axes[row,col];ax.imshow(plt.imread(ROOT/'review'/f'{state}-{name}.png'));ax.axis('off')+ ax.set_title(('V5 source' if row==0 else 'V6 live revision')+' | '+name,fontsize=11,pad=7)+fig.suptitle('QINGLAN | NATIVE BRUSH REVIEW',fontsize=17,y=.99)+fig.text(.5,.018,'Same cameras, lights and neutral materials. Eye geometry also adjusted. Art acceptance pending.',ha='center',fontsize=10)+fig.subplots_adjust(left=.02,right=.98,top=.945,bottom=.045,hspace=.10,wspace=.02)+fig.savefig(ROOT/'review/before-after.png',facecolor=fig.get_facecolor());plt.close(fig)+fig,axes=plt.subplots(1,3,figsize=(12,6),dpi=130,facecolor='#e7e9ec')+for ax,name in zip(axes,('front','threequarter','profile')):+ ax.imshow(plt.imread(ROOT/'review'/f'after-{name}.png'));ax.axis('off');ax.set_title(name,fontsize=12)+fig.suptitle('QINGLAN | V6 FACE CANDIDATE',fontsize=17,y=.98)+fig.text(.5,.025,'Native sculpt revision - still needs facial identity refinement',ha='center',fontsize=11)+fig.subplots_adjust(left=.02,right=.98,top=.89,bottom=.065,wspace=.02)+fig.savefig(ROOT/'review/face-review.png',facecolor=fig.get_facecolor());plt.close(fig)+print('FACE_COMPARISON_READY')diff --git a/art/characters/qinglan/face-study-v6/scripts/live_sculpt.py b/art/characters/qinglan/face-study-v6/scripts/live_sculpt.pynew file mode 100644index 000000000..cbc0b11b6--- /dev/null+++ b/art/characters/qinglan/face-study-v6/scripts/live_sculpt.py@@ -0,0 +1,106 @@+"""Native brush operations for the already-running Blender MCP session.++Import this module in the GUI session. Rendering and auditing use saved copies.+Brush deltas are kept as independent keys, with complete stroke records.+"""+import bpy, json, sys+import numpy as np+from pathlib import Path+from mathutils import Vector++ROOT=Path(__file__).resolve().parents[1]+SCRATCH=ROOT.parents[3]/'output/qinglan/live-v6'+SCRATCH.mkdir(parents=True,exist_ok=True)+SKILLS=Path.home()/'.codex/skills'+sys.path += [str(SKILLS/'scenario-blender-expert/scripts'),str(SKILLS/'scenario-blender-sculpting/scripts')]+import bx_gui as G+import bx_sculpt as S+_old_redraw=getattr(G.redraw,'_qinglan_original',G.redraw)+def refresh_view():+ _old_redraw()+ G.view3d()[3].update()+refresh_view._qinglan_original=_old_redraw+G.redraw=refresh_view++def head():+ return bpy.data.objects['Qinglan_Live_Sculpt']++def coords(key):+ a=np.empty(len(key.data)*3,dtype=np.float32)+ key.data.foreach_get('co',a)+ return a.reshape(-1,3)++def prepare(axis='FRONT'):+ ob=head()+ if bpy.context.mode!='OBJECT':bpy.ops.object.mode_set(mode='OBJECT')+ G.set_view(axis,frame=ob)+ w,a,r,v=G.view3d();v.view_distance=.46+ v.view_location=Vector((0,-.05,1.585));v.view_perspective='ORTHO';v.update()+ a.spaces.active.clip_start=.001+ bpy.ops.object.mode_set(mode='SCULPT')+ ob.data.use_mirror_x=True;ob.data.use_mirror_y=False;ob.data.use_mirror_z=False+ G.redraw()++def brush_pass(label,brush,points,size,strength,axis='FRONT',invert=False,snap=True):+ ob=head()+ if bpy.context.mode!='OBJECT':bpy.ops.object.mode_set(mode='OBJECT')+ before=coords(ob.active_shape_key).copy()+ prepare(axis)+ b=S.expert_brush(brush)+ # Native unified settings override stroke-element size in this session.+ unified=bpy.context.tool_settings.sculpt.unified_paint_settings+ unified.use_unified_size=True;unified.size=int(size)+ unified.use_locked_size='VIEW';unified.use_unified_strength=False+ b.size=int(size);b.use_frontface=True+ result,missed=G.stroke('SCULPT',points,size=size,strength=strength,invert=invert,snap=snap)+ bpy.ops.object.mode_set(mode='OBJECT')+ after=coords(ob.active_shape_key);d=np.linalg.norm(after-before,axis=1)+ moved=d>1e-8+ record={'label':label,'brush':brush,'operator':'bpy.ops.sculpt.brush_stroke',+ 'result':sorted(result),'axis':axis,'points_world_m':points,+ 'size_px':size,'strength':strength,'invert':invert,'snap':snap,'missed_points':missed,+ 'key':ob.active_shape_key.name,'moved_vertices':int(moved.sum()),+ 'max_move_mm':float(d.max()*1000),+ 'affected_bounds':[[float(after[moved,i].min()),float(after[moved,i].max())] for i in range(3)] if moved.any() else None}+ logpath=ROOT/'review/native-brush-log.json'+ log=json.loads(logpath.read_text()) if logpath.exists() else []+ log.append(record);logpath.write_text(json.dumps(log,indent=2))+ print(json.dumps(record))+ return record++def region_mask(zmin,zmax,feather=.004,ymax=-.12):+ ob=head()+ if bpy.context.mode!='OBJECT':bpy.ops.object.mode_set(mode='OBJECT')+ p=coords(ob.active_shape_key)+ def smooth(t):+ t=np.clip(t,0,1);return t*t*(3-2*t)+ weight=smooth((p[:,2]-zmin)/feather)*smooth((zmax-p[:,2])/feather)+ weight*=smooth((ymax-p[:,1])/.008)+ attr=ob.data.attributes.get('.sculpt_mask')+ if attr is None:attr=ob.data.attributes.new('.sculpt_mask','FLOAT','POINT')+ attr.data.foreach_set('value',(1-weight).astype(np.float32));ob.data.update()++def begin_stage(name):+ ob=head()+ if bpy.context.mode!='OBJECT':bpy.ops.object.mode_set(mode='OBJECT')+ keys=ob.data.shape_keys.key_blocks+ assert name not in keys, 'Use a new stage name; never overwrite an existing sculpt pass.'+ values={k.name:k.value for k in list(keys)[1:]}+ key=ob.shape_key_add(name=name,from_mix=True)+ start=coords(key)+ for k in list(keys)[1:-1]:k.value=0+ key.value=1;ob.active_shape_key_index=len(keys)-1+ np.save(SCRATCH/f'{name}-start.npy',start)+ ob['pending_stage']=json.dumps({'name':name,'previous_values':values})++def finish_stage():+ ob=head()+ if bpy.context.mode!='OBJECT':bpy.ops.object.mode_set(mode='OBJECT')+ pending=json.loads(ob['pending_stage']);keys=ob.data.shape_keys.key_blocks+ key=keys[pending['name']]+ start=np.load(SCRATCH/f'{key.name}-start.npy')+ delta=coords(key)-start+ key.data.foreach_set('co',(coords(keys[0])+delta).astype(np.float32).ravel())+ for name,value in pending['previous_values'].items():keys[name].value=value+ del ob['pending_stage'];ob.data.update()+ print(json.dumps({'finished_stage':key.name,'max_delta_mm':float(np.linalg.norm(delta,axis=1).max()*1000)}))diff --git a/art/characters/qinglan/face-study-v6/scripts/review_saved.py b/art/characters/qinglan/face-study-v6/scripts/review_saved.pynew file mode 100644index 000000000..c218132fc--- /dev/null+++ b/art/characters/qinglan/face-study-v6/scripts/review_saved.py@@ -0,0 +1,109 @@+"""Headless review of a saved native-brush revision; never replays GUI brushes."""+import bpy,bmesh,json,sys+import numpy as np+from pathlib import Path+from mathutils import Vector+from mathutils.bvhtree import BVHTree+from mathutils.geometry import intersect_ray_tri+ROOT=Path(__file__).resolve().parents[1]+SKILLS=Path.home()/'.codex/skills'+sys.path.append(str(SKILLS/'scenario-blender-expert/scripts'))+import bx_audit as A+bpy.ops.wm.open_mainfile(filepath=str(ROOT/'qinglan-live-face.blend'))+head=bpy.data.objects['Qinglan_Live_Sculpt']+keys=head.data.shape_keys.key_blocks+def coordinates(data):+ a=np.empty(len(data)*3,dtype=np.float32);data.foreach_get('co',a);return a.reshape(-1,3)+base=coordinates(keys[0].data);mixed=base.copy()+per_key=[]+for k in list(keys)[1:]:+ co=coordinates(k.data);assert np.isfinite(co).all()+ delta=co-base;mixed+=delta*k.value+ d=np.linalg.norm(delta,axis=1)+ per_key.append({'name':k.name,'value':k.value,'affected_vertices':int((d>1e-8).sum()),'max_delta_mm':float(d.max()*1000)})+bpy.context.view_layer.update();dg=bpy.context.evaluated_depsgraph_get()+mesh=bpy.data.meshes.new_from_object(head.evaluated_get(dg),preserve_all_data_layers=True,depsgraph=dg)+actual=coordinates(mesh.vertices)+mix_error=float(np.linalg.norm(actual-mixed,axis=1).max());assert mix_error<2e-6+snapshot=bpy.data.objects.new('Audit_Only',mesh)+audit=A.audit(snapshot);gate=A.deliverable([snapshot],profile='render')++# The selected patch extends at least 10 mm past the brush regions. Compare+# identical face indices in source and revision, excluding adjacent faces.+face_ids=[];polys=[]+for p in mesh.polygons:+ idx=list(p.vertices);v=base[idx]+ if np.any((np.abs(v[:,0])<.075)&(v[:,1]<-.075)&(v[:,2]>1.50)&(v[:,2]<1.65)):+ face_ids.append(p.index);polys.append(idx)+def overlaps(co):+ tree=BVHTree.FromPolygons([Vector(p) for p in co],polys)+ return {(face_ids[a],face_ids[b]) for a,b in tree.overlap(tree)+ if a<b and not set(polys[a])&set(polys[b])}+before_pairs=overlaps(base);after_pairs=overlaps(actual)+new=after_pairs-before_pairs+mesh.calc_loop_triangles()+triangles={}+for tri in mesh.loop_triangles:+ triangles.setdefault(tri.polygon_index,[]).append(tuple(tri.vertices))+def confirmed_pairs(co,pairs):+ # Work in millimetres near the origin so dense facial triangles do not+ # fall below absolute tolerances in Blender's ray/triangle primitive.+ points=[Vector((p-np.array((0,-.12,1.60)))*1000) for p in co]+ def crosses(ta,tb):+ a=[points[i] for i in ta];b=[points[i] for i in tb]+ for edges,face in ((a,b),(b,a)):+ for i in range(3):+ origin=edges[i];direction=edges[(i+1)%3]-origin+ if direction.length_squared<=1e-20:continue+ hit=intersect_ray_tri(*face,direction.normalized(),origin,True)+ if hit is not None and direction.length_squared>1e-20:+ t=(hit-origin).dot(direction)/direction.length_squared+ if 1e-6<t<1-1e-6:return True+ return False+ return {pair for pair in pairs if any(crosses(ta,tb) for ta in triangles[pair[0]] for tb in triangles[pair[1]])}+probe=intersect_ray_tri(Vector((0,0,0)),Vector((1,0,0)),Vector((0,1,0)),Vector((0,0,1)),Vector((.25,.25,-1)),True)+assert probe is not None and (probe-Vector((.25,.25,0))).length<1e-6+source_crossings=confirmed_pairs(base,before_pairs)+current_crossings=confirmed_pairs(actual,after_pairs)+new_crossings=current_crossings-source_crossings+delta=np.linalg.norm(actual-base,axis=1)+report={'scope':'Saved head and local facial self-intersection comparison; not facial likeness, rig or game acceptance.',+ 'vertices':len(mesh.vertices),'faces':len(mesh.polygons),'keys':per_key,+ 'shape_key_mix_error_m':mix_error,'max_total_delta_mm':float(delta.max()*1000),+ 'unchanged_vertices':int((delta<=1e-8).sum()),+ 'source_control_mesh':'Preserved hidden V5 Multires source; live brush edits are high-resolution shape keys.',+ 'audit':audit,'head_render_gate':gate,+ 'face_patch_intersections':{'faces_checked':len(polys),'source_bvh_candidates':len(before_pairs),+ 'current_bvh_candidates':len(after_pairs),'new_bvh_candidates':len(new),+ 'source_confirmed_crossings':len(source_crossings),'current_confirmed_crossings':len(current_crossings),+ 'new_confirmed_crossings':len(new_crossings),+ 'new_face_pairs':[list(p) for p in sorted(new_crossings)],+ 'new_crossing_centers':[actual[list(mesh.polygons[a].vertices)+list(mesh.polygons[b].vertices)].mean(0).tolist() for a,b in sorted(new_crossings)],+ 'limits':'Local face patch only. BVH candidates narrowed by segment/triangle intersections in millimetres near the origin; tangencies and coplanar overlap are not confirmed by this test. Full dense-mesh intersection test remains outside scope.'},+ 'art_acceptance':'needs review; not implied by gate or native operator completion'}+(ROOT/'review/verification.json').write_text(json.dumps(report,indent=2))+bpy.data.objects.remove(snapshot,do_unlink=True)+print('AUDIT_RESULT '+json.dumps({'max_total_delta_mm':report['max_total_delta_mm'],+ 'shape_key_mix_error_m':mix_error,'source_crossings':len(source_crossings),+ 'current_crossings':len(current_crossings),'new_crossings':len(new_crossings)}),flush=True)+assert not new_crossings, 'Native revision introduced local face intersections; revise before delivery.'+if '--audit-only' in sys.argv:sys.exit(0)++scene=bpy.context.scene;scene.render.engine='CYCLES';scene.cycles.samples=32+prefs=bpy.context.preferences.addons['cycles'].preferences+prefs.compute_device_type='OPTIX';prefs.get_devices()+for device in prefs.devices:device.use=device.type=='OPTIX'+scene.cycles.device='GPU'+visible_keys=[]+for ob in bpy.data.objects:+ if ob.type=='MESH' and not ob.hide_render and ob.data.shape_keys:+ visible_keys.extend((k,k.value) for k in list(ob.data.shape_keys.key_blocks)[1:])+for state in (('after',) if '--after-only' in sys.argv else ('before','after')):+ for key,value in visible_keys:key.value=0 if state=='before' else value+ bpy.context.view_layer.update()+ for name in ('front','profile','threequarter','low'):+ scene.camera=bpy.data.objects['Review_'+name]+ scene.render.filepath=str(ROOT/'review'/f'{state}-{name}.png')+ bpy.ops.render.render(write_still=True)+for key,value in visible_keys:key.value=value+print('SAVED_FACE_REVIEW_READY',flush=True)