CityGen quick start
This guide takes you from an empty level to a small city you can save and reload. It assumes CityGen is installed.
1. Set up the level
Section titled “1. Set up the level”-
In the Place Actors panel, search for
CityGenStreamingManagerand drag one into your level near the world origin. -
In its Details panel, set Terrain Material (under WorldGen | General). Use the included terrain material, or your own (see the FAQ).
-
Open your level’s Game Mode and set Default Pawn Class to
BP_CityGenCameraPawnand Player Controller Class toBP_CityGenPlayerController. Both are included. The RTS camera and the HUD (WBP_HUD) activate automatically, and the HUD comes with Road, Residential, Commercial, Industrial, Demolish, Save and Load buttons already wired up. -
Press Play. Terrain streams in, the HUD shows, and the placement keys work immediately.
2. Draw a road
Section titled “2. Draw a road”-
Press R (or click Road on the HUD) to enter road mode.
-
Left-click on the terrain to add points. The road preview updates after each click. Backspace removes the last point.
-
Press Tab to lock new points to 45° or 90° angles relative to the last point, for clean corners.
-
Press Enter to confirm. The road is built from spline-mesh tiles, and the terrain along it is flattened and cleared of foliage.
-
Press R again to leave road mode.
Bridges appear on their own where a road crosses a river, valley or other low ground. To make a T-junction, end a new road on an existing one: its endpoint snaps to the existing road’s centreline and tucks slightly under it, so the meshes don’t z-fight.
3. Paint a zone
Section titled “3. Paint a zone”-
Press Z, or click Residential, Commercial or Industrial on the HUD. Wireframe cells appear along every road: grey when unpainted, tinted when painted.
-
Left-click a cell. A 4×4 block of cells is painted on that side of the road, and buildings from the zone’s building pool fill the painted cells.
-
To erase, set
ActiveZoneAssetto null and click painted cells. Buildings that zoning spawned there are removed; buildings you placed by hand stay. -
Press Z again to leave zone mode.
4. Place a building
Section titled “4. Place a building”-
Press B to enter building mode. A ghost of the building follows the cursor: green means placement is valid, red means it is refused.
-
Move the cursor near a road. Within
RoadAlignRange(500 cm by default) the grid lines up with the road; further away it uses the world axes. -
Left-click to place the building.
-
Press B again to leave building mode.
Placement is refused if the ground under the footprint is steeper than the building asset’s MaxSlopeDegrees (5° by default), or if the building would overlap another building or a road.
5. Demolish, save and load
Section titled “5. Demolish, save and load”- Press X for demolish mode. A translucent red box shows the building you are pointing at, and left-click removes it and clears the zone cells under it. You can also click a road segment to remove it.
- Press F5 to QuickSave and F9 to QuickLoad. The save holds your roads, buildings, zones and terrain changes. After a load, buildings appear a second or two after the roads, once the terrain under them has finished building.
6. Add day and night
Section titled “6. Add day and night”-
Drop an
ACityGenTimeOfDayactor into your level. (The demo map already has one.) -
Assign your level’s Post Process Volume to its
PostProcessVolumeslot. The actor then blends exposure between day and night. -
Assign your Sky Light to its
SkyLightslot. The actor recaptures the sky everySkyLightRecaptureIntervalseconds (1.0 by default), so you can keep the Sky Light Movable without per-frame Real Time Capture. -
Assign a Material Parameter Collection to
IlluminateMPC. The actor writes theIlluminatescalar to it every tick; the included buildings, lamp posts and light decals read it fromMPC_CityGen. -
Set
TimeOfDayand click Preview In Editor to see the lighting for that time without entering Play.
Controls
Section titled “Controls”| Input | Action |
|---|---|
| R | Road mode |
| B | Building mode |
| Z | Zone paint mode |
| X | Demolish mode |
| Left-click | Add a road point, place a building, paint a cell or demolish |
| Enter | Confirm the road |
| Backspace | Undo the last road point |
| Tab | Toggle the 45° / 90° snap while drawing a road |
| F5 / F9 | QuickSave / QuickLoad |
| WASD or arrow keys | Pan the camera |
| Hold middle mouse and drag | Pan the camera |
| Hold right mouse and drag | Orbit the camera |
| Mouse wheel | Zoom |
Only one mode is active at a time: entering a mode cancels any other.
Where to next
Section titled “Where to next”- Features covers roadside props, sidewalks, zone building pools and the HUD API.
- Troubleshooting covers refused placements, missing sidewalks and props, and night lighting.
