My work at Refactor Games
My development skills in Unreal Engine improved drastically since originally making this prototype to learn about UE's procedural content generation system. Hence the PCG graph shown below is vastly optimized (and easier on the eyes) over the original while also showcasing some major improvements. The first of these improvements being making use of data assets to store what meshes to spawn, their scale, and placement density. Keeping this data asset separate is great for streamlining the process as well as helping environment designers easily interact with the PCG without having to go into the graph itself to make changes. There's also the use of actor tags to prevent sample points from intersecting with specified actors, in this case the trail path will not have any points spawned on it.
Developed in Unreal Engine 5.2 using Procedural Content Generation, Lumen and Nanite. Additionally using the Rural Australia and the African Animals asset packs.
I created this PCG blueprint by sampling the surface of the landscaping, applying noise to it to randomize density, then randomly adjusting the transform (position, rotation, scale) to give a more natural look. The "Intersect with Tagged Actors Geometry" nodes finds all points on the landscape where a specifically tagged actor is located, then by using a difference node for each set of points (mostly) prevents the PCG content from overlapping tagged actors, in this case the road. This could be extended to prevent spawning in a city zone, for example.
On BeginPlay, the GeneratePCG_Event event is called every 5 seconds here which sets the seed to a random integer then cleans up the current PCG and force regenerates the new one. The Day/Night Cycle uses the Sun Location plugin to adjust the sun direction every frame at a desired speed.