Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

facett-map3d/.nornir/sigtuna-car-nav-tour.md

Sigtuna car-nav tour — the Google-Maps-3D cinematic autopilot

What it is

Map3D::with_tour(true) (→ SigtunaTour) turns the framed 3D city into the demo brief made real: the camera opens HIGH in the air circling the extruded town so you SEE THE HOUSES from a tilted bird view, then descends (bird → street), then drives DOWN THE STREETS at ground level like a car-navigator, following a real OSM road ribbon. One deterministic autopilot, three phases, riding ON TOP of the existing beautiful Map3D GPU render (PBR + IBL + sky + soft shadows + SSAO + bloom + reflective water) — every "expensive look" pass is what you watch the tour through.

It is the car-nav / flight-mode complement to flythrough (which orbits/cruises the skyline but never lands): the tour is the one that lands and drives.

The three phases (deterministic in the clock t, seconds; the tour LOOPS)

Given the framed city (flythrough::CityFraming — centroid, extent, roof, base framing) and an optional projected street route::Route:

Design (deterministic, FC-7)

Why this shape

The camera clamps already guarantee a legal pose, so the tour only has to choose a pose per clock — no new render pass, no new resource, no fork of the pipeline. The half-open phase intervals sample strictly WITHIN the drive leg: frac == 1.0 lands exactly on the loop boundary (t == total_secs), which rem_euclid wraps back to the circle, so the route end is reached just before the wrap. Pinned-clock purity means a snapshot at a fixed clock is exact and a headless test flies a bit-reproducible route.

Tests

Watch it (the Sigtuna demo)

DISPLAY=:0 cargo run -p facett-map3d --example sigtuna_tour --features wgpu --release

Opens circling the extruded houses, descends, then drives the diagonal street. Untick "auto-tour" to grab the orbit controls yourself; re-tick to resume. The top bar shows the live phase (circle / descend / drive).

Watch it on REAL Sigtuna (facett-demo bin sigtuna_demo)

cargo run -p facett-demo --bin sigtuna_demo --release

Loads the embedded real Sigtuna OSM clip, CROPS it to its dense town core (osm_tabs::crop_to_town_core — the raw ~16 km regional clip normalises real houses to invisible slivers; the core is house-scale so you SEE THE HOUSES), extrudes it into the AAA GPU Map3D + the nav minimap inset, and flies the tour with the scale-aware metric street chase. The drive route is derived from the loaded OSM highway graph (the longest road ribbon in the core). T re-arms the tour, M toggles the minimap, drag/wheel takes manual control. Proven headless on the real clip by facett-demo/tests/sigtuna_tour.rs (houses extrude to real ~7.5 m height, the drive is ~30 m street level, the circle a ~500 m bird height; matrix cell sigtuna_navigator_tour) + the crop_to_town_core unit test.

"SEE THE HOUSES" — the houses-in-frame oracle (buildings_visible)

The brief is visual ("we want to SEE THE HOUSES"), so the render exposes a DATA oracle that a headless / robot test can assert without a GPU or a human eye:

Roof accent (the Google-Maps-3D massing look)

Map3D::with_roof_accent(strength) (opt-in, chainable) lightens the up-facing top-cap triangles of the extruded prisms toward a warm off-white highlight, in proportion to their height, so a town reads as lit rooftops over shaded facades — the Google-Maps-3D massing cue. It only touches cap triangles whose three vertices point +Y and sit above BUILDING_RISE_EPS, so walls (horizontal normals), bottom caps (−Y), and flat ground-cover caps (y≈0) are left untouched. OFF by default → the shared extrusion path and every render-proof golden (incl. golden_248) stay byte-stable (L2); the sigtuna_demo bin opts in at 0.55.

Keyframe / perf coverage (this round)

Known gaps / follow-ups