Any City Generator · Documentation
Roads, Profiles and Your Own Art
A road network is one actor that builds its own roads from a layout of nodes and segments. Each road points at a profile for its lanes, sidewalks and markings, and the network's road style supplies the materials and furniture. This article covers profiles, junctions, left-hand traffic, the road style, swapping the placeholder art for your own, and when the editor rebuilds.
← All Any City Generator documentation1 · The road network
One actor, one layout, its own roads
Place a network from Place Actors > City, or let Generate City or the OpenStreetMap import make one. A network is one actor holding one layout: nodes are points, segments are the roads between them, and every segment points at a road profile. From that layout the network builds its own road meshes, lanes, city blocks and furniture.
▾ Network actor → Details
Everything in the layout is relative to the actor: moving the actor moves the whole network, and the actor's Z 0 is the network's ground. Only the layout is saved; meshes, lanes and blocks are rebuilt when play begins and by the editor preview. Scale the actor uniformly, ideally not at all: lane widths stay in profile units.
2 · Road profiles
Nine road types ship ready to use
Every segment points at a road profile: a data asset for its lanes, sidewalks, curbs, markings, road class and speed limit. A profile holds no materials; the look comes from the road style. Nine ship in /AnyCityGenerator/Data/AnyRoad/Profiles, six city profiles and three rural ones.
▾ Profile → lanes left to right (cm), sidewalks, class, speed
Lanes are listed left to right as seen driving from the segment's start to its end, in right-hand traffic: a two-way street is Backward, Forward; a one-way street has only Forward lanes. The city presets use the six city profiles; the village, countryside and corridor presets swap some of them for the rural ones.
Left-hand traffic uses the same profiles. Set Network > Layout > Driving Side to Left (Right by default) and the network mirrors every cross-section when it builds: lane order reversed, sidewalks swapped, each lane keeping its direction, markings following the lanes. DA_Road_LocalOneWay then has its parking on the driver's left instead of the right. City presets carry their own driving side, and the OpenStreetMap import has a Driving Side setting. A city generated onto the port of a network with the other driving side still generates, but its lanes do not join.
3 · Profile settings
What a profile controls
Open a profile to change it, or right-click a stock one and duplicate it to make a variant. The defaults below are those of a new profile; the nine stock profiles set their own lanes, sidewalks, class and speed.
▾ Setting → default
- Driving lanes carry traffic, one lane each, on asphalt. Direction is read on Driving lanes only.
- Parking and Shoulder lanes are asphalt without traffic.
- Median lanes carry no traffic: they are raised to Curb Height with a curb wall on each edge.
- Lane lines follow the lanes: dashed between lanes of the same direction, Center Line Color between opposite directions, solid edge lines beside a shoulder, parking strip or an edge without sidewalk.
Profiles are shared and not watched. Every network and city preset that uses a profile changes with it, so duplicate a stock profile for a variant. After an edit, click Rebuild Network on the networks that use it: they do not rebuild by themselves.
4 · Junctions
What a node becomes
Each node's shape is decided when the network builds, from how many roads meet there and its Junction Type: Auto (the default), Intersection, Roundabout or Dead End. Select the network and expand Network > Layout > Nodes to set it.
▾ Roads meeting → built shape
- Corner Radius (600 cm) rounds an intersection's curb corners; 0 gives sharp corners.
- Roundabout Radius (2200 cm, at least 300) is the ring's outer radius. Roundabout Lane Count 0 is Auto: the most lanes any approach brings in, at most 3. Each ring lane is Roundabout Lane Width (500 cm) wide and the island gets the rest, at least 300 cm.
- Control (Auto) puts stops, yields or signals on an intersection. Auto picks one from the road classes: a Collector meeting Local streets gets Priority Yield. Controls and signal timing are covered in Traffic and Road Rules.
- Is Port makes a node with one road an open end that can join another network (section 8).
To force a junction where two roads would join as one, set Junction Type to Intersection. Dead End on a node where two or more roads meet gives an intersection and a Warning, and Roundabout on a node with one road logs a Warning.
5 · The road style
Materials, furniture, bridges and collision
The look of a network comes from its road style, set under Mesh > Mesh Builder > Style. BP_AnyRoadNetwork uses DA_AnyRoadStyle in /AnyCityGenerator/Data/AnyRoad. A network without a style logs once and builds no meshes; its lanes still work, because traffic never reads a mesh.
▾ Style setting → default
- Street lights stand every Street Light Spacing along roads with a sidewalk, alternating sides, 60 cm inside the sidewalk's outer edge. None stand within 10 m of a road's end or on a bridge.
- Signal poles and heads stand on each approach of a Traffic Signal junction, at the stop line 80 cm onto the sidewalk, with the head 450 cm up. Stop and yield signs use the same spot on approaches that have one.
- Bridges. A segment whose Structure is Auto becomes a bridge where it rises above Elevation Threshold (Geometry, 250 cm above the network's ground). Bridge makes a deck everywhere; Ground never does. Bridges always get barriers.
- Pillars stand every Pillar Spacing under bridges, plus one under each raised junction, except where a street of the same network passes below. With Trace Ground For Pillars each pillar traces down up to 1 km to World Static collision, so your landscape must be loaded when the network builds; with no hit it stands on the network's Z 0.
- Collision is a hidden mesh per chunk made from every surface except markings, blocking all, built in final builds only. Furniture has no collision.
6 · Your own art
Swap in your own materials, furniture and street lights
The furniture and vehicle meshes that ship in /AnyCityGenerator (Content Browser > Settings > Show Plugin Content) are placeholders. The plugin's C++ writes no material parameter values: road materials get everything from the road mesh, signal heads from per-instance custom data, vehicles from the body's Custom Primitive Data. Any material that reads the same inputs works.
- Duplicate DA_AnyRoadStyle and assign your materials and furniture meshes.
- Set the copy as a network's Mesh > Mesh Builder > Style. For every new network, set it in your own network Blueprint and pick that Blueprint as Default Network Class under Project Settings > Plugins > Any City Generator; Place Actors > City picks it up after an editor restart.
- Click Rebuild Network on each network.
▾ Shipped asset → what your replacement must keep
Fit a furniture mesh with its kind's Offset (X along the facing) and Scale; Material Override replaces every slot. Vehicle Blueprints and vehicle types are covered in Traffic and Road Rules.
Tick Used with Instanced Static Meshes on your own furniture and signal head materials. Without it, Play In Editor draws them with the engine's grey default material. The editor sets the flag by itself only when the material is first drawn outside Play, and then marks it unsaved: save it once. Vehicle materials need no flag.
7 · Rebuilding
The editor preview, and when to press Rebuild Network
With Preview In Editor on (Debug, the default), the network builds in the editor level, so roads show, collide and answer queries while you work. An edit only requests a rebuild; the next editor tick builds when something actually changed.
▾ You do this → the network does
Each build reruns the whole network on the game thread: geometry, lanes, blocks, every mesh chunk, pillar traces and furniture. Its cost grows with the size of the network, not of the edit; unchanged mesh chunks are reused, which only saves uploading and collision cooking. Turning Preview In Editor off clears the network from the editor level.
8 · Large maps
Split a large map into networks joined by ports
A smaller network rebuilds faster. Split a large map into several networks and join them at ports: traffic and routing cross from one network to the next.
- A port is a node with Is Port on and exactly one road. It builds as an open, flush end.
- Two ports join when they lie within 100 cm of each other and face each other. Every lane leaving through a port must find a lane of the other network, so use the same profile and travel direction on both sides.
- To join them, bring the two ports within Port Connect Distance (30 m, Project Settings > Plugins > Any City Generator), select the network that should move, right-click its port node and pick Connect To Nearest Port (only this road bends), Move Network To Nearest Port (this whole network turns and moves) or Add Transition To Nearest Port (this road tapers to the other port's profile). The other network never changes.
- Draw Ports (Debug, on) puts an arrow on every port: orange is open, green means every lane continues, yellow only some, magenta none (usually different profiles).
Traffic leaving through an open port vanishes. End a road that should not continue at a node with Is Port off: it builds a dead end with a turnaround bulb.
Next: edit a network's nodes and roads in the viewport, save and load layouts as JSON, and drive the tools from Python.