Any City Generator · Documentation

Getting Started

Open a demo map, generate a city, press Play to watch the traffic, connect a new district and import a real town. It all happens in the Any City Generator tab, Place Actors and the Details panel, with no code. You need Unreal Engine 5.8 on Windows; Any City Generator is enabled by default.

← All Any City Generator documentation

1 · See it running

Open a demo map

In the Content Browser, open Settings and tick Show Plugin Content. Then open the AnyCityGenerator Content folder and double-click AnyCityDemoMap or AnyCityDemoMap2. The folder holds everything the plugin uses:

▾ AnyCityGenerator Content

AnyCityDemoMap, AnyCityDemoMap2 The two demo maps
Blueprints BP_AnyRoadNetwork, BP_AnyTrafficManager and six vehicle Blueprints: Sedan, Hatchback, SUV, Van, Bus and Truck
Data City and region presets, nine road profiles, the road style DA_AnyRoadStyle and six vehicle types
Materials, Meshes, Textures Road surfaces, markings, signs and signals, and placeholder vehicle and street furniture meshes

Roads build in the editor viewport while it is Realtime. Select a road network and look at its Details panel to see how it's set up. Traffic only drives in Play (step 3).

2 · Your first city

Generate a city

Open Tools > Any City Generator, or click its button (world icon) in the User section of the level editor toolbar; it is not in the Window menu. The options you'll touch first:

▾ Any City Generator

City > Preset The kind of city. Starts as DA_City_Metro: a grid with a highway and roundabouts
City > Size How many blocks, read from the preset: by default Block 1 x 1, Small 3 x 3, Medium 6 x 6 (the default) and Large 12 x 10. Custom uses Custom Block Count
City > Seed The same options and seed always give the same city. Tick New Seed Each Generation for a new one every time
Placement Where the centre goes: Viewport Center (default; where the view meets Z = 0), World Origin or Custom Location, turned by Yaw Degrees
Traffic > Spawn Traffic Manager If Missing On by default: after generating, spawns a traffic manager when the level has none
  1. Aim the viewport at open ground. For ground that isn't at Z = 0, set Placement to Custom Location.
  2. Click Generate City.

In one undo step the generator spawns BP_AnyRoadNetwork, labels it AnyCity_<Seed>, selects it and builds it. With the default preset and size that is a 6 x 6 grid of 80 to 120 m blocks with an elevated highway. When the level has no traffic manager, BP_AnyTrafficManager is then spawned at the world origin as AnyTrafficManager. Generate Block does the same with a single block.

Try the other presets the same way: DA_City_Town (grid), DA_City_Radial, DA_City_Organic (an irregular town) and DA_City_Village. DA_Rural_Countryside, DA_Corridor_Highway and DA_Corridor_CountryRoad build the land and the roads between towns.

Roads, not buildings. The generator builds roads and leaves the ground under them and the city blocks between them to you. When no highway interchange fits, the city gets no highway and LogAxCity says why.

More about generating cities →

3 · Drive it

Press Play

Nothing drives in the editor level. Press Play: each network builds its roads and the traffic manager fills them. Each vehicle is a BP_AnyTraffic_* actor, listed in the Outliner folder AnyTraffic while playing. On the traffic manager's Details panel:

▾ AnyTrafficManager

Spawning > Spawn Mode Around Viewers (default) spawns only near a player's view; Whole Network fills every road
Spawning > Spawn Radius Around Viewers: vehicles appear within 300 m of a viewer and are removed beyond Despawn Radius (360 m)
Spawning > Max Vehicles 250. With Vehicles Per Kilometer (10), the target count is the smaller of the two
Simulation > Start Automatically Turn off to call Start Traffic yourself
Debug > Draw Debug Shows each vehicle's footprint, junction permission and waiting time

With Around Viewers, put a Player Start inside the city, or switch Spawn Mode to Whole Network. The first fill spawns every vehicle at once, so expect one longer frame. Vehicles keep to speed limits, signals, stop and yield signs, roundabouts and highway merges.

Traffic is local. Nothing replicates: every machine that runs a traffic manager simulates its own. Vehicles react only to each other and to stop lines, routes are random, and there are no pedestrians.

More about traffic and road rules →

4 · Grow it

Connect a new district

A generated city ends in ports: short road stubs at its edge where another network can continue. To add a district, a village or a highway out of town:

  1. Select the city in the level. A city you just generated is already selected.
  2. In the Any City Generator tab, pick a Preset, such as DA_City_Village or DA_Corridor_Highway, and tick Connect To Selected Network.
  3. Open Connect Port and pick one of the listed open ports (Port <id>).
  4. Click Generate City.

The port decides where the new network goes and which way it faces, so Placement and Yaw Degrees are ignored. Its own port lies on the old one, facing it, and the two are joined automatically: traffic drives from one into the other. Continue from the new network's far ports to chain towns, corridors and countryside into a region.

Pick the port with its network selected. Port names repeat across networks, so a pick belongs to the network selected when it was made. With another network selected, generation stops and clears the pick; pick again.

More about connecting districts and regions →

5 · A real place

Import a town from OpenStreetMap

For the streets of a real town instead of a generated one, open Tools > Any City Generator > Any City OSM Import:

  1. For a neighbourhood, use Export on openstreetmap.org, set Osm File to the downloaded file and click Import OSM File.
  2. Or enter a box in degrees (South, West, North, East; up to 50 km²) and click Download From Overpass And Import.

The roads arrive as built road networks labelled <Import Name>_<x>_<y> in the Outliner folder AnyCity/<Import Name>, with their road profiles saved in one asset, DA_OsmProfiles_<Import Name>. Settings > Network > City Parts splits the import into that many networks, joined by ports.

Flat, and credited. Imported roads sit at Z 0 with no terrain; only bridges rise. A game, video or image that shows them must credit “© OpenStreetMap contributors”.

More about OpenStreetMap import →

6 · By hand

Place the actors yourself

Open Window > Place Actors and choose the City category:

▾ Place Actors > City

BP_AnyRoadNetwork Placed with an empty layout, so it shows nothing until it gets one: Network > Layout in the Details panel, Import Layout Into Selected... in the generator tab, or a script
BP_AnyTrafficManager One per level. It runs traffic on every network of its world, including networks added later; a second one would run its own traffic on the same lanes

Project Settings > Plugins > Any City Generator sets what the tools use: Default Network Class (BP_AnyRoadNetwork), Default Traffic Manager Class (BP_AnyTrafficManager) and Default City Preset (DA_City_Metro). Point them at your own variants. Place Actors reads the classes only at editor startup, so restart the editor after changing them.

Keep the defaults where they are. These settings point at BP_AnyRoadNetwork, BP_AnyTrafficManager and DA_City_Metro, so don't move or rename them. A class that fails to load is replaced by its native class, with one Log line: that network builds no meshes and that manager spawns no vehicles.

More about editing layouts →

7 · Checking it works

When something doesn't show

Open Window > Output Log. The plugin logs to LogAxRoad, LogAxCity, LogAxTraffic and LogAxOsm:

▾ Message contains → do this

no Style is assigned The network is built without meshes: set Mesh > Mesh Builder > Style to DA_AnyRoadStyle, or place BP_AnyRoadNetwork
Vehicle Types is empty The manager runs no traffic: fill Vehicles > Vehicle Types, or place BP_AnyTrafficManager
has no set, non-abstract entry in Vehicle Classes That vehicle type never spawns: add a vehicle Blueprint to its Actor > Vehicle Classes
Preview In Editor is off That network is not built in the editor: turn on Debug > Preview In Editor
the default city preset It is unset or could not be loaded: pick a Preset in the tab, or set Default City Preset in Project Settings

A failed generation names its reason in LogAxCity, for example a preset without a generator or without its Local, Collector and Arterial profiles; nothing is spawned then.

That's the basics. Next, see what each preset builds, how seeds and sizes work, and how to join towns, countryside and highway corridors into a region.