
Unreal Engine Blueprint PCG Marching Cubes Demo
Unreal Engine Marching Cubes Demo is an academic project developed as part of an MSc Computer Games Programming programme. The project explores procedural 3D terrain generation in Unreal Engine 5.5.4, implemented entirely through the Blueprint scripting system.
It provides an editor-focused framework for generating configurable 3D meshes from scalar fields using the Marching Cubes algorithm. 2D and 3D Perlin noise, including Fractal Brownian Motion, are used to generate the volumetric data required to construct terrain with cliffs, overhangs, and other non-flat features.
The project builds upon an earlier Marching Cubes Blueprint implementation, correcting its triangle winding and expanding it into a more configurable procedural terrain generation tool.
View the full academic report →
Overview
The primary goal of the project was to create a highly configurable procedural mesh generation workflow entirely within Unreal Engine’s Blueprint system.
Rather than being restricted to conventional heightmap terrain, the system uses a three-dimensional scalar field, allowing generated environments to contain cliffs, overhangs, and other volumetric features. The included 2D and 3D Perlin noise implementations demonstrate one way of producing this input data.
The resulting tool is primarily intended for editor-based procedural generation and rapid experimentation with terrain layouts and shapes.
Marching Cubes
The core of the project is a Blueprint implementation of the Marching Cubes algorithm.
Marching Cubes evaluates a scalar field and determines how an isosurface passes through each cell before constructing the corresponding triangular geometry.
The implementation builds upon an earlier version of the author’s Marching Cubes Blueprint and corrects the triangle winding so that generated geometry follows Paul Bourke’s winding convention.
Procedural Terrain Generation
The project combines Marching Cubes with configurable noise functions to generate terrain.
A 2D heightmap establishes the general terrain surface while 3D Perlin noise provides underground variation. The relative placement of these inputs can be configured through BP_NoiseManagerActor.
Available parameters include:
- Terrain base height
- Terrain height range
- Underground worm generation
- Fractal Brownian Motion settings
- Octaves
- Lacunarity
- Persistence
- Amplitude
The system also provides options for spherical and cuboid volumetric features.
Blueprint Architecture
The main functionality is divided between three Blueprint actors:
- BP_NoiseManagerActor
- BP_MC_Grid_Manager
- BP_MarchingCubesActor
BP_MC_Grid_Manager provides a wrapper around individual Marching Cubes actors and allows developers to create and manage a configurable grid of generated chunks.
The grid manager exposes parameters controlling cell size, mesh dimensions, and the overall grid dimensions. Prepared chunks can then be generated together through editor controls.

Grid-Based Generation
Terrain is divided into a grid of BP_MarchingCubesActor instances.
The intended workflow is to use PrepareGenerateFullGrid to initialise the grid followed by GeneratePreparedGrid to generate the procedural meshes.
For larger configurations, individual actors can instead be populated and regenerated manually using:
Event PopulateDensityGridEvent RegenerateMarchingCubes
This makes it possible to control generation more carefully when a complete grid would be too computationally expensive.

Custom Noise Functions
The framework is not limited to the included noise implementation.
Advanced users can provide their own noise function through the ComputeNoise function inside BP_NoiseManagerActor.
The function takes a grid position and returns a scalar value, ideally between -1 and 1. Values above the configured threshold are treated as part of the generated surface, allowing the Marching Cubes system to be reused with other procedural data sources.

Perlin Noise and Fractal Brownian Motion
Because the required 3D noise functionality was not available in the required form within Unreal Engine, a Blueprint implementation of Improved Perlin Noise was created inside BP_NoiseManagerActor as Perlin3D.
A Fractal Brownian Motion implementation was then added for both 2D and 3D noise, with editor-exposed controls for octaves, lacunarity, persistence, and amplitude. This produced smoother and more useful terrain variation compared with the initial noise output.


Material and Visualisation
The generated procedural mesh does not directly provide the normals required for the terrain visualisation.
Material_MarchingCubes therefore calculates normals within the material and uses them to produce a gradient based on surface steepness. This makes flatter and more vertical terrain visually distinct within the editor.

Example Environments
The project includes several example maps demonstrating different uses of the framework:
Map_FlatOverhangsMap_LargeTerrainMap_PlanetMap_Platforms
These examples demonstrate that the Marching Cubes system can be used to generate different terrain configurations from the same underlying framework.



Challenges and Problem Solving
Correcting Triangle Winding
The earlier Marching Cubes implementation used an inappropriate winding scheme, resulting in incorrectly oriented triangles.
The updated implementation follows Paul Bourke’s convention and explicitly maps the Blueprint’s local cube vertices to the expected indices.
Implementing 3D Noise
A Blueprint implementation of Improved Perlin Noise was created to provide the required 3D noise functionality. An FBM layer was then introduced to improve terrain smoothness and variation.
Editor Reconstruction Behaviour
Unreal’s editor can invoke construction scripts when procedural meshes are interacted with.
The construction script of BP_MarchingCubesActor therefore recreates its mesh section when called, otherwise the procedural mesh section can be deleted. This behaviour had to be accounted for in the editor workflow.
Performance Limitations
The Blueprint-only architecture provides an accessible editor workflow but limits computational performance.
Blueprint execution does not fully exploit CPU parallelism, while Marching Cubes is also well suited to GPU parallelisation. Neither optimisation is currently used by this implementation.
Attempts to introduce runtime terrain generation were halted after substantial frame-rate bottlenecks were encountered. The project therefore focuses on editor-based generation rather than runtime procedural world streaming.
Future Work
C++ and GPU Acceleration
A future implementation could move performance-critical functionality into a C++ plugin and investigate GPU-based Marching Cubes.
Runtime Terrain Generation
Improving generation performance could allow terrain chunks to be generated and streamed during gameplay, making the tool applicable to a wider range of game types.
Editable Terrain
Future versions could allow generated terrain to be modified directly, either within the editor or during gameplay.
Additional Noise Functions
Alternative procedural noise techniques such as Simplex Noise could provide further methods of generating terrain and volumetric data.
Applications Beyond Terrain
Marching Cubes can also be applied to other procedural content where a volumetric field can be converted into geometry, potentially extending the framework beyond terrain generation.
Technical Details
Engine: Unreal Engine 5.5.4 Scripting: Blueprints Generation: Marching Cubes Noise: 2D and 3D Perlin Noise, Fractal Brownian Motion Mesh: Procedural 3D mesh generation Terrain: Heightmap and volumetric terrain generation Architecture: BP_NoiseManagerActor, BP_MC_Grid_Manager, BP_MarchingCubesActor Workflow: Editor-based procedural generation Rendering: Procedural Mesh, custom material-based normal calculation Project Type: Academic coursework
Project Status
This project was completed as an academic piece of work for an MSc Computer Games Programming programme.
The final result is an editor-focused procedural terrain generation tool demonstrating how Marching Cubes, custom noise generation, procedural meshes, and Blueprint editor tooling can be combined within Unreal Engine.
The implementation is intentionally focused on demonstrating the underlying procedural generation techniques rather than providing a production-ready runtime terrain system.
Academic Report
The full academic report documents the implementation, technical decisions, challenges, references, and future work in greater detail.
Development Period
March 2026 – April 9, 2026
Academic coursework project — MSc Computer Games Programming