Scattering a few hundred rocks, crates, or dead trees across a level by hand burns a weekend, and most tutorials for Unreal Engine's Procedural Content Generation system only show you scattering Epic's own foliage meshes — never the GLB props you actually downloaded or bought. PCG went production-ready in Unreal Engine 5.7, at roughly 2x the performance of the 5.5 beta, and the Static Mesh Spawner node takes any static mesh sitting in your Content Browser, custom imports included. Here's the exact graph, where the mesh selector setting trips people up, and four gotchas that cost a weekend if you hit them blind.
The PCG graph in four nodes
![]()
Every scatter graph starts the same way, and none of it touches C++ until you need runtime control:
- Create a PCG Graph asset (right-click in the Content Browser → PCG → PCG Graph), then drop a PCG Volume into the level, or add a PCG Component to an actor and assign the graph to it.
- Add a Surface Sampler node to generate scatter points across a landscape or static mesh surface — the entry point for most environment graphs.
- Add a Transform Points node downstream to randomize rotation and scale per point, so you don't end up with a field of identical clones.
- Add a Static Mesh Spawner node and connect the Transform Points output pin into its input pin.
That's the whole graph. In the Static Mesh Spawner's Details panel, open Mesh Entries, click the + button, and pick a static mesh from the Content Browser. Generate runs automatically in-editor, and the points populate with your mesh immediately.
Feeding it assets you didn't model yourself
The default Mesh Entries list only takes one or two meshes typed in by hand — fine for a demo, useless once you're scattering a mixed forest of props. For real variety, switch the spawner's Mesh Selector Parameter from the default to PCGMeshSelectorByAttribute and point it at a "Mesh" attribute carried on the points; each point can then reference a different static mesh, so ten prop types scatter in one pass instead of ten separate graphs.
The props still have to land in the Content Browser first. BitSoul's Unreal Engine plugin imports GLB models straight into the content browser with materials wired up, which skips the usual import-then-fix-materials detour before a mesh is even eligible for a Mesh Entries slot. Young Treant, a nature-category prop tagged for Unreal Engine, is a reasonable stand-in for testing point-attribute variation before committing to a full prop set. A free account's two monthly downloads cover evaluation; commercial use is included with paid memberships (pricing).
Static Mesh Spawner settings that actually matter
Four settings break scatter graphs on the first try:
- Affect Distance Field Lighting — this checkbox lives in the Static Mesh Spawner's advanced settings and defaults to on. Leave it on across a few hundred instances and frame rate drops hard; turn it off unless the scattered props specifically need distance-field shadowing.
- Grass component crash — assigning a Landscape Grass Type or UGrassInstancedStaticMeshComponent as a Mesh Entry crashes PCG outright (tracked as UE-215164). Use a plain static mesh reference, not a grass-system component.
- Synchronous vs asynchronous load — the spawner loads meshes and materials asynchronously by default, correct for editor authoring but a source of pop-in on a packaged build's first frame. Switch to synchronous loading for anything the player sees the instant a level loads.
- Nanite swaps ISM for HISM automatically — PCG changes the underlying instance component type for Nanite meshes without asking, worth knowing if you're profiling instance counts against a budget instead of trusting the editor's default.
Editor Time, Runtime, or On Demand — pick the right trigger
The PCG Component's Generation Trigger decides when the graph actually runs, and the default isn't what most gameplay use cases want.
| Trigger | When it runs | Good for | Catch |
| --- | --- | --- | --- |
| Generate at Editor Time | Once, in-editor; baked into the level | Static hero scenes, hand-placed dressing | With World Partition, output bakes per streaming cell — move the volume later and packaged builds can ship with stale or missing instances |
| Generate at Runtime | On BeginPlay, every session | Procedural levels, roguelikes, seed-based worlds | Runs server-side only in multiplayer by default; clients see nothing until replication is handled explicitly |
| Generate on Demand | Only when called | Player-triggered scattering — mining, building, destruction | Nothing happens without an explicit call, and it's just as easy to forget the matching Cleanup call |
Calling On Demand generation from C++ looks like this:
```cpp
// Generation Trigger = GenerateOnDemand
UPCGComponent* PCGComp = MyActor->FindComponentByClass<UPCGComponent>();
if (PCGComp)
{
PCGComp->Generate(/*bForce=*/true);
}
```
Runtime generation has its own failure mode worth testing early: graphs that behave fine in PIE and even in a standalone player can hang with a "Not Responding" packaged build if the graph is heavy and fires on the main thread. Test a packaged build before leaning on Generate at Runtime for anything beyond a small graph, and budget instance counts the same way you would for hand-placed props — a PCG graph places meshes faster, it doesn't make them cheaper to render. Source meshes still over budget going in are faster to fix before the graph ever sees them; reducing GLB poly count in-browser covers that step. The GPU instancing comparison across Unity, UE5, and Godot covers the same ISM/HISM tradeoffs PCG relies on under the hood.
When to use PCG instead of the built-in foliage tools
Epic's Procedural Vegetation Editor and Nanite foliage pipeline (see what changed with Nanite foliage in 5.7) are the better choice for actual foliage at Nanite scale — millions of grass blades and leaf cards. A PCG graph built around Static Mesh Spawner is the better choice for everything else: rocks, crates, ruins, market stalls, any discrete prop that isn't a Nanite-optimized vegetation asset. Running both in the same level is normal — foliage tools cover the ground, a PCG graph covers what sits on top of it.
---
*This post is part of the Ultimate Guide to Free 3D Game Assets — BitSoul's complete reference for formats, texturing, rigging, optimization, and engine integration.*