Procedural Content Generation Overview

An introduction to the Procedural Content Generation Framework and how it can be used in your projects.

The Procedural Content Generation Framework (PCG) is a toolset for creating your own procedural content and tools inside Unreal Engine. PCG provides technical artists, designers, and programmers with the ability to build fast, iterative tools and content of any complexity, ranging from Asset utilities, such as buildings or biome generation, up to entire worlds.

Important Concepts and Terms

  • Points: Locations in 3D space that are generated by the PCG graph and are often used to spawn meshes. Points contain information about their transforms, bounds, color, density, steepness, and seed. They can be assigned user-defined attributes.

  • Point Density: Value used by a variety of graph nodes. This is represented in the debug view as a gradient on each point. A density of 0 is black, and a density of 1 is white.

Required Setup

The Procedural Content Generation Framework requires the Procedural Content Generation Framework plugin to be enabled in your project. For more information on enabling plugins, see Working with Plugins.

The Procedural Content Generation Framework Geometry Script Interop plugin is required to sample points on Static Meshes.

The Procedural Node Graph

The Procedural Node Graph is the central piece of the Procedural Content Generation Framework.

Using a format similar to the Material Editor, spatial data flows into the graph from a PCG Component in your Level and is used to generate points. The points are filtered and modified through a series of nodes, with the output being updated in real time. The resulting points can be used to spawn a variety of Assets.

Create the PCG Graph Asset

To create a PCG Graph Asset, follow the steps below:

  1. Right click in the Content Drawer or Content Browser, navigate to Create Advanced Asset > PCG, and select PCG Graph.

  2. Choose a name for the new Asset and press Enter.

Editing the PCG Graph

Using the PCG Graph Editor, you can configure and edit your PCG Graph Assets. Navigating the editor is similar to the Blueprint or Material editor. It also contains some PCG specific tools and panels.




Node Palette


Debug dropdown




Details panel


Attributes list

Similar to working with Blueprints, you can add nodes to the graph by dragging them into the viewport from the Node Palette or by using the context menu.

Changes made to a PCG Graph update in real time in the Editor viewport when the graph is connected to a PCG Component and has been used to generate content.

PCG Nodes

The PCG Graph is made of a series of PCG Nodes, each one performing an operation that contributes to the final result.

These nodes are divided into the following categories:




Contains Blueprint-related nodes. This includes the common node to execute user Blueprints derived from PCGBlueprintElement.


Contains nodes affecting color on points.


Contains nodes that help with debugging.


Contains nodes that affect point density.


Contains nodes that filter data based on criteria or per-point.


Contains nodes that control interaction with external data.


Contains nodes that interact with Attributes, whether on points or on Attribute Sets.


Contains nodes that control retrieval of parameters from Actors or Blueprint variables.


Contains nodes that generate points from a source of spatial data, such as volumes, surfaces, and meshes.


Contains nodes that create spatial relationships between data, change their internal spatial data, or retrieve data.


Contains nodes that create new data or place Actors at given point locations.


Contains nodes that deal with using subgraphs.


Contains nodes that modify transform information on points.

Like Blueprints, you can add Comments and Reroute Nodes to improve the readability of your graph.

PCG Component

PCG Component The Procedural Node Graph can sample your Level through the PCG Component. This component holds an instance of your Procedural Node Graph and manages the generation of procedural content, both in the Editor and at runtime. PCG components are added as a component to an Actor or used as part of the PCG Volume, a basic volume useful for quickly setting up procedural content.

To connect a PCG graph to your PCG component, follow the steps below:

  1. In the Editor viewport or Outliner, select the PCG Volume or Blueprint Class that you want to connect.

  2. In the Details panel, click the PCG Component.

  3. Click the Graph dropdown and select the PCG Node Graph you want to use.

  4. Click the Generate button to see your result.

Debugging in PCG

Debugging is an essential part of the PCG workflow.

Each node has a variety of debug options that you can use to visualize the point data at each step of the PCG graph:

  • Debug Rendering

  • Enable / Disable node

  • Inspect

Toggle Debug Rendering for each node by selecting the checkbox for Debug in the node's Details panel or by pressing the D key.

Toggle each node on and off by selecting the checkbox for Enabled in the node's Details panel or by pressing the E key.

You can also display all the points a node generates in the Attributes list by inspecting the node.

Select your PCG component from the Debug dropdown menu. Then, right-click the node you want to inspect in the viewport and select Inspect. Alternatively, you can press the A key.

Create a Simple Forest Volume

A common use case for procedural generation tools is biome generation in an open world environment.

To create a basic forest biome generator, follow the steps below.

This sample uses Materials and Static Meshes from the Megascans Trees: European Hornbeam collection downloaded using the Marketplace.

Create the Level

  1. Create a new Project in Unreal Engine.

  2. Create a new Level using the Basic level template. Save your Level.

  3. Delete the Floor Static Mesh and add a new Landscape to the level using Landscape mode.

  4. Using the Sculpt tools, add some variation to your Landscape.

Create the PCG Volume

  1. Return to Selection Mode and enable the Place Actors window, if it's not currently visible.

  2. Use the Search Classes box to find the PCG Volume and add one to your level.

  3. Scale the PCG Volume to X=8.0, Y=8.0, Z=8.0

Create the PCG Graph Asset

  1. Right click in the Content Drawer or Content Browser, navigate to Create Advanced Asset > PCG, and select PCG Graph.

  2. Name the new asset PCG_ForestGen and press Enter.

  3. Double-click PCG_ForestGen to open the PCG Graph Editor.

Connect the PCG Component

  1. In the Editor viewport or Outliner, select the PCG Volume.

  2. In the Details panel, click the PCG Component.

  3. Click the Graph dropdown and select PCG_ForestGen from the list.

Create the Points

  1. In the PCG Graph Editor window, add a Surface Sampler node to the graph.

  2. Click the down arrow on the Input node to expand it, then connect the Landscape output to the Surface input on the Surface Sampler.

  3. Select the Surface Sampler and press the D key to toggle Debug Rendering.

  4. Back in the Editor window, select the PCG Volume and click the Generate button in the Details panel.

You can now see the points being generated in the Editor viewport. The points conform to the shape of the Landscape.

Add Variation

  1. In the PCG Graph Editor, select the Surface Sampler.

  2. Add more points by adjusting the Points Per Square Meter, Points Extents, and Looseness properties in the Details panel.

    1. Adjust the Points Per Square Meter to 0.15 to add more points to the space.

    2. The Points Extends property controls the size of each point's bounds. Change the X, Y, and Z values to 50.

    3. The Looseness property determines how closely the generated points conform to a grid shape. Leave the Looseness value at 1.0.

  3. Next, add a Transform Points node. This node adds additional movement, rotation, and scale changes to your points with a defined range. Connect the Output pin of the Surface Sampler node to the Input pin of the Transform Points node.

  4. Disable Debug Rendering on the Surface Sampler node and enable it on the Transform Points node.

  5. To add some rotation variation, change the Z value for the Max Rotation to 360. This gives all the points a random rotation between 0 and 360 degrees.

  6. The PCG graph spawns points and rotates them to conform with the normal direction of the Landscape. Disable this extra rotation by selecting the checkbox for Absolute Rotation.

  7. To add some size variation set the X, Y, and Z Scale Min values to 0.5. Change the X, Y, and Z Scale Max values to 1.2.

The end result is a set of points with a good amount of variation.

Spawn the Static Meshes

  1. In the PCG Graph Editor, add a Static Mesh Spawner node to the graph viewport. Connect the Output pin of the Transform Points node to the Input pin of the Static Mesh Spawner.

  2. Select the Static Mesh Spawner.

  3. In the Details panel, locate the Mesh Entries option and click the + button to add a Static Mesh to spawn.

  4. Click the down arrow next to Mesh Entries to open the array.

  5. Click the down arrow next to Index [0].

  6. Click the down arrow next to Descriptor.

  7. Click the dropdown menu for Static Mesh and select the tree that you want to spawn. This example uses SM_EuropeanHornbeam_Forest_01.

You can add additional Static Meshes and balance the variety using the Weight property for each mesh entry in the array. Unreal Engine adds the weight value of all the Static Mesh entries and divides that number by each individual weight to determine the probability of each entry spawning.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey