How to Build a 3D Village with an AI Agent, Pass by Pass

From a blank scene to a walkable village in five passes: terrain, roads, plots, buildings, dressing — with the exact instructions to give an AI agent.

A town with streets, crosswalks, brick apartment blocks and cottages, built by an agent in Cuberta

The usual first attempt at a village is one instruction — "build a medieval village with 30 houses" — and back come thirty houses on flat ground, all about the same height, with a road that stops at the last one. None of the geometry is wrong. It is just not a place.

The fix is fewer things per instruction, in the order a real settlement acquired them: ground, road, plots, houses, dressing, light. Five passes and a review. An error in pass 1 costs a minute; the same error found after pass 4 costs the village.

All of this assumes an AI agent driving a real 3D editor: it reads the scene back between steps and you can stop it at any point, which is what makes passes work. Cuberta is one editor built that way — location tools over the Model Context Protocol, a Copy connect command button, a terminal, and the agent is connected. The instructions below are what I would actually type.

Decide the brief before you open anything

Most of the quality is settled before an agent is connected. The test for what belongs in the brief is whether the answer changes geometry: "cosy" does not, "forty-six buildings" does. Write the answers down and keep them — fixed wording is what lets you point at the sentence that got ignored.

The five answers that change geometry

  • How many buildings. A number, not a size adjective. Twenty-five reads as a hamlet, sixty to eighty as a village with a centre, past a hundred and fifty as a small town. Detached housing on 400–500 m² plots runs at 20–25 dwellings per hectare, so fifty-odd buildings want about three hectares — 250 × 250 m with fields around it.
  • Era and region. These pick the material palette and the roof pitch, both geometry rather than decoration.
  • Terrain. Flat, valley, hillside, coast — the most load-bearing of the five. A slope brings retaining walls, stepped plots and a road that switches back; a flood plain brings none of them.
  • Purpose. Walked through at eye height, driven past at 40 km/h, or seen from an RTS camera. This decides where detail goes and where it does not.
  • Where it stops. Fields, forest, water, or a road that leaves the frame — otherwise the settlement fades out into an unfinished ground plane.

Pass 1 — the ground and the road spine

Terrain and roads first, because everything after references them. The road is the spine: buildings hang off it, dressing follows it, a player walks it. Every later pass inherits an error made here.

Empty scene. Make 400 × 400 m of ground as a shallow valley: a ridge along the north edge rising 18 m above the centre, flat ground in the middle, a stream running west to east through the low point. Then one main road, 6 m wide with 1.8 m pavements both sides, entering from the west, curving along the north bank of the stream and leaving at the east edge. Two side lanes off it, 4 m wide, no pavements, about 80 m each, ending in turning circles. A stone bridge where the main road crosses the stream. Nothing else yet — no buildings, no props, no trees.

Two numbers there do real work. Six metres is two three-metre lanes, the real width of a road two vehicles pass on: NACTO recommends 3.05 m urban travel lanes, and 3.0 m is a common minimum for a residential access road. Pavements of 1.8 m let two people pass. Then walk the road edge to edge without leaving the surface; if you cannot, pass 1 is not finished.

Pass 2 — parcels, and where nothing may be built

The skipped pass, and the one that turns a scatter into a village. Buildings sit on plots; plots front onto a road with a consistent setback, and that relationship is most of what makes a street read as a street.

Do not build anything yet. Divide the land along the roads into plots. Along the 200 m of main road through the centre: 15 m frontage by 30 m depth, both sides, set back 4 m from the pavement. Along the two side lanes: wider plots, 25 m by 40 m. Mark as no-build the stream and 8 m either side of it, the ridge above the 12 m contour, both turning circles, and a 30 × 40 m rectangle on the south bank beside the bridge — that is the square, it stays open. Show me the plot outlines before you fill anything.

The no-build sentence is the highest-leverage instruction in the procedure. Agents fill space. Say nothing and you get houses on the stream bank, up the ridge, and in the middle of what you meant to be the green. Naming each empty area by function also stops it being helpfully filled three passes later. In Cuberta you can mark those regions in the viewport instead of describing them.

Pass 3 — the buildings

With plots drawn and no-build zones marked, this pass is arithmetic: counts, one height convention, a footprint range, a closed palette.

Now the buildings, 46 in total. On the centre plots: 30 houses, two storeys, footprints between 7 × 9 m and 9 × 12 m, floor height 2.8 m, doors 2.0 m, gabled roofs at about 40°, all facing the road. On the side lanes: 12 larger detached houses, one and a half storeys, up to 12 × 14 m. Around the square: 4 three-storey buildings — an inn, a shop, a workshop with a wide cart door, a chapel whose tower may reach 16 m. Materials: five only — whitewashed plaster, grey stone, dark timber, red clay tile, slate. Every wall plaster or stone, every roof tile or slate. Vary width, depth, roof direction and colour within that palette. Do not vary floor height, door height or setback.

Variation has to be bounded

The characteristic failure of an unconstrained agent is not repetition. It is reading "make them varied" as licence and putting a 3 m door next to a 1.6 m one. Real vernacular building varies inside a narrow band, because everyone had the same timber lengths, the same brick, the same roof pitch for the local rain. Saying which dimensions may move and which are frozen is what buys a street instead of a sample sheet.

What this pass leaves out

Interiors. Forty-six furnished houses is a different order of work, nearly all of it spent on buildings nobody enters. Build shells now, furnish the two or three that are entered afterwards — that is its own procedure.

Pass 4 — dressing, and the 80/20 of an inhabited place

Most of the "someone lives here" effect comes from three things: something marking the edge of every plot, something showing the place is used after dark, and planting that follows human logic rather than a noise function. The rest is clutter.

Dressing pass. Fences or low stone walls along every plot boundary that fronts a road, 1.2 m high, matching the wall material of the house behind. Street lamps on the main road only, 5 m poles, one every 30 m, alternating sides. Trees: six along the south side of the square, orchard trees in the back half of the centre plots, dense mixed woodland on the ridge above the no-build contour, reeds along the stream. On about a third of the plots, one of a woodpile, a water butt, a cart, a bench, a washing line. Nothing on the road surface, nothing in the square but the trees and two benches.

Residential poles of five or six metres normally sit three to five mounting heights apart, so 18–30 m; thirty metres on a 5 m pole is right for a village that only lit its main street. Note the cap as well — about a third of the plots. Without it every plot gets a woodpile, and regular clutter reads worse than emptiness.

Pass 5 — light and time of day

Set the time to about an hour before sunset in early autumn: sun low from the west-north-west, roughly 12° above the horizon, warm. Clear sky with some high cloud. Bring the street lamps up at low intensity so they read without competing with the sun. Check that the ridge throws a shadow across the eastern plots.

Sun angle is a composition decision more than a lighting one. A low sun rakes across facades, separates one roof pitch from the next, and makes the pass 1 terrain legible; a noon sun flattens all of it. An engine will rebuild the lighting anyway, but set it now: everything in the review is judged under this light.

What goes wrong, and what to say

Three failures account for nearly all of it. It overbuilds: you asked for 46 and there are 71, every gap filled — less disobedience than a default, since ambiguity about extent makes agents expand. It repeats itself: the same house mirrored eleven times down one side of the road. Scale drifts: usually across a pass boundary, so the chapel is right and the houses have quietly shrunk.

What you seeWhat to say
More buildings than you asked forDelete everything outside the pass 2 plots. Forty-six is a limit, not a target.
The same house eleven timesKeep the palette, re-roll the footprints on the north side. No two adjacent houses may share a width and a roof direction.
Everything crept larger after pass 3Measure one door per building against a 1.8 m box; rebuild anything outside 1.9–2.1 m.
Objects floating or half-buriedRe-seat everything on the terrain: nothing more than 2 cm above or below the ground under it.
Roads that stop at the last houseExtend both ends of the main road to the edge of the ground plane.

Two habits prevent most of this. When a pass goes wrong, undo it rather than patching it: fifteen corrections to a bad pass 3 take longer than redoing it with two more sentences, and they leave orphans behind. And restate the frozen constraints — palette, floor height, no-build zones — at the top of every pass.

The review pass, then export

A few minutes here catch what is expensive to fix on the far side of an import.

  1. Stand next to a 1.8 m box. Drop one at the entrance and look down the main street. A standard door is 2.03 m, so it should clear the box by about a hand.
  2. Sample doors and storeys. Eight buildings across the village, one door each. Outside 1.9–2.1 m is wrong, and so are storey heights outside 2.6–3.0 m.
  3. Walk every road. Main road edge to edge, each lane back to its junction, pavements continuous through junctions and across the bridge.
  4. Look for floaters. Orbit low with the sun behind you; a floating object shows up by its missing contact shadow, not its position.
  5. Count materials. If pass 3 said five and the scene reports thirty-four, consolidate now rather than after import.
  6. Walk to the edges. Anywhere a player can reach either continues plausibly or is closed off.

Then export. GLB or FBX with textures covers Unity, Unreal, Blender and Godot. One convention is worth knowing first: glTF is metres, FBX defaults to centimetres, Unity treats a unit as a metre and Unreal as a centimetre, which is why an FBX imported at scale 1 sometimes lands a hundred times off. Building in real metres from pass 1 makes that a checkbox.

Name things by function before exporting — roads, buildings, props, vegetation — so whoever picks the file up has something to select. What follows is separate work: collapsing materials, instancing and LODs, and the import settings that decide how it lands in the engine.

Across all five passes the typing comes to about ten sentences; the rest is looking, which was always the job. Passes are not a feature of any tool — they are what stops an agent from having to hold a whole village in one thought.