City Walk/WissenZum StadtspaziergangViewer
ImpressumDatenschutz
Leitfaden
  • So funktioniert der Stadtspaziergang
  • Woher die Daten kommen
  • Quellen nach Stadt
  • Wie der Viewer zu einer Angabe kommt
  • Der Weg der Daten
  • Bedienung
  • Glossar
Guide (English)
  • How the city walker works
  • Where the data comes from
  • Sources by city
  • How the viewer comes by what it shows
  • From download to browser
  • Using the viewer
  • Glossary
Entwicklung (English)
  • docs/ — the project knowledge base
  • Rendering — how the data becomes pixels
  • Data pipeline — the bakes, the build step and the artifact contracts
  • Architecture decision records
    • ADR 0001: Static where possible — no database, no accounts, nothing kept about a visitor
    • ADR 0002: Imperative three.js inside a React shell, not react-three-fiber
    • ADR 0005: Data stays in its provider's UTM zone, under one recenter offset and a rotated world group
    • ADR 0009: Light, shadows and post — soft PCF redrawn on demand, four concentric rings, a baked horizon for the far field, a fixed lamp pool
    • ADR 0010: The look — opaque clay on a painted ground, colours within one palette, detail drawn softly
    • ADR 0012: Sources — official data first, OSM and Wikidata for what it lacks, named stand-ins marked per city
    • ADR 0018: Headless tests run a lite profile and count frames; visuals are judged on a real GPU through snapshots
    • ADR 0021: docs/ is published as /wissen, and its diagrams are prerendered SVG
    • ADR 0024: The build bakes each city into a 3D Tiles tileset that streams around the camera
    • ADR 0027: WebGPURenderer and TSL node materials, one path, public API only
    • ADR 0030: The ground — a TIN of the native DGM, its static parts baked in, every part meeting it by one set of rules
    • ADR 0032: The camera is never below the ground or inside a building
    • ADR 0034: Picture styles are one post pass over the clay scene, reading the light and the world
    • ADR 0036: Buildings are LoD2; geometry beyond it only where a measurement and a name agree, and roofs that miss the scan are rebuilt in its form
    • ADR 0037: Cities, providers and the pipeline — fetch, bake, build; one deployment, a route per city
    • ADR 0040: Data layers are switches, off at start, drawn as glass; optional features start on first use
    • ADR 0041: Rails, trams and bridges — decks measured in the surface model, every line on a drivable profile solved by the build
    • ADR 0042: The twin answers on demand — facts and provenance ride in the tileset, text appears only when asked
    • ADR 0043: Crash and page reports go to an error tracker without an SDK, and the privacy page says what the code does
    • ADR 0044: Modell — the city in parallel projection, every pass reading the camera through a lens
    • ADR 0047: Every device gets a budget in true bytes, a phone's memory never grows, and a device that lost its GPU gets a lighter page
    • ADR 0048: A network failure is retried for a budget of the page's visible time, never decided at once
    • ADR 0054: A planner's design is loaded on the device, placed by its coordinates or by hand, and stands in for the buildings it covers
    • ADR 0055: What the twin knows is baked as files; walks are written ahead, their narration marked, every claim sourced
    • ADR 0056: Frag die Stadt runs on the visitor's own key, through one stateless function with a fixed prompt and fixed tools
    • ADR 0057: The Sprachführer speaks and listens with the browser's own voice, and the scene rests while it does
    • ADR 0059: One schema per file a bake hands over, checked by the build
    • ADR 0060: Glass fronts are read from street photos by an open image model, offline
    • ADR 0061: The scene runs in a worker; the page hosts it
  • Data → feature provenance
  • Transformation catalog
  • Portability — rendering any location, with whatever data it has
  • Writing a walk
  • Routines: the twin's scheduled agents
  • Implementation plans, backlog and audit history
  • What the data streams carry that the walker does not use yet
Contents
Leitfaden
  • So funktioniert der Stadtspaziergang
  • Woher die Daten kommen
  • Quellen nach Stadt
  • Wie der Viewer zu einer Angabe kommt
  • Der Weg der Daten
  • Bedienung
  • Glossar
Guide (English)
  • How the city walker works
  • Where the data comes from
  • Sources by city
  • How the viewer comes by what it shows
  • From download to browser
  • Using the viewer
  • Glossary
Entwicklung (English)
  • docs/ — the project knowledge base
  • Rendering — how the data becomes pixels
  • Data pipeline — the bakes, the build step and the artifact contracts
  • Architecture decision records
    • ADR 0001: Static where possible — no database, no accounts, nothing kept about a visitor
    • ADR 0002: Imperative three.js inside a React shell, not react-three-fiber
    • ADR 0005: Data stays in its provider's UTM zone, under one recenter offset and a rotated world group
    • ADR 0009: Light, shadows and post — soft PCF redrawn on demand, four concentric rings, a baked horizon for the far field, a fixed lamp pool
    • ADR 0010: The look — opaque clay on a painted ground, colours within one palette, detail drawn softly
    • ADR 0012: Sources — official data first, OSM and Wikidata for what it lacks, named stand-ins marked per city
    • ADR 0018: Headless tests run a lite profile and count frames; visuals are judged on a real GPU through snapshots
    • ADR 0021: docs/ is published as /wissen, and its diagrams are prerendered SVG
    • ADR 0024: The build bakes each city into a 3D Tiles tileset that streams around the camera
    • ADR 0027: WebGPURenderer and TSL node materials, one path, public API only
    • ADR 0030: The ground — a TIN of the native DGM, its static parts baked in, every part meeting it by one set of rules
    • ADR 0032: The camera is never below the ground or inside a building
    • ADR 0034: Picture styles are one post pass over the clay scene, reading the light and the world
    • ADR 0036: Buildings are LoD2; geometry beyond it only where a measurement and a name agree, and roofs that miss the scan are rebuilt in its form
    • ADR 0037: Cities, providers and the pipeline — fetch, bake, build; one deployment, a route per city
    • ADR 0040: Data layers are switches, off at start, drawn as glass; optional features start on first use
    • ADR 0041: Rails, trams and bridges — decks measured in the surface model, every line on a drivable profile solved by the build
    • ADR 0042: The twin answers on demand — facts and provenance ride in the tileset, text appears only when asked
    • ADR 0043: Crash and page reports go to an error tracker without an SDK, and the privacy page says what the code does
    • ADR 0044: Modell — the city in parallel projection, every pass reading the camera through a lens
    • ADR 0047: Every device gets a budget in true bytes, a phone's memory never grows, and a device that lost its GPU gets a lighter page
    • ADR 0048: A network failure is retried for a budget of the page's visible time, never decided at once
    • ADR 0054: A planner's design is loaded on the device, placed by its coordinates or by hand, and stands in for the buildings it covers
    • ADR 0055: What the twin knows is baked as files; walks are written ahead, their narration marked, every claim sourced
    • ADR 0056: Frag die Stadt runs on the visitor's own key, through one stateless function with a fixed prompt and fixed tools
    • ADR 0057: The Sprachführer speaks and listens with the browser's own voice, and the scene rests while it does
    • ADR 0059: One schema per file a bake hands over, checked by the build
    • ADR 0060: Glass fronts are read from street photos by an open image model, offline
    • ADR 0061: The scene runs in a worker; the page hosts it
  • Data → feature provenance
  • Transformation catalog
  • Portability — rendering any location, with whatever data it has
  • Writing a walk
  • Routines: the twin's scheduled agents
  • Implementation plans, backlog and audit history
  • What the data streams carry that the walker does not use yet
Entwicklung (English)

ADR 0034: Picture styles are one post pass over the clay scene, reading the light and the world

  • Status: accepted
  • Date: 2026-09, rewritten 2026-10

Context

Beside the default Pastell the viewer offers picture styles: Comic, Film noir, Sin City, Papier, and for Modell Strich and Schwarzplan. Most of what they change is a property of the finished picture — where the edges are, how many tones a colour gets, whether there is colour at all — and the depth buffer the post pipeline already reads carries the edges. ADR 0010 closed the path of one material per style.

Decision

  1. A style is one node over the frame (stylize-effect.ts), driven by a table (lib/city/render-style.ts) and one look value, style (in the Snapshot, cycled with V, remembered in local storage). Pastell draws without the node. No scene material knows the style; a new style is a table row and a mode in the node.
  2. Lines come from the second difference of inverse view depth, read at integer texel radii; the node branches only on the mode, so derivatives and texture reads stay in uniform control flow.
  3. Where a post pass cannot make the style, a render-time swap does, owned by the post stack and undone after the render: Sin City, Papier, Strich and Schwarzplan draw every surface with one card material of their kind under the real light (scene.overrideMaterial, the row's paperScene). The ground alone opts out (userData.paperOwn) and draws its paint and water itself under one shared uniform. A style's own crowns and lamp cones are visibility swaps of tagged siblings (style-dressing.ts).
  4. Styles read the world, not the screen: the fog is undone before any cut; light and shade come from the sun's own shadow map; screens (dots, hatching) are laid on the world's dominant plane with a cell size chosen by metres per pixel; pens that must hold still in a flight have no sway.
  5. Night is each style's own, or the style has none. A style draws the night in its own idiom from the lamps' light and the lit windows (Papier's card glows through them); a style cut from one light (Sin City's afternoon sun) or from none (the Schwarzplan) draws at its own instant (ownLight), and the HUD rests its date and time with a note while it is on.
  6. Data marks draw in every style, in the style's reading (dataMarks): one shared uniform picks it in each mark's material (glass.ts dataMarkColour), and the marks draw themselves through a swap (paperOwn).
  7. A still view is still, a move moves smoothly. Nothing a style draws may change between two frames of a still camera, or flip in a sub-pixel step: a screen too fine for its pixel gives way to its mean tone, a step a few pixels tall draws no line, and no screen slides over moving geometry — a crown is printed flat, or the style holds it still (sway). Measured, not judged by eye (the flicker-probe skill).
  8. No style is warmed ahead (only the selection outline is); a style builds on its first frame.

Consequences

  • New layers get outlines for free, and so does demolish.
  • A non-default style costs fill rate only while chosen.
  • A layer that wants its geometry dressed tags it and never reads the style. A style crown keeps the scene crown's anchor and size.
  • Anything that writes no depth (water sheets, mist) gets no outline.

Alternatives

  • Toon shading per material: every shader patched once per style.
  • A normal buffer and Sobel: a second geometry pass for what the depth difference already finds.
  • Bake-time outlines from the CityJSON: buildings only, and a switch would toggle geometry.
  • Papier from colour alone: albedo and light cannot be told apart in the finished frame.
  • Adaptive thresholds for light: cannot tell a dark material from a shadow.
  • A light buffer per style (MRT): a full-resolution target a phone cannot spare.
  • Screen-anchored dots and hatching: they swim on every turn.
  • Warming every style's programs at idle: cost an iPhone tab its memory and compiled Papier for every landing tile on a desktop.
  • A history buffer (temporal antialiasing) against the flicker: a full-resolution target more on a phone (ADR 0047), and it smears the ink in a move.
Previous
ADR 0032: The camera is never below the ground or inside a building
Next
ADR 0036: Buildings are LoD2; geometry beyond it only where a measurement and a name agree, and roofs that miss the scan are rebuilt in its form
Source on GitHub: docs/adr/0034-picture-styles-as-one-post-pass.md
On this page
  • Context
  • Decision
  • Consequences
  • Alternatives