Back to case studies

Case study 06 / PCG shader prototype

Voronoi world generation prototype.

A research prototype for dividing a procedural world into controllable regions using a Voronoi pattern generated in an Unreal Engine material, written to a render target, then sampled by PCG for region-based spawning.

Summary

This case study demonstrates a procedural world-generation approach based on Voronoi structures. The available prototype video and images suggest generated region layouts, cell-based terrain or biome boundaries, and world-building experiments for Unreal Engine.

Focus Areas

  • Procedural world generation
  • Voronoi-based layout generation
  • Region, biome, or terrain partitioning
  • Prototype visualization and iteration

System Breakdown

Procedurally generating a map/world is a pretty cool idea but can easily become a rabbit hole if you want to get great visuals out of it since there are so many variables and factors that need your attention !

I was researching procedurall world generation last year and made a prototype based on voronoi pattern. It was useful as a semi-simple way to divide a world into controllable regions.

The Approach

  • Generate a Voronoi pattern in an Unreal Engine Material Graph Custom node
  • Give each cell a random grayscale value range, such as 0.0-0.1, 0.1-0.2, etc.
  • Draw the material to a 256x256 Render Target in Blueprints
  • Sample the texture data inside PCG
  • Use density filters to extract regions
  • Spawn static meshes per region

Features

many features can be applied to this voronoi approach :

  • Texture the regions differently ( grass fields, plowed fields , sand, etc )
  • Create masks by merging couple of cells from random or specific location in the UV ( I did create a city mask for example from center of the UV which can be seen in the video )
  • Group cells (make a centralized region) into biomes ! which can represent mountain, waterbody, city, desert, etc by specific textures and spawnable objects
  • Generate same voronoi pattern in PCG HLSL node and get rid of render target writting/sampling

Result

In the end we went with another approach but this shader was pretty cool !

Email copied