AI City Generator: Roads First, Then Blocks, Then Buildings
Generated cities look right from above and fall apart on foot. Road hierarchy, block sizes, frontage, junctions — the numbers that make a city read as a city.
City generators get judged from 200 m up, the one altitude at which every city generator looks competent. Drop the camera to 1.7 m and stand on a corner: does the pavement continue around the turn, do the two roads meeting there agree on a kerb height, does the building on the corner know it is on a corner. That view decides whether a city reads, and it is settled long before anyone models a building.
A city is a road network first
The order is a dependency chain, not a preference. The network cuts the ground into blocks, blocks subdivide into parcels, and each parcel's frontage, depth and setback decide what building can stand there. Change the network and everything downstream changes with it; change a building and nothing upstream cares.
Generators that invert it — pile up buildings, then thread roads through the gaps — produce the screenshot city. From above the massing looks plausible; at street level nothing faces anything, because there was nothing to face when it was placed. Parish and Müller's 2001 SIGGRAPH paper, ancestor of most procedural city tooling since, generated the street network first, let the streets divide the land into lots, and only then put buildings on those lots.
Three roads, not one
A real network has a hierarchy, legible at eye level whether or not you know its names. Arterials carry through-traffic and touch few properties; collectors gather traffic out of neighbourhoods and feed the arterials; local streets exist to reach front doors. Across the US network arterials and collectors together carry roughly 70 to 80 per cent of vehicle miles travelled, while local roads make up most of the mileage — a few wide, busy, continuous streets and a great many narrow, short, quiet ones.
A generator that emits one class of road produces a chessboard: the same width everywhere, every junction equally important, no reason to turn left rather than right. Give three classes different carriageways, pavements, lamp spacing and buildings, and the player starts navigating by feel instead of by minimap.
Widths you can measure
Numbers that hold up, in metres, from NACTO's Urban Street Design Guide:
- Travel lane: 3.0 m in urban settings, 3.3 m on bus and truck routes. At 3.6 m the street starts reading as a highway.
- Local two-way street with parking both sides: 7.3–8.5 m kerb to kerb. A typical neighbourhood street is a 9 m roadway inside a 15 m right of way.
- Pavement through zone: 1.5–2.1 m residential, 2.4–3.7 m downtown — and that is only the walking part. A real pavement adds a furnishing zone at the kerb for lamps and trees and a frontage zone against the building for doors and steps. Model it as one flat strip and you lose both, which is why generated streets look swept clean.
- Kerb upstand: 0.10–0.15 m. The first thing to go missing, and a kerb at zero height turns the street into a painted plane.
Which tools respect this order varies. Node-based procedural systems — Houdini graphs, rule-based city tools descended from that 2001 paper — do start from a street graph, at the price of authoring the rules yourself. Single-pass generative models have no network at all; their roads are texture, not topology. Library-and-placement tools usually start from a grid, which is a network of exactly one class. An agent driving a real editor starts with the network for a mundane reason: laying an arterial is one action, placing four hundred buildings is four hundred. Cuberta works that way, exposing location-level operations over the Model Context Protocol, so the agent draws the arterial, the collectors and the local streets, subdivides the blocks, and reads the scene back between steps. Whether that beats a hand-authored rule graph depends on how much you want to author, and that is an argument of its own.
Blocks second, parcels third
A block is whatever the network encloses; what happens inside it is a separate decision, and the one most generators skip. Six-metre frontages at zero setback give you a terrace. Eighteen-metre frontages with a 7 m setback give you a suburb. The same building library produces both.
| Pattern | Block | Reads as |
|---|---|---|
| Portland, Oregon | 61 × 61 m | Constant junctions, very walkable, costly in road area |
| Barcelona Eixample | 113 × 113 m, 20 m chamfered corners | Dense and regular; every corner is a small square |
| Manhattan | 80 × 274 m | Short cross-streets, long avenues; direction has meaning |
| Post-war suburb | 150–250 m, curved, cul-de-sacs | Few junctions, poor legibility on foot |
Take the ratio rather than the number. Portland puts a junction every 61 m, one every 45 seconds at a 1.4 m/s walk; Manhattan puts one every 80 m along one axis and every 274 m along the other, which is why the two feel like different cities. For a game the practical range is 60–120 m per side: below 60 m most of your ground area is road surface, and above 120 m the player walks too long between decisions past exactly the long blank block faces where generated cities look most generated.
Setbacks, frontage, floor heights
Setback is the one number separating a high street from a residential one: continuous commercial frontage has none, a terrace has 2–4 m of front garden, a detached suburban house 6–8 m and a driveway. Frontages that hold up are 5–7 m for a terraced house — the classic Brooklyn brownstone sits on a 6 × 30 m lot — 15–25 m for an urban apartment building, and 12–20 m of parcel for a detached house. Corner parcels are wider than their neighbours almost always; corners are worth more, they get the shop, and the Eixample built the difference into the plan as a 20 m chamfer.
Vertically, one convention keeps rooflines honest: residential floors run 3.0–3.3 m floor to floor, offices 3.6–4.2 m, retail ground floors 4.5 m and up, so four residential storeys is 12–13 m to the eaves. When generated buildings disagree about this, adjacent facades disagree about where their floor lines are and the street reads as a collage.
Junctions are where generators fail
The junction is the one place where the geometry of two roads must resolve into a single surface, and nothing in either road's own definition says how.
- Overlapping surfaces. Two road meshes crossing gives coplanar polygons and a flickering patch mid-intersection, visible from the first frame.
- Pavements passing through each other. The kerb line has to turn the corner; two strips extruded along their own centrelines cross instead.
- Nothing at the corner. Standard kerb radii are 3–4.5 m, dropping to 1.5–3 m in urban residential settings and under a metre in some cities. One radius everywhere gives drag-strip corners in a terrace or knife edges on an arterial.
- Width mismatches. A 12 m arterial meeting a 7 m local street needs a transition; without one the local kerb line ends in mid-air 2.5 m short.
- Markings at the wrong angle. Crossings stamped at 90 degrees onto a junction that meets at 70, and the whole intersection reads as decal work.
- A corner building that is not one. In a real city the corner parcel is the shop, the pub, the wider building, the chamfer. Rotate the mid-block building 90 degrees instead and the junction has no landmark, so the district has no navigation.
The test is one camera move: viewpoint at 1.7 m, stand in the middle of a junction, turn through 360 degrees. Survive that and the rest holds. Fail it and no skyline saves you, because the player spends the whole level at that height.
Repetition is the tell
A generated city gives itself away through repetition long before it gives itself away through geometry. Down a 100 m block face a player sees ten to fifteen building fronts at once; two identical ones in that view and the illusion is finished. Most of the variation on offer is faked:
- Facade kits. Six to ten wall panels recombined — industry standard, genuinely effective, until the same window mullion turns up in five buildings in a row.
- Colour jitter. A hue shift on an albedo tint. Convincing in an aerial screenshot, useless at 10 m, because the geometry underneath has not moved.
- Rotation and mirroring. A mirrored house is the same house; the eye reads silhouette and proportion, not handedness.
- Random scale. The worst of the four, because it breaks what was right: doors stop being 2.0–2.1 m and floor lines stop meeting the neighbour's.
Earned variation comes out of the plan instead. Parcel widths that vary because the subdivision varied. Buildings of different ages on one street, with different floor heights and one narrow infill squeezed into a demolition gap. Rooflines that step because the ground steps, since even a 1:40 slope forces the eaves into a staircase. And a few buildings that are the wrong thing entirely — a substation, a church, a multi-storey car park. Five of those in a district of three hundred do more for believability than another twenty facade variants.
The rule separating the lists: variation you can explain is variation that reads. If you cannot say why this building differs from its neighbour, the player cannot either, and the difference registers as noise. A rule-based generator varies only what its rule set exposes — a good set exposes a great deal, a hasty one exposes colour. An agent inside an editor can be told to put a small church on the north-west block and step the terrace down towards the river, and that sentence becomes five specific objects rather than another parameter.
How many buildings a district actually needs
You do not choose the building count. You choose block size and frontage width, and the count falls out of the arithmetic. An 80 × 110 m block has a 380 m perimeter; divide by the frontage and you have the buildings that touch the street: 63 at 6 m terraced frontages, 31 at 12 m townhouses, 17 at 22 m apartment buildings, or 1 for a perimeter block around a courtyard.
A walkable district is roughly 400 × 400 m, under five minutes to cross at 1.4 m/s. At a 100 m street pitch that is sixteen blocks: 270 buildings at 17 each, 500 at 31, and a thousand at 63, which is a different project. Two hundred to four hundred street-facing buildings is the useful range — enough to fill every view down every street, few enough that you can look at all of them yourself.
Unique meshes are a separate and much smaller count. If a street view shows twelve frontages, you need fifteen to twenty distinct building bodies before repetition stops being visible, plus two placement rules: identical buildings never adjacent, never twice in one view. Twenty bodies with three roof variants and a facade kit will carry three hundred placements. Four bodies with colour jitter will carry nothing, however many you place.
Describing a city to an agent
Whatever generates the city, the description should read like a planner's brief rather than a mood board, and the order matters as much as the content — network, blocks, parcels, buildings, furniture, light. Written that way each sentence constrains the next, which is the dependency chain the geometry has to respect anyway.
A downtown-fringe district, 400 × 400 m, flat. One arterial runs north to south through the middle: two 3.3 m lanes each way, a 2 m planted median, 3.5 m pavements both sides. Two collectors cross it east to west at 130 m spacing, 8 m kerb to kerb. Local streets fill the rest at about 90 m spacing, 7 m kerb to kerb, parking on one side. Blocks are 80 × 110 m. Along the arterial: continuous five- to seven-storey brick and stone, zero setback, 4.5 m ground floor with shopfronts, 3.1 m above, frontages 14 to 26 m. On the local streets: three-storey brick terraces, 6 m frontages, 3 m front gardens behind low railings. Corner parcels take a wider building with a chamfered ground floor. Kerb radius 4 m at the arterial junctions, 2 m elsewhere. Lamps every 30 m on the arterial. One block is a park, one a surface car park, and a small church stands on the north-west block. Late morning sun from the south-east.
Every sentence is checkable in the viewport, which is the property that matters: when the result comes out wrong you point at the sentence that was ignored — the collectors are at 90 m, not 130 — instead of rewriting the description and rolling again. The same structure-over-adjectives principle applies to any scene generated from text, but cities punish vagueness harder, because more parts have to agree with each other.
What you leave out matters as much: every constraint is one you will have to verify, and forty numbers take longer to check than the district takes to build. If the agent drives an editor rather than a web form, the brief can also arrive in pieces — mark the area it may build in, let it lay the network, walk one junction, and only then let it fill the blocks. In Cuberta every step can be undone, so a wrong carriageway width caught at the first intersection costs a minute instead of a rebuild.
Interiors, and whether you need them
For a city district, mostly not. Three tiers, in order of cost:
- Opaque glass. A dark, slightly reflective material on the window plane with nothing behind it. Honest at grazing angles, a solid block head-on at 5 m.
- Interior mapping. A shader technique published by Joost van Dongen in 2008: the pixel shader raycasts against imaginary floor and wall planes behind the window and samples a room texture at the hit point, so windows get real parallax with no interior geometry and nothing extra to store. It carries the windows of most open-world cities and, per hour spent, is the highest-value thing you can do to a generated district.
- Real modelled interiors. Walls, floors, furniture, lights, and a door onto the pavement at the right height.
What matters is not how many buildings you have but how many the player can enter — in most city levels three to ten out of several hundred. Build those down to the furniture and give the other three hundred a shader. Generating interiors for everything multiplies the object count roughly twentyfold for rooms nobody enters and makes the ten that matter worse, because those need a person deciding where the sofa goes. Cuberta builds furnished interiors as well as districts; spend them on the enterable list, not on the skyline.
Decide that list before you generate the district. An enterable building has requirements a facade does not: a door aligned to the pavement, a ground floor at kerb height plus a step, a footprint that is not 6 × 30 m of pure corridor, and a reason to go in. Retrofitting those into a building generated as wallpaper costs more than building it right the first time.
Where the first hour goes
Build the network and stand on a junction before you generate a single building. Roads cut blocks, blocks make parcels, parcels position buildings, and each step constrains the next. Generators that respect that order produce cities which are boring from the air and convincing on foot — the right way round, since the player never sees the aerial shot. Generators that invert it produce the opposite, and the opposite cannot be fixed downstream: there is no operation on a building that puts it back onto a street it was never placed against.