UE5.8 PCG City Generator Deep Dive: How AI Automatically Builds an Entire City

How UE5.8's PCG system and AI combine to procedurally generate entire cities from splines and natural language.
Epic Games demonstrated AI-powered city generation at State of Unreal 2025 using UE5.8's PCG framework and MCP plugin. The system uses a six-layer architecture—from spline-based city skeletons to Shape Grammar modular buildings—where AI designs PCG node graphs that the engine executes locally. The sample project is publicly available, though reproducing the full demo remains challenging.
Introduction: The AI City Generation Showcase at State of Unreal
Epic Games showcased a stunning technical demonstration at this year's State of Unreal conference — using Unreal Engine 5.8's MCP plugin combined with an AI model to generate an entire city. This wasn't simple building placement, but fully automated generation of roads, intersections, distinct districts, parks, trees, building clusters, and the entire city layout.
Unreal Engine 5.8 is the latest engine version officially announced by Epic Games at the 2025 State of Unreal conference. Compared to previous versions 5.4/5.5, UE5.8 features significant upgrades in the PCG framework, Nanite virtual geometry, Lumen global illumination, and more. Epic adopted a leap-version numbering strategy (jumping from 5.5 directly to 5.8), reflecting major changes in the engine's internal architecture. A core theme of 5.8 is "AI-assisted development" — the introduction of the MCP plugin marks Epic's official integration of large language models into the engine workflow, a first among mainstream commercial engines.
The core of this technology lies in the deep integration of PCG (Procedural Content Generation) with AI. PCG is a technical paradigm with decades of history in game development — from early Rogue-like random dungeon generation, to No Man's Sky's 18 billion planets, to Minecraft's infinite terrain, PCG has continuously pushed the boundaries of game world scale. Unreal Engine introduced the PCG framework starting with version 4.27, developing it into a complete node graph system in UE5 that allows developers to define generation rules through visual programming. Unlike traditional random generation, modern PCG emphasizes "controlled proceduralism" — producing diversity within rule constraints, ensuring generated results are both varied and aligned with design intent.
In this demonstration, artists still handle the creation of specific assets like buildings, props, and vegetation, but the city assembly process — road planning, block division, park placement, district generation — is entirely handled by AI.
Even more exciting is that Epic has made this sample project publicly available for anyone to download and experience in UE 5.8. This article, based on the detailed analysis by Bilibili creator SmartPauly, will take you deep into how this city generator works.
Core Architecture of the PCG City Generator
Spline-Based City Skeleton
The foundation of the entire city generator is the Spline system. Splines are mathematical tools in computer graphics used to define smooth curves, with common types including Bézier Curves and B-Splines. In game development, splines are widely used for road generation, river paths, camera tracks, and cutscene animations. UE5's Spline Component allows developers to adjust curve shapes in real-time by dragging control points in the editor, and when combined with the PCG system, can procedurally place meshes, generate terrain, or define area boundaries along spline paths.
The city's shape is defined by a closed loop spline, combined with two crossing "artery" splines that form the city's main road network.

The most powerful aspect of this system is its dynamic responsiveness: when you drag a spline's control points, the PCG graph automatically regenerates the entire city layout. Want to expand the city? Simply stretch the outer loop spline's control points, and roads, blocks, and buildings will automatically fill the new area. This approach is orders of magnitude more efficient than manual placement while retaining the designer's intuitive control over the overall form.
It's important to note that this spline-based procedural generation itself doesn't rely on AI — it's the PCG system's native computational capability. AI's role is in designing and connecting these PCG node graphs, not in executing the generation process in real-time.
Six-Layer Progressive Generation Pipeline
The city generator uses a layered architecture where each layer is an independent PCG graph, stacked sequentially to build the complete city:
Layer 1: City Base A simple PCG graph containing just a few nodes that generates the closed loop spline and crossing main roads, defining the city's overall shape.
Layer 2: Districts Generator Generates grid-pattern road systems around different intersection points of the loop road, creating various small intersections and dividing the city into distinct districts. This layer's design draws from the "Superblock" concept in real urban planning — first establishing the main road skeleton, then subdividing secondary road networks within.
Layer 3: Lot Generator Samples the divided areas to create individual lots for building generation. This step is similar to "Lot Subdivision" in real city development, requiring consideration of constraints like minimum lot area, aspect ratio, and setback distances from roads.

Layer 4: Ground Generates concrete ground surfaces and sidewalks on each lot.
Layer 5: Building Generator This is the most impressive layer — procedurally generating various buildings on the lots.
Layer 6: Leftover Lots Detects vacant lots and generates trees and park areas, adding greenery to the city.
Technical Details of Modular Building Generation
Shape Grammar Building Decomposition System
The building generator uses a PCG system called "Shape Grammar." Shape Grammar was originally proposed by George Stiny and James Gips in 1972 in the field of architecture as a rule-based formal design method. Its core idea is to recursively generate complex architectural forms from simple initial shapes through a set of shape transformation rules (similar to generative grammar in linguistics). In computer graphics, Shape Grammar is widely applied to urban modeling — the CGA Shape grammar proposed by Pascal Müller et al. in 2006 is a representative work, adopted by commercial software like CityEngine. UE5.8's PCG system engineers this academic concept, implementing rule-based building decomposition and recombination through node graphs.
Specifically in this city generator, Shape Grammar decomposes buildings into modular assets — every wall, every window, every door is an independent modular component. Modular asset creation is a standard workflow in AAA game development, with the core principle of decomposing environments into reusable standardized components — for example, a 2-meter-wide wall segment, a corner pillar, a standard window — these components follow unified grid alignment specifications (typically multiples of 1 meter or 0.5 meters) and can be freely assembled like LEGO bricks. Major titles like Halo Infinite and Cyberpunk 2077 heavily rely on modular workflows to build their massive game worlds. The advantage of this approach: a small number of assets can combine into a large variety of results, and modifying a single module globally updates all scenes using that module.
Viewing generated buildings in wireframe mode clearly reveals that each building consists of hundreds of individual wall modules. This means you can replace these base modules with more refined art assets, and the entire building cluster will automatically upgrade in visual quality.

AI's Role in PCG City Generation
A key concept needs clarification here: AI is not generating the city in real-time at runtime — it's responsible for designing the PCG graphs themselves. Specifically:
- Node connections and parameter configurations in PCG graphs — generated by the AI model
- The actual procedural generation of the city — executed locally by the PCG system
- The MCP plugin's role — serving as a bridge between the AI model and the UE editor
MCP (Model Context Protocol) is an open standard protocol released by Anthropic in late 2024, designed to provide AI models with a unified interface for interacting with external tools and data sources. It uses a client-server architecture where the AI model acts as the client, and various applications (such as the Unreal Engine editor) act as servers exposing callable tools and resources. In the UE5.8 scenario, the MCP plugin wraps Unreal editor operations (such as creating Actors, modifying properties, connecting PCG nodes) into standardized tool interfaces, enabling AI models like Claude to indirectly control the editor through natural language instructions, achieving a "conversational development" workflow.
Epic's approach is: first create a set of base PCG graphs as a training dataset, let the AI learn the design patterns of these graphs, and then the AI can generate new PCG graphs based on users' natural language instructions, achieving the effect of "building cities through conversation."
How to Access and Experience the PCG City Generator Sample Project
Setup Steps
- Open a UE 5.8 project, go to Edit → Plugins
- Search for "PCG" and enable "PCG Primitives and Examples Library for World Building"
- In the Content Drawer, click the gear icon and check "Show Engine and Plugin Content"
- Search for the "PCG Primitives Content" folder
- Find the various sample levels in the Levels subfolder
Current Version Limitations
Note that the currently available version is an early concept version with some known issues:
- Road alignment isn't precise enough
- Reference relationships between PCG graph layers may not be fully configured
- There's a significant gap compared to the final version shown in the State of Unreal demo (which included skyscrapers, overpasses, etc.)
Epic plans to release the complete version of the sample project this summer.
Hands-On Experience and Developer Insights
Difficulty of Reproducing MCP Plugin Results
It's worth noting that even using the exact same prompts as in Epic's demonstration, reproducing the demo results through the MCP plugin remains very difficult. This likely means:
- Epic's internal AI model underwent targeted fine-tuning, possibly with specialized training on large amounts of PCG graph data
- The MCP plugin may require specific configuration to correctly reference the PCG base graph library, including precise Tool Description definitions and system prompts preloaded in the context window
- The demo results may depend on additional components not yet made public, such as a dedicated RAG (Retrieval-Augmented Generation) system to provide the AI with PCG node API documentation
This "gap between demo and actual usability" is not uncommon in AI tools and typically requires several iteration cycles to achieve production-ready stability.
Impact on Game Development Workflows
This technology represents an entirely new work paradigm:
- Level Designers: Shifting from manual placement to high-level urban planning guidance, more like a "city master planner" than a "construction worker"
- Environment Artists: Focusing on creating high-quality modular assets while AI handles assembly. This actually elevates the value of art — when assembly costs approach zero, individual asset quality becomes the sole differentiating factor
- Rapid Prototyping: Generating playable city prototypes in minutes, dramatically shortening iteration cycles. Traditionally, the blockout phase of an open-world city might take weeks, while procedural generation can compress this to hours
From a broader industry perspective, this technology could reshape game studio team structures. Open worlds that previously required dozens of level designers to manually build may in the future only need a small number of Technical Artists proficient in PCG rule design working alongside AI tools.
Conclusion
UE5.8's PCG city generator demonstrates the enormous potential of combining procedural generation with AI. While the currently public version is still in an early state, its layered architecture design and modular approach are already very clear. As the complete version is released and the MCP plugin continues to mature, we have good reason to expect that "building game worlds with natural language" will evolve from demonstration to practical production tool.
It's worth noting that this technological direction isn't exclusive to Epic. Unity's AI tool Muse, NVIDIA's Omniverse platform, and numerous independent tools (such as Promethean AI) are all developing in similar directions. However, Epic's dominant position in AAA development with Unreal Engine, combined with deep integration of Anthropic's MCP protocol, currently gives them a clear first-mover advantage in this space.
Key Takeaways
Related articles

AI Programming Learning Roadmap: A Complete Six-Stage Guide from Beginner to Expert
A systematic breakdown of the six-stage AI programming learning roadmap, from zero-code start to mastering Cursor and professional tools, methodology frameworks, advanced patterns, and project practice.

Deep Dive into Devin's Background Agent Architecture: Behind the 80% AI-Committed Code
Deep analysis of Devin's background agent architecture: brain-sandbox separation, environment setup, MCP integration, memory systems, and multi-agent collaboration challenges.

Claude Code in Practice: An In-Depth Efficiency Comparison Between Claude and DeepSeek for Programming
A hands-on comparison of Claude vs DeepSeek V4 for AI programming: code quality, development efficiency, and cost differences. DeepSeek costs 1/6 to 1/10 of Claude but requires 1-2x more time.