i3azres devlog · #3

One script generates the whole village — Blender as our level editor

2026-11-29 · by Akalonx · i3azres engine team

Devlog #3. In #2 we showed point lights placed in Blender traveling inside the .glb. That raised an obvious question: if lights can be authored there, why not the whole city?

One command, one village

blender -b -P gen_cena.py -- --seed 7 — headless, deterministic. The same seed always produces the same village: house variants (5 footprints), trees, rocks, water channels, laid out on a grid. Change the seed, get a different layout. No manual placement, no editor session needed for bulk content.

The terrain problem: nothing floats, nothing buries

A generated village over flat ground looks fake; over real relief it breaks naive placement. So the script builds actual terrain (terrain.build_relief) and then raycasts every instance against it (BVH tree snap):

No blind Z coordinates anywhere — the ground decides where things stand.

The output IS the engine's map format

Here's the part that makes the pipeline special: the script doesn't emit a scene for Blender — it emits placements.json, which is literally our engine's MapDef layer format. Every entry is a layer: file, x, y, z (the snapped height), floor, hideIn, sortY — plus the entities and collision footprints. The runtime reads it directly. Blender isn't a content tool that exports assets; it's the level editor that exports the map.

Details worth stealing

Why this matters

A small team can't hand-place a city. But a script that knows our collision footprints, our texture rules, our light conventions and our map format can generate one — and regenerate it when the design changes. The artist curates the rules; the seed produces the content.

What's next

Devlog #4: interactive doors — how a static mesh became a walkable interior with its own camera rules.