Files
gig-line/Tools
zwitschi 63aa0adf1c feat(geo): cross-check block heights against Mapbox building data
New Geo/tools/mapbox_buildings.py (stdlib urllib) Tilequeries
mapbox-streets-v8 / layer building at each building centroid and merges
height/min_height/type with our OSM height + source (tag > levels > guess,
reusing block_height_report.classify_height). Reports matches, close calls,
disagreements (sorted worst first), our-only and mapbox-only cases, and writes
optional JSON.

First run over 72 buildings: 58 match, 5 close, 3 disagree, 6 non-building.
- Mapbox independently classifies our roof/canopy/shelter volumes as roof,
  canopy or shelter -> corroborates the 0.1.2 finding.
- The 3 disagreements are rear building=yes/apartments structures rendering at
  our 2-level guess (6.4 m) vs Mapbox's 3.0 m.
- Every levels x 3.2 m building is ~0.6 m per 6 levels taller than Mapbox
  implies, i.e. Mapbox suggests 3.1 m per level. Recorded, not applied.

classify_height() now also treats building=canopy as a non-building volume
(found by this cross-check), with tests.

Data handling: Mapbox terms restrict persisting/redistributing their data, so
.gitignore covers Geo/raw/mapbox-cache/ and Geo/verification/*mapbox*; the tool
refuses to cache a response containing the token, and the token is never written
to the cache, report or JSON. Token comes from the ignored .env.

Also: 17 new tests (29 total) for the compare/nearest/centroid/render helpers
and the canopy rule; Geo/README inventory row; architecture 05 + architecture.md
tools table updated per the new upkeep rule.
2026-11-08 16:31:29 +01:00
..

Tools

Repeatable helpers that drive Blender, Unreal, and the reference/asset sources. Nothing here is hand-run twice: every step that produced committed content has a script.

Geographic tools live in Geo/tools/ and the Blender-side builders live next to their output in Art/blender/*/; this folder holds everything that talks to Unreal, the network, or the repository.

Conventions

  • One script, one job. Every input is an argument; no interactive prompts.
  • Absolute paths where a tool crosses into a sandbox (Blender Flatpak, the Unreal commandlet). Those processes do not share the repo's working directory.
  • Unreal commandlets swallow print(), so each writes a result file under /tmp/gigline/. Read the file; do not trust the exit code alone.
  • No credentials, no writes outside the project by default.

Repository and assets

Tool Purpose
check-lfs.sh Fails if the lfs filter is missing or an LFS-tracked file was committed as a plain blob
sibling_asset_audit.py Reads the sibling project's prop library from GLB headers into Art/props/reuse-manifest.json; copies nothing
scale_test_export.py / ue_scale_test_import.py The 1 m = 100 uu scale test; the named presets ue_metric_v1 live in these two files

Reference gathering

Tool Purpose
commons_fetch.py Wikimedia Commons: search, exact File: titles, or a whole category; writes a provenance sidecar.json
page_image_fetch.py Resolves a web page's og:image and downloads it (Flickr, Commons file pages, photo blogs)
addon_compat_probe.py Verifies MPFB/Blosm can load and generate headless on the pinned Blender

Blender content

Tool Purpose
hero_facade_build.py Parametric hero façade; emits a JSON report naming the evidence behind every part
mpfb_character_export.py MPFB human, standard rig, baked skin, FBX export

Unreal import and level building

Tool Purpose
ue_import_site.py Imports the six site FBXs into /Game/Hollywood/Site, setting collision complexity per mesh
ue_hero_facade_import.py Imports the façade and places it on the measured building line
ue_build_demo_map.py Builds /Game/Hollywood/DemoMap: lighting, façade, site meshes, player start
ue_build_review_map.py Rebuilds Test/ReviewMap, stages the shot camera list, and stages the demo-map views
ue_create_input_assets.py Creates /Game/Input actions and the mapping context headlessly
ue_character_import.py Skeletal import plus the material/texture chain Interchange skips

Visual review

Tool Purpose
render_screenshots.py / render_screenshots.sh Rebuilds the review map, runs the game, captures the shot list into Screenshots/
judge_screenshot.py Vision-model pre-check: judges a screenshot against an expected-scene description (--image + --expect, or --shots for every shot in the README). Reads OPENROUTER_API_KEY from .env (ignored). Optional helper — a human must still approve.

Gameplay QA

Command Purpose
UnrealEditor <uproject> /Game/Hollywood/DemoMap -game -qaselftest Headless behaviour check: drives forward input for 2 s, then resets and pauses. Logs GigLine QA: ... PASS/FAIL lines and a final RESULT. Runs only with -qaselftest, so normal play is unaffected.
-qaselftest phases Walk, reset, pause/unpause, a 16-row seam transect (0 holes) and a ground-referenced wall probe (0/35), plus a frame-time capture writing Saved/Profiling/perf-walk-frametimes.csv and logging GigLine PERF:.
gigline.SetupLogs cvar Spawn/input setup logging, off by default (DefaultEngine.ini [ConsoleVariables]); enable at runtime with gigline.SetupLogs 1.

Input injection

Tool Purpose
input_emulation.py Pure-stdlib ctypes/fcntl driver that creates a virtual keyboard+mouse on /dev/uinput. The desktop treats it as real hardware, so it proves whether OS input actually reaches the game. Needs /dev/uinput writable (ACL on this host).
input_test.py Injects a scripted sequence into the focused window: --sequence move:2,look:3,jump:1,reset:1,pause:1,click.

Tests

python3 -m pip install -r requirements-tools.txt
python3 -m unittest discover -s Tools/tests -t Tools -p 'test_*.py'

Stdlib unittest, no Blender/Unreal process. See tests/README.md: test the pure parts (encoding, classification, maths, parsing); if logic is buried in main(), extract it into a function so it can be tested.