What Is the PCG Framework?
Unreal Engine 5's Procedural Content Generation (PCG) framework is a node-based system that lets you create rules for placing assets in your world. Instead of manually dragging thousands of trees, rocks, and props into your level, you define rules — and the engine populates everything for you.
With UE 5.7, PCG has matured into a production-ready tool. Multithreaded execution, GPU-side processing, and a growing library of built-in nodes make it viable for shipping games — not just prototyping.
If you've ever spent hours hand-placing foliage only to redo it after a terrain change, PCG is about to become your favorite feature.
Why PCG Matters for Modern Game Development
Manual level population doesn't scale. Open-world games need millions of instances across vast terrains, and every terrain edit means redoing placement work. PCG solves this by making placement reactive — change the terrain, and your foliage, rocks, and props automatically adapt.
Beyond time savings, PCG enables:
- Consistency: Rules ensure your biomes look coherent across the entire map
- Iteration speed: Tweak a density slider and see results instantly
- Runtime generation: Generate content at runtime for roguelikes or infinite worlds
- Collaboration: Designers define rules while artists focus on asset quality
Setting Up Your First PCG Graph
Step 1: Create a PCG Volume
Start by placing a PCG Volume in your level:
- Open the Place Actors panel
- Search for "PCG Volume"
- Drag it into your level and scale it to cover your target area
The volume defines the spatial bounds where your procedural rules will execute.
Step 2: Create a PCG Graph
Right-click in the Content Browser and select PCG > PCG Graph. Name it something descriptive like PCG_ForestScatter. Double-click to open the graph editor.
You'll see a familiar node-based interface. PCG graphs flow from left to right:
[Surface Sampler] → [Filter] → [Transform] → [Static Mesh Spawner]
Step 3: Sample the Surface
The Surface Sampler node is your starting point. It generates points across the landscape within your volume.
Key settings to configure:
- Points Per Square Meter: Start with 0.5 for sparse vegetation, 2-5 for dense forests
- Point Extents: Controls spacing between points — larger values mean more spread
- Looseness: Adds natural randomness to the grid pattern
Step 4: Filter Points
Raw surface samples need filtering to look natural. Add these filter nodes:
Density Filter by Attribute Use landscape layer weights to control where assets spawn. Paint a "Forest" layer on your landscape, then filter points to only spawn where that layer has weight above 0.3.
Slope Filter Exclude steep cliff faces where trees shouldn't grow:
- Min Angle: 0°
- Max Angle: 35°
Height Filter Set altitude bounds — no trees above the snow line:
- Min Height: -100
- Max Height: 2000
Step 5: Transform Points
Before spawning meshes, randomize your points for natural variation:
Random Transform
- Rotation: Enable Yaw with 0-360° range
- Scale: Min 0.8, Max 1.3 for subtle size variation
- Offset: Small Y offset (±50 units) breaks grid patterns
Step 6: Spawn Meshes
The Static Mesh Spawner node converts points into actual mesh instances. Assign your tree or rock meshes here.
For multiple mesh types, use a Weighted Random node before the spawner:
- Oak Tree: Weight 0.4
- Pine Tree: Weight 0.35
- Birch Tree: Weight 0.15
- Dead Tree: Weight 0.1
This creates a natural species distribution.
Building a Multi-Layer Scatter System
Real environments have layers — ground cover, shrubs, medium trees, and canopy trees. Each layer has different density and placement rules.
The Layer Approach
Create separate branches in your PCG graph for each vegetation layer:
Ground Cover Layer
- High density (5-10 points/m²)
- Small scale variation (0.5-1.2)
- Grass, flowers, small rocks
- No slope filtering needed
Shrub Layer
- Medium density (1-3 points/m²)
- Bushes, ferns, fallen logs
- Slight slope filtering (0-45°)
Tree Layer
- Low density (0.1-0.5 points/m²)
- Full trees with large exclusion radii
- Strict slope filtering (0-30°)
- Height-based species distribution
Canopy Layer
- Very low density (0.05-0.1 points/m²)
- Largest trees only
- Maximum exclusion radius to prevent overlapping canopies
Exclusion Zones
Use Distance to Spline or Bounds Filter nodes to create clearings around:
- Player paths and roads
- Buildings and structures
- Points of interest
- Water bodies
This prevents trees from spawning inside your carefully designed areas.
Performance Considerations
PCG generates Hierarchical Instanced Static Meshes (HISM) by default, which is the most performant instancing method in UE5. However, there are still things to watch:
Density Management
More instances = more GPU draw calls and memory. Profile early:
- Use Unreal Insights to monitor instance counts
- Set Cull Distance on your HISM components (trees beyond 50,000 units don't need full LOD)
- Enable Nanite on your meshes for automatic LOD management
- Consider reducing density on lower quality settings via scalability groups
Generation Time
Complex PCG graphs can take seconds to generate. For editor workflows:
- Use Partition Actors to break large volumes into cells
- Enable Hierarchical Generation for multi-resolution detail
- Set the generation trigger to "On Demand" during editing, "On Load" for shipping
Runtime Generation
If generating at runtime (procedural worlds, roguelikes):
- Keep graph complexity low — fewer nodes means faster execution
- Pre-generate and cache results where possible
- Use async generation to avoid frame hitches
- Profile on target hardware, not just your dev machine
Biome Zones with PCG
One of PCG's most powerful patterns is biome-aware placement. Different areas of your map use different scatter rules based on painted landscape layers or volume overlaps.
Setting Up Biomes
- Paint landscape layers for each biome: Forest, Desert, Tundra, Swamp
- Create separate PCG graphs for each biome's vegetation rules
- Use Landscape Data nodes to read layer weights
- Blend between biomes at boundaries for natural transitions
Biome Transition Blending
At biome boundaries, both sets of rules should contribute with reduced density. Use the landscape layer weight as a multiplier on point density:
- Forest layer weight 0.8 → Forest vegetation at 80% density
- Desert layer weight 0.2 → Desert vegetation at 20% density
This creates natural gradients instead of hard biome edges.
Connecting PCG with StraySpark's Procedural Placement Tool
While the built-in PCG framework is powerful, it's just one approach to procedural world-building. StraySpark's Procedural Placement Tool takes a complementary approach with rule-based scatter that supports:
- 100K+ instances per second with optimized HISM instancing
- Multi-layer scatter with automatic inter-layer awareness
- Spline-based scatter for roads, rivers, and paths
- Cluster grouping for natural clumps of vegetation
- 4 density modes including painted masks and noise-based patterns
The two systems can work together — use PCG for broad world population and the Procedural Placement Tool for precise, artist-directed areas that need more control.
Common Mistakes to Avoid
Over-density: Start sparse and increase. It's easier to add density than to debug performance issues from too many instances.
Uniform scale: Always randomize scale. Even ±20% variation makes a huge visual difference compared to uniform sizing.
Ignoring collision: PCG doesn't automatically check mesh collision. Use exclusion radii to prevent overlapping assets that look unnatural.
Skipping LODs: Even with Nanite, ensure your source meshes have reasonable poly counts. A million instances of a 50K triangle rock will still cause issues.
Forgetting about gameplay: PCG-placed assets can block AI navigation, line of sight, and player movement. Test your generated worlds from a gameplay perspective, not just visually.
What's Next
The PCG framework continues to evolve with each engine release. UE 5.7 brought significant performance improvements and new node types. Start with simple scatter systems, build confidence with the node graph, and gradually add complexity as your project demands it.
For your next step, try combining PCG with World Partition for truly massive open worlds, or explore how AI-assisted workflows can help you iterate on PCG rules faster than ever.
The days of hand-placing every bush in your game are over. Welcome to procedural world-building.