Skip to content
Projects

About

Free, open-source procedural generator for fantasy & historical regions and cities: terrain, rivers, roads, 115 cultures, streets to roofs, in 2D & 3D. Rust/WASM + WebGPU. Imports OpenStreetMap, Watabou and Azgaar FMG.

Games & Emulation

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Magna Urbis logo: a city map inside a compass

Procedural regions, towns and cities for maps and tabletop role-playing games.
Relief, rivers, roads, countryside and 115 urban cultures, from the first hill to the last roof, in 2D and 3D.

Open the V2 alpha · How it works? · Desktop downloads · macOS (Apple Silicon) · Gallery · Discussions · Français

Satellite view of an Italian comune, surrounded by woodland and fields in a river valley


Magna Urbis V2 is in alpha

Magna Urbis V2 is now available as an alpha, in the browser and as a desktop application for Windows, Linux and macOS on Apple Silicon. Create a region, place its settlements, grow their towns, then explore and edit the result as a map or in 3D.

  • Web: magna-urbis.org. No account and no install. Generation runs in your browser (Rust compiled to WebAssembly, with WebGPU when available).
  • Desktop. Download Windows x64 (installer or portable ZIP) and Linux x64 (AppImage or DEB) from GitHub Releases. The app bundles the native Rust engine and native neural relief. It runs without a separate installation of Rust, Node.js or Python.
  • macOS on Apple Silicon. The experimental preview is available as a DMG starting with alpha 0.3.10. The DMG is ad hoc signed and distributed without Apple notarization. GPU inference on a physical Mac remains unverified. Download the DMG
  • V1: the first version stays online at v1.magna-urbis.org.

This is an alpha. Results, settings and saved projects may still change between versions. If something breaks, a report with the share code helps a lot.

What's in the V2 alpha

  • One chain from relief to roof: procedural, neural or imported relief, rivers and lakes, climate and land cover, settlements, roads, towns and buildings, in 2D and 3D.
  • Credible regions: settlements placed by access to water, room and culture; a regional population that keeps even alpine, arctic, desert and Underdark maps inhabited; villages with about one dwelling per household; harbours with quays, pontoons and cranes; fields that follow the farms, rivers and roads.
  • Towns on their terrain: ground, buildings, roads, bridges, quays, walls and moats sit on the drawn relief in 3D, with one shoreline shared by the 2D map and the 3D view.
  • 115 cultures, villages and camps, from medieval Europe to dwarven holds, drow enclaves and myconid towns in the Underdark, mixable in hybrid style sheets.
  • Edit at every level: city, quarter, block, parcel and building, with a parcel merge tool, editable place names and settlement renaming.
  • Map styles (parchment, atlas, topographic, cadastre, satellite, painted satellite, minimal), day and night, through the seasons, with snow and pack ice in winter.
  • Neural relief in the browser on WebGPU and natively in the desktop app, with verified model downloads reused offline.
  • Projects and exports: binary .muproj projects, share codes, recipes, PNG, SVG and heightmaps.

What changed in each desktop version is listed in the release notes.

What it generates

One chain, from the ground up. Every stage can be rerun, tuned or edited on its own.

  1. Relief: procedural terrain with erosion, painted zones (plains, hills, mountains), volcanoes and calderas, or neural relief from Terrain Diffusion. You can also import a heightmap.
  2. Water and climate: drainage, rivers, lakes from a climate water budget, river mouths and coasts, then climate-driven vegetation and land cover. An optional Underdark layer carves caverns, tunnels and lakes into any relief.
  3. Settlements and roads: site choice, a rank-size hierarchy, one regional road network, farms, hamlets, chapels, inns, ferries and remote places on summits, islets or cliff ledges.
  4. Towns and cities: composition and growth phases, quarters and streets, walls, gates and castles, bridges, parcels, a programme of who lives and works where, then building volumes with storeys and composed roofs. Neighbouring towns share their edges. The engine scales from a lone building to a metropolis of a million inhabitants.
  5. Maps: parchment, atlas, topographic, cadastre, satellite and painted satellite styles, day or night, through the seasons, with names and labels as their own layer. Orbit, walk or fly in 3D.
  6. Edit and export: change styles per quarter, parcel or building, reroll a scope, edit roads, rivers and labels. Export PNG, SVG, heightmaps, projects and recipes. With the optional local module, turn a view into an illustration or a battlemap.

115 cultures: 79 historical, fantasy and camp traditions (medieval Europe, bastides, medinas, Chinese and Japanese plans, Maya, Inca, Swahili, dwarven, elven, drow and many more), 27 modern, 8 futuristic and 1 alien. You can blend them in hybrid style sheets. Browse them all in the architectural styles catalogue.

Gallery

All images below are unretouched V2 screenshots.

Satellite views

Desert medina between rocky ridges and a river bend, with irrigated fields
Desert medina and its river valley
Overhead view of a riverside quarter with terracotta roofs, streets and a bridge
Riverside quarter, close up

Cities

Venetian lagoon town on both banks of a river, with canals and red roofs
Venetian lagoon town, 10,000 inhabitants
Dwarven town inside an angular stone enclosure, split by a river
Dwarven hold behind its angular wall
Rectangular walled Chinese city on an orthogonal grid, crossed by canals
Planned Chinese city, rectangular plan
Dense medieval bastide with red roofs in a polygonal wall
Bastide, polygonal plan
Wizard city at night with lit streets and tall towers
Wizard city at night
Tibetan monastery town of white buildings in snow
Tibetan monastery town in winter
Round Persian city inside a circular wall, crossed by a river
Persian round city
Drow enclave of pale buildings on dark rock
Drow enclave

Villages, camps and the countryside

Norse ringfort village with longhouses inside a palisade
Norse ringfort
Mongol ordu camp of white yurts on the steppe
Mongol ordu
Venetian lagoon village with red roofs along a canal
Lagoon village
Elven village hidden under a dense forest canopy
Elven village

Map styles

Town in the parchment style
Parchment
Town in the topographic style with contour lines
Topographic
Town in the cadastre style
Cadastre
Town in the satellite style
Satellite
Dense European metropolis on a river, topographic style
150,000-inhabitant metropolis
Medina quarters along a river, atlas style
Persian and medina hybrid, atlas
Town at night with lit streets along a river
Night
Underdark map of caverns, tunnels and underground lakes
Underdark

Many more in the V2 gallery.

How it works

Under the hood: a Rust engine (terrain, water, settlements, cities, buildings) compiled twice, as WebAssembly for the browser and as a native local service for the desktop app. The interface and renderers are TypeScript with WebGL2 and WebGPU. Neural relief runs in Rust too, with Burn on the desktop and a small dedicated WGSL engine in the browser.

Inspired by Watabou

Magna Urbis is inspired by Watabou (Oleg Dolya) and his Medieval Fantasy City Generator (TownGeneratorOS). The project began as a Python port of TownGeneratorOS. That prototype is long gone, but Watabou's generators remain the reference for what a generated town should feel like: legible, varied and fun to read. Thank you.

Related projects

Magna Urbis is part of a small family of worldbuilding tools.

Neural Earth

Neural Earth generates whole procedural planets, from tectonic plates to local terrain. It combines World Orogen planetary geography with the learned refinement of Terrain Diffusion (Goslin), and adds climate, hydrology, biomes, soils and seasonal rendering, with Python/CUDA or browser Rust/WASM/WebGPU paths.

Magna Urbis's neural relief comes from this work: the Rust port of the Terrain Diffusion chain and the distilled, quantised models published on Hugging Face. The long-term goal is to place Magna Urbis towns and roads into Neural Earth worlds. That integration has not been delivered yet.

Other projects

  • Namebench: a sandbox for personal names and place names. Magna Urbis embeds an extract of it (about 550,000 place names and 51 name generators, linked to its cultures) to name settlements, rivers, lakes, relief and regions.
  • Lineage Lab: a sandbox for population histories and genealogies.
  • Chronos: a deterministic Rust history generator and chronology workshop for procedural worlds.
  • AI RPG Generator: an earlier experiment in RPG content generation with language models and latent diffusion.

Run from source

Requirements: Node.js LTS and npm, Rust through rustup (the toolchain is pinned in rust/rust-toolchain.toml) and wasm-pack. On Windows, also install the Visual Studio C++ build tools.

cd web
npm ci
npm run prepare:v2   # build the Rust terrain and houses WebAssembly packages
npm run dev:v2       # open http://127.0.0.1:5174/v2.html

Other commands, from web/:

npm run build:v2       # static site in web/dist-v2
npm run app:v2:dev     # desktop app in development
npm run app:v2:build   # desktop app and installer for this OS
npm run test:v2        # V2 tests

To run the original standalone V1 map with the prepared WASM packages, use npm run dev:v1 from web/ and open http://127.0.0.1:5173/index.html. Use npm run build:v1 to build the static site in web/dist.

The V2 launch and packaging guide covers the native engine, browser neural relief and the optional Python modules. The Rust README describes the engine crates. Releases follow the desktop release guide; the web build follows the web publication guide.

rust/crates/terrain/   relief, erosion, hydrology, Underdark
rust/crates/core/      settlements, roads, cities and buildings (re-exports terrain)
rust/crates/local/     native local engine service
rust/crates/neural*/   neural relief: native and browser inference
rust/desktop-v2/       Tauri desktop application
web/src/v2/            V2 application
web/src/render/        shared 2D/3D renderers
docs/                  documentation, method notes and the illustrated atlas

Contributing and feedback

Ideas, questions and generated maps are welcome in Discussions. For bugs, open an issue with the version, the share code or recipe, and a screenshot if you can. Read the contribution guide before a pull request.

Magna Urbis is mostly written by AI coding agents (Claude and Codex) under one human architect and reviewer. The Ko-fi devlogs tell how it is built, what broke and what worked.

License and credits

Magna Urbis is free software under the GNU Affero General Public License v3 only (AGPL-3.0-only); see LICENSE. Commercial use is allowed. If you run a modified version as a network service, you must offer its source to its users (section 13).

Third-party code, data, textures and model weights keep their own terms: see the third-party notices, the locked dependency inventory and the retained license texts. Neural relief models derive from Terrain Diffusion (MIT). Thank you to Watabou, Alexander Goslin, and every author of the papers, datasets and libraries this project builds on.

Links

Explore related projects

Loading…