GitHub - koomen/tinytown: A pipeline for generating little 3D town miniatures and serving them in a browser

Open the original

Short summary

Tinytown is a Python tool that converts real geographic locations into soft, isometric 3D miniatures by pulling building footprints from OpenStreetMap, terrain from USGS, and using Street View photos to model individual structures. You run a CLI command with coordinates and it generates a browsable Three.js scene that looks like Tiny Glade.

  • The entire pipeline runs as one Python package with a single CLI; you can fetch data, build models, author structures using AI, and serve locally or deploy to Cloudflare Workers
  • Buildings are individually modeled from Street View photographs through an "authoring pipeline" so the miniature is recognizable as that specific town, not generic
  • Two live examples exist (Avon, NY with 1,644 structures and Chautauqua Institution with 946) showing the tool works at scale, and the rendering includes soft lighting, procedural materials, terrain streaming, and day/night toggles

Full summary

tiny-town is a tool that converts real geographic areas into soft, isometric 3D miniatures you can explore in a browser. You give it coordinates and a size, and it pulls building footprints from OpenStreetMap, terrain data from USGS, and aerial imagery from Esri, then renders everything in Three.js with the aesthetic of Tiny Glade. The clever part is the Street View integration—it photographs each building's facade and uses that to create accurate blueprints so the miniature actually looks like the real place. Two live examples exist: Avon, New York (1,644 structures across 3.3 × 3.6 km) and the Chautauqua Institution (946 structures). The whole thing runs as a single Python package with one CLI command, `./town`. The workflow breaks into distinct stages you run sequentially. First you fetch data for your location and set boundaries if needed. Then you capture Street View imagery for each building and author models—this step requires OpenAI's Codex CLI. After that comes baking, which generates terrain and road surfaces and chunks the data for efficient streaming. The tool handles tedious parts automatically; each command is idempotent so re-running it just fills in gaps. There's even a change queue system with live preview if you're iterating on a site. Dependencies are minimal for serving (just Python 3.10+), though full authoring needs Node 22, Chromium, and Codex access. The rendering leans into atmosphere over photorealism. A pale sky dome and warm low sun cast soft shadows; the frame gets tilt-shift depth of field, bloom, and color grading. Materials are procedural—brick, stone, shingles rendered with subtle grain so they read as plaster or turf rather than flat texture. Trees become soft lobed canopies dotted with leaf dabs. Roads color themselves by location rather than which stripe gets drawn, so intersections feel cohesive. The viewer streams detail by camera sector to stay within memory budgets, and a day/night toggle swaps lighting without rerendering. Both live sites deploy via Cloudflare Workers; the code itself is MIT licensed, and the committed data falls under the Open Database License with OpenStreetMap attribution.

Ask about this article