top of page
Search

Unreal Engine 5 PCG - Replicating Horizon zero dawn procedural environment generation

Writer: Soleil D'or
Soleil D'or
Jan 5, 2025
4 min read

Updated: Apr 25, 2025

The recent addition of the PCG (procedural content generation) framework in Unreal Engine 5.2 caught my attention, and I was curious to dive a bit into it and learn how to use it, as it would expand my toolset as a more technical level designer.

Specifically, I was interested in learning how to create large open-world environments using this framework.


As of late, I have also been playing a lot of Horizon Zero Dawn, and one thing that really got me into the game (aside from the super cool giant machines) was how beautiful and varied the environments were. I found it really fascinating to see how many different biomes the game had, going from snowy mountains all the way to deserted canyons, in a completely seamless way.


So I was set for my new project; I wanted to learn how to use PCG to create a tool that would procedurally generate open-world environments, similar to Horizon Zero Dawn (but definitely much more simplified...)



Research

I started by researching PCG as much as possible, but the lack of Unreal Engine documentation made it a little difficult since the PCG feature was only just released. I spent most of my time trying to reverse-engineer the official UE demo project and reading about all the nodes and experimenting.

What was great about PCG is that it has really intuitive and visual previews of what's being generated, so I could always see in real-time what each node was doing, which made the process a lot less complicated!


As I was developing a tool, I was also interested in learning how similar industry-level tools worked and what kind of considerations went into them. I was able to find two really helpful GDC talks that went into a lot of detail about the procedural environment generation pipeline for Horizon Zero Dawn and Far Cry 5.


It was interesting to see what considerations such a tool should have to be used not only to generate environments but also to give level designers control over the generation in meaningful ways.


Tool's features:

  • Generate environments with multiple biomes, seamlessly blending


The biome generation samples the landscape layer material painted below and generates biomes based on that, meaning that each landscape layer is its own biome, which allows users to very easily "paint" biomes onto the landscape.

I was really interested in this approach because of how intuitive and user-friendly it was, and it also allows users to make biomes transition smoothly from one to the other.



The biomes generated are quite rudimentary. This tool is meant to be a base to build upon and allows users to easily add their own logic, change the meshes used, and tweak parameters to suit their needs. They can make the generation as complex and in-depth as they wish for it to be.


  • Create paths that integrate into the generation

Just like disabling generation, creating paths works using splines to make them as accessible as possible. Users simply have to add the tag "path" to the spline, and PCG automatically handles the rest. The generation is also disabled along the spline, avoiding having trees and rocks in the middle of the road.



To create more realistic looking paths I found yet another experimental plugin (Landscape patches) which would alter the terrain generation non-destructively, so that it could be easily editable and look more interesting! This allows paths to look more realistic and affect the terrain mesh, making them look like they are part of it.


  • Block out the generation for some areas, allowing for hand-placed content

Once again, I was interested in finding the most user-friendly and intuitive way of getting that feature added.

What I found was that there was a node to disable all generated points from inside a spline, which made my work really easy. Now users only had to create a closed spline, shape it to match the area they wanted to disable generation for, and add a tag to it!



The disabled area could be visualized in editor as the spline, was easily editable, and users can even decide to still allow grass and smaller vegetation to spawn, or completely disable all generation.


  • Performance ?

Since this is an editor tool, it does not change performance at runtime at all, this is just a way to procedurally place meshes in editor. The LODs and resolution of the meshes is what will really impact performance.

One tweak I made to my PCG graph was simply adding culling distances for smaller grass patches or bushes, and it already helped maintain a solid 40fps.


Conclusion

This project was a pretty neat introduction to PCG and how procedural content works with level design in open-world games. I definitely gathered really good insights! I think that for me, as a level designer, this project was especially useful as I will certainly come to work with tools like this one in my career. Understanding how they are made and what considerations go into them will help me a lot!


I initially aimed to have a tool I could publish on the Unreal Marketplace for others to use, which is why I put so much emphasis on user experience and accessibility. This was a new set of considerations I had not worked with before!

In the end, I could not really publish it because PCG was still an experimental plugin, and either way, I do think that the tool I made is quite limited. It serves more as a foundation to build upon, I think.


Regardless, I am quite happy with the result and its learnings! I might even use it in future projects!

 
 
 

Comments


bottom of page