Build your Mini World
How to make a miniature city: this is the step-by-step workflow behind Mini World. It turns Google's photorealistic 3D tiles into an isometric pixel-art city map, a tiny town you can fly over, one square at a time.
Every Mini World map starts as Google's photorealistic 3D city and ends as a warm pixel painting you can fly over. Twelve steps sit between them.
A city is cut into a grid of 1,024 px squares, all seen by one shared isometric camera. Each square is rendered in 3D, measured for height, repainted by our own pixel model, then stitched back together, fixed where water and buildings go wrong, and published to the map and the globe. The painter is the N1 model from the Pixel LoRAs work.
Before anything is rendered, a free probe looks at the city. Google Photorealistic 3D must cover the whole area with real buildings, not a flat satellite photo draped over terrain. Each city is reported as 3D: yes / partial / no.
Flat cities (Teresina, Boa Vista, Bogotá) are skipped for now: the painter has no walls to work from and the result looks flat. Coastal cities are judged on their land squares, because a mostly-sea box scores zero.
render_shots.py <city> probe, relief_check.pyOne camera per city: its anchor point, compass heading, elevation angle and pixels per metre. The probe stores one shared ground height. Because every square uses the same camera and ground, the squares join pixel-perfectly later.
The box size sets the bill. Chicago is 1,502 squares, Los Angeles 1x is 38,600, Tokyo (cloud) is 28,190. A 2x close-up zone over a city centre doubles the detail and quadruples the square count there.
cam/<city>.json, cam/<city>_shots.jsonr<row>_c<col>Headless Chrome loads Google Photorealistic 3D Tiles and renders each square at 2,048 px, saved as a 1,024 px JPEG. This is the slowest step, and the speed limit is Google's daily request quota, not the machines: when it runs out, renders hang silently on HTTP 429 errors.
render_shots.py <city> all → render3d/render.mjsrenders/<city>/r_c.jpgThe same camera renders a second pass with no colour: a 16-bit height for every pixel, in 2 cm steps. The height maps tell water from land later, find the water level, keep piers and boats dry, and catch towers drawn wrong.



Chicago, square r4_c-8, from this week's build.
render_shots.py <city> heightsheights/<city>/r_c.pngEach render is repainted image-to-image by the N1 LoRA (Round F) on distilled FLUX.2 klein 4B, in 4 steps. The model sees a 1,536 px window around the square and keeps the middle 1,152 px, so neighbours overlap and edges match.
modal_paint.py · mac_paint.pypainted_d4/<city>/r_c.jpgThe paintings are joined into one canvas. Each square gets a small colour offset so its tint matches its neighbours. A live city's rebuild is pinned to its old offsets, so the map never shifts under its places. Squares that are 60 % or more sea keep offset zero, so the sea is one colour, not a checkerboard.
stitch_city.py --pin … --zero-water 0.6The painter often draws the sea as fields, beaches or tiny islands. The water fix repaints it from facts: OSM water polygons, the coastline, and the water level measured from the height maps. Rivers grow from real water across flat ground, up to 4 m above the water level.
water_fix_protected.py (v3.8), 4 parts in parallelEvery city gets a defect pass at full zoom before it ships. The usual suspects:
Fixes are new seeds, re-renders, or a hand repaint of one wall.
blur_fix.py, seed repaints, 1:1 cropsThe fixed canvas is cut into a zoomable tile pyramid. A second layer marks where the water is, so the map can animate swell and reflections. Each painted blob in the sea is judged by its colour: reef rock stays and fades into the water, and land the painter invented becomes sea.
build_pyramid.py, water_mask.py --by-paint, reefs.pysite_maps/tiles_<tag>, water.jsonLandmarks are added as clickable places: 44 in Chicago, 13 for the Newark extension. One place is the opening view, chosen where no water fix shows a miss. The opening picture and the arrival from the globe are baked from the new tiles.
places.py, bake_open.cjs, bake_arrival.cjsTiles go to the map server's storage, and the city joins the engine's city list, its country menu and the Mini World globe as a marker or a guest on a nearby marker, with two clouds placed in clear sky. The site deploys only after the automatic checks pass. Then the city is marked published, and the status page shows it within 5 minutes.
deploy_tiles.sh, ship_queue.sh, deploy.shA city counts as released only when all three exist:
NN_<city>_live.jpg. The post is drafted for me; I post it by hand.diorama/, capture.cjs, make_live.py, /tuitaSince 16 Nov the cloud city builder runs steps 1–11 on Modal: L4 containers render, H100s paint, and the water and heights layers are made there too. A city goes live through the registry without a site deploy. It appears as a guest on the nearest globe marker and gets the template miniature.
Manchester NH was the first city built this way, for $2.30. Copenhagen was the first published straight from the builder. Tokyo, 50 × 50 km and 28,190 squares, is building now: estimated $254, likely about $340.
| City | Squares | Route | Approx. cost |
|---|---|---|---|
| Manchester NH | small box | Cloud builder | $2.30 |
| Chicago | 1,502 | Studio render + Modal paint | ≈ $10 |
| New York (all) | 15,574 | Studio + Modal + Macs | ≈ $100–160 |
| Greater São Paulo | 34,600 + 12,257 overview | Modal render + paint | ≈ $420 (plan) |
| Tokyo | 28,190 | Cloud builder | $254 est., ≈ $340 likely |
Costs are estimates from the run logs and plans, not invoices. The Mac route paints for free but takes about 80 squares an hour per M5 Max.
Spend guards. Every cloud app runs under a guard that stops it at a set cap, and the cloud builder has its own. A cap only goes up when I say so.
Google. Attribution stays visible on every map, raw Google meshes are never stored or shared publicly, and old keys are retired and refused.
My eye. Every visual question comes with 1:1 crops and a close-up. Nothing new goes live before the checks pass and I've seen it.