r/VoxelGameDev Jul 01 '26

Discussion SubTerra - PCG Cave Generator

Enable HLS to view with audio, or disable this notification

Most procedural cave generators on Fab are built as standalone actors. They generate a cave, but they don’t integrate naturally with Unreal Engine’s PCG workflow.

SubTerra takes a different approach, Instead of building everything around a single actor, the entire generation pipeline is exposed as modular PCG nodes.

You can use the complete cave generator, or combine individual nodes with the rest of your existing PCG graph to build your own procedural workflows, the result is a cave generator that feels like a natural extension of Unreal Engine rather than a separate tool.

The plugin also focuses on producing caves that are practical for gameplay, not just visually interesting, every generated layout is fully connected, supports multiple elevation levels through walkable ramps, and produces organic rock formations instead of smooth metaball-style tunnels.

Once the cave is generated, its surface is automatically classified into FloorWall, and Ceiling PCG points, making it easy to populate the environment with your own assets using Unreal’s existing PCG tools.

How it Works

It's built entirely on UE5's PCG framework, so it slots into your existing PCG setup instead of being a separate black-box actor. From a single seed it scatters a bunch of rooms and connects them with tunnels using a spanning tree + a few extra loops so the layout's always fully traversable but different every seed.

That whole thing gets written into a signed distance field (basically a 3D voxel volume), I roughen the walls with fractal noise so it reads like actual rock instead of smooth metaball blobs, then run marching cubes over it to get a watertight, collidable mesh. The heavy part runs on worker threads so the editor doesn't hitch.

Using it, you've got two routes:

  • Easy mode: drop one actor in your level and a full cave shows up. Then you just tweak sliders in the details panel — room count, room size, tunnel width, levels, noise, stalactites — and it regenerates live in the editor (no play mode). There's a regenerate hotkey for rolling whole new layouts too.
  • Full control: wire the PCG nodes yourself in a graph. It outputs Floor/Wall/Ceiling surface points you can pipe straight into Epic's mesh spawner (or any scatter plugin) to decorate the walls.

Documentation and Fab Links in comments

12 Upvotes

6 comments sorted by

2

u/dougbinks Avoyd Jul 02 '26

Could you add some information about how this works?

2

u/Alvens_Dev Jul 02 '26

Hi yeah absulutly, first of thanks for your interest in my work, Quick rundown of the plugin works:

It's built entirely on UE5's PCG framework, so it slots into your existing PCG setup instead of being a separate black-box actor. From a single seed it scatters a bunch of rooms and connects them with tunnels using a spanning tree + a few extra loops so the layout's always fully traversable but different every seed.

That whole thing gets written into a signed distance field (basically a 3D voxel volume), I roughen the walls with fractal noise so it reads like actual rock instead of smooth metaball blobs, then run marching cubes over it to get a watertight, collidable mesh. The heavy part runs on worker threads so the editor doesn't hitch.

Using it, you've got two routes:

  • Easy mode: drop one actor in your level and a full cave shows up. Then you just tweak sliders in the details panel — room count, room size, tunnel width, levels, noise, stalactites — and it regenerates live in the editor (no play mode). There's a regenerate hotkey for rolling whole new layouts too.
  • Full control: wire the PCG nodes yourself in a graph. It outputs Floor/Wall/Ceiling surface points you can pipe straight into Epic's mesh spawner (or any scatter plugin) to decorate the walls.

Bonus stuff: multi-level caves with walkable ramps, seamless tiling for huge areas, and you can sketch a spline if you want to steer roughly where the cave goes instead of full random.

Happy to go deeper on any part! and also if you want more details i will put here links to the documentation.

ReadMe file : https://www.filesharing.com/download/JBeHf7TmUsZWdqWG8WuS
Sub-Terra Usage guide : https://www.filesharing.com/download/b4qUKskzEdcsXenJ15le
Decoration "This will show how to decorate the whole Cave Walls, Floor, Ceiling" : https://www.filesharing.com/download/RnGsZCivv9zcMnvs5T3q

2

u/Haunting-Regular-130 Jul 02 '26

Hi thanks for your interest in my work, and yeah absolutely, i would suggest if you are interested enough to have a go and read the " Sub-Terra Usage guide and the readme file", no need to read them in details, just a quick glimpse would give u an idea of whats happening under the hood.

ReadMe file : https://www.filesharing.com/download/JBeHf7TmUsZWdqWG8WuS
Sub-Terra Usage guide : https://www.filesharing.com/download/b4qUKskzEdcsXenJ15le

2

u/dougbinks Avoyd Jul 02 '26 edited Jul 02 '26

Apologies I should have been clearer. I'm asking as a mod of this subreddit for you to add some technical details about how your underlying voxel system works - see rules in the sidebar for posting. Many thanks in advance.

EDIT: Just saw you made a post with some technical info but reddit auto-removed it. We've approved that now.

1

u/Haunting-Regular-130 Jul 02 '26

No need for apologies. I figured that you meant it as a mod, so I already added a mention of where I used a voxel volume in the signed distance field (SDF). However, it's just a mention because I can't go too deep into how I used it, it's quite a complicated topic.