fix(materials): stop orphaning references; add a scene audit gate
The blockout cleaning pass found the map was rendering with 604 of 620 mesh actors unmaterialed - every kit piece and all theatre trim. Cause: ensure_material() deleted and recreated each /Game/Hollywood/Site/M_* asset on every run, so actors staged by other tools kept references to deleted assets and fell back to the default material. Nothing errored; the map looked merely slightly flat. - Materials are now updated IN PLACE (load, delete_all_material_expressions, rebuild the graph, recompile, save). Material.expressions is protected from Python, so the editing library's deleter is used. - 53 duplicated kit actor labels fixed (both shop piers of a bay shared one name). - New Tools/ue_audit_scene.py gates the scene: every mesh actor has a material, every verified frontage span is within +/-1 m (via ue_placement), no duplicate labels. - render_screenshots.sh now runs the chain in the required order (demo map -> kit -> theatre -> audit -> cameras -> capture) and exits non-zero on an audit failure, because the demo builder rebuilds materials and later staging must follow it. Scene audit: 0 failures. Packaged QA PASS. Spawn-view reference score 0.72.
This commit is contained in:
1 parent
442d0f3d73
commit
600633cd5b
35 files changed
+226
-55
No files matched your search
@@ -22,6 +22,7 @@ Geographic tools live in [`Geo/tools/`](../Geo/README.md) and the Blender-side b
|
||||
| `ue_stage_theatre_trim.py` | Imports the trim to `/Game/Hollywood/Theatre` and stages one actor per piece in the DemoMap with site materials; clears a previous run first. |
|
||||
| `ue_apply_facade_kit.py` | Lays the kit over a building's street face from its own bounding box: bay count = round(width / 4.96), storeys from the height, shopfronts on the ground floor, windows above, pilasters on bay boundaries, cornice and parapet at the top. Clears a previous application first; unique labels per building. |
|
||||
| `generate_facade_textures.py` | Deterministic stdlib PNG generator for the facade maps (`T_StoneAshlar`, `T_Stucco`, `T_Asphalt`, `T_Concrete`, each `_BC` base colour + `_R` roughness). Pure-zlib writer, hash-based value noise, identical bytes on every run; `--size` and `--out` (`/tmp/gigline/textures` by default). `ue_build_demo_map.py` imports them into `/Game/Hollywood/Textures` and samples them world-aligned. |
|
||||
| `ue_audit_scene.py` | Gate on the DemoMap: no unmaterialed actor, every verified frontage span within tolerance (`ue_placement`), no duplicate actor labels. Writes `/tmp/gigline/scene-audit.txt`; `render_screenshots.sh --verify` fails on a non-zero failure count. Catches the class of defect that still renders plausibly. |
|
||||
| `ue_placement.py` | Single source of truth for where staged actors belong in the DemoMap (hero position, verified frontage spans) plus `span_error`/`describe_span_failure` validators. Exists because the hero position was written twice and drifted — the importer kept the pre-`0.1.0` value and moved the hero 13 m east onto the wrong side of the boulevard. No `unreal` import, so it is unit-tested. |
|
||||
| `ue_common.py` | Shared helpers for the Unreal commandlet scripts: `make_writable()` clears the read-only bit an LFS `.umap` checks out with (otherwise `save_map()` returns False silently), and `require_saved()` makes that failure explicit. |
|
||||
| `fbx_export_preset.py` | The **single** FBX export preset (`ue_metric_v1` / `ue_character_v1`): metres→centimetres via `FBX_SCALE_NONE`, axis mapping east +X / north −Y / up +Z, `mesh_smooth_type="FACE"` (smoothing groups survive the import). Every Blender exporter imports it instead of copying the argument block; `preset_kwargs()` is bpy-free and unit-tested. |
|
||||
|
||||
Reference in new issue
Block a user