UE5 PCG: sampling, density, and why nothing spawned

By the Cosindra team · Updated August 7, 2026

PCG is Unreal Engine 5’s procedural content framework: a node graph that generates points, filters them, and spawns things at them. It is how you scatter a forest without placing ten thousand trees by hand.

It is also unusually easy to set up correctly and still get an empty world, because the failure is silent. This guide covers the three nodes that make up the minimum useful graph, what density actually means, and the volume mistake behind most "nothing happens" results.

Three nodes are the whole idea

A PCG graph is a pipeline that turns geometry into points and points into actors. Almost every graph, however elaborate, is an expansion of the same three steps.

NodeJobAnswers
Surface SamplerGenerates points across a surfaceWhere can things go?
Density FilterCulls points by their density valueHow many, and where thinner?
Static Mesh SpawnerPlaces a mesh at each surviving pointWhat actually appears?

The graph is the recipe, the volume is the kitchen

The graph asset does nothing on its own. It runs on a PCG Component, which lives on a PCG Volume actor placed in your level — the volume defines the region the graph is allowed to work in.

That split is the single most useful thing to understand about PCG. One graph can drive many volumes across a level, each generating different content because each sits over different terrain, and editing the graph changes all of them at once.

Density is a value on every point, not a slider

Surface Sampler does not emit a uniform grid of identical points. Each point carries attributes, and density is one of them — a value that later nodes read to decide what survives and how large it is.

A Density Filter keeps points inside a range, so the same sampler feeds a dense-forest look and a sparse-clearing look depending on the window you keep. This is why "make it thinner" is a filter change rather than a sampler change, and why two spawners reading different density bands produce big trees in the thick parts and shrubs at the edges from one sample pass.

The editor calls that build it

The long form gives you full control over every node. Two preset tools collapse the common cases into a single call — worth knowing before you wire a sampler by hand for the twentieth time.

#ToolWhat it does
1create_pcg_graphCreates the empty PCG Graph asset
2add_pcg_nodeAdds nodes — SurfaceSampler, DensityFilter, StaticMeshSpawner
3connect_pcg_nodesWires the pipeline together in order
4set_pcg_node_settingsSets each node’s properties — mesh, density range, point spacing
5spawn_pcg_actorPlaces the PCG Volume in the level and assigns the graph
6execute_pcg_graphRuns generation on that actor’s PCG Component
7get_pcg_graph_infoReads the graph back — nodes, settings and pin connections
create_pcg_biomePreset: Sampler → DensityFilter → Spawner, already connected
create_pcg_spline_samplerPreset: spline-driven scattering for roads and riverbanks

Why nothing spawned

The usual cause is geometric, not logical: the PCG Volume does not intersect the surface you meant to sample. Surface Sampler samples geometry inside the volume, so a volume hovering above the landscape — or sitting entirely beneath it — has nothing to sample and produces zero points, with no error anywhere.

Second most common: the graph was edited and never regenerated. Generation is not automatic on every existing actor, so a fixed graph can still show the broken result until it is executed again. Third: the Static Mesh Spawner has no mesh assigned, which produces points you cannot see.

Put an AI copilot inside your editor

The free Cosindra desktop app connects to your UE 5.7/5.8 project — the assistant works in your open editor, and what you generate with the web tools applies straight into it. Windows & macOS.

Download Cosindra

Frequently asked questions

Why is my UE5 PCG graph not spawning anything?

Check the volume first. Surface Sampler only samples geometry that falls inside the PCG Volume, so if the volume floats above the landscape or is buried under it there is no surface to sample and you get zero points, silently. After that: confirm the graph was regenerated on the actor after your last edit, and that the Static Mesh Spawner actually has a mesh assigned — points with no mesh are invisible but present.

Should I use PCG or the built-in Foliage tool?

Foliage is for painting by hand and is hard to beat when you want direct artistic control over one area. PCG is for rules — "trees on slopes under 30 degrees, thinning near the river, none within 5m of the road" — that you want applied consistently and re-applied automatically when the landscape changes. Painted foliage does not update when you resculpt terrain; a PCG graph regenerates.

What does density mean in a PCG graph?

It is a per-point attribute produced by the sampler, not a global setting. Every point carries a density value, and a Density Filter keeps only the points inside a range you specify. That is why one sample pass can feed several spawners — one taking the high-density band for large meshes, another taking the low band for scatter — and why thinning an area is a filter change rather than a re-sample.

Keep reading