Stylised Landscape - Project Breakdown

Having spent a little while in UE5, I was loving creating AAA stunning levels using high poly assets. Awesome!

That was until I saw some wonderful work on 80 Level with stylised and cartoon style graphics and it unlocked my inner-child. At the time of making this I was doing a dissertation on procedural generation, exploring how it works and whether to incorporate it into my workflow. 

Why not mix them together? A stylised landscape using PCG!

The Set-Up

-----------------------------------------------------------------------------------

The first step as always is asset gathering. Job done. Since we are dealing with World Partition, enabling streaming via project settings was done and also enabling the PCG Framework plugin. 


The next step is creating the landscape, I imported a landscape made in Gaea 2.0 and added a landscape material and pressed import.


With the landscape imported I noticed the scale was too big, with a reduction in scale and the landscape material applied...


We now a more playable space. 

My Grass, Not Yours

-----------------------------------------------------------------------------------While the landscape material is great, I want more control over the spawning of the grass and what type spawns. I duplicated the material instance and landscape material, they have a lot of useful parameters, but for the duplicated version, I removed the grass logic. 

I then created a PCG graph and set the surface sampler to Unbounded (Reducing the points per square meter for performance) and did a quick debug to make sure it is applied correctly. 


I examined the map and felt it was missing something, a quick hop into Gaea and I added a river bed layer, saving time manually carving it out and allowing me to get a better grasp on how this world could be laid out in the future.


Another quick debug check is done to make sure the PCG graph is masking other layers such as cliffs.


And by adding the static mesh spawner, we now have MY grass. 


Rocking and Rolling
---------------------------------------------------------------------------------
Grass is nice and all, but to break up the scene other elements need to be introduced. Starting with rocks, I added a density filter and a quick debug shows that there are way too many rocks that will be spawned and they are spawning in less than ideal spaces.


And after adding a static mesh spawner for the rocks, adding a few variations and a quick adjustment of with density filter values, the rocks are spawned.


Trees and Bushes and Flowers, oh my!
-----------------------------------------------------------------------------------
The next step gets even easier, a simple duplication of the rock set up for the trees is all that is needed. After some slight adjustments to the transform points to make sure the trees don't spawn in the air, the scene begins to resemble a forest. We can alter scale and density later, but the scene already looks much better!

Applying rocks, trees, bushes and grass across the landscape fills the basic visual identity of the biome, but to give further weight to certain elements, I used a distance node to add specific plants around trees only. 

These plant have more weight to growing near trees and that filters out over a distance. 


And for the final basic asset placement, flowers. The method is the same, yet the result is phenomenal.

 
The Final Countdown
-----------------------------------------------------------------------------------
Now we have the basic implementation done, we have to optimise it. For now, we have an unbounded volume, however, it is not very performant. The first step is to make sure the volume is partitioned. This way it will follow the partitioning of the world. 


Don't make this mistake! I partitioned the world as it was, when really I needed to reduce the points extents. A driver crash meant I had to restart!


Now that world partitioning is set up, the landscape is set up in streaming zones.

This gives greater control to the zone itself, allowing the PCG to spawn in each partitioned area.

Would You Look At That!

----------------------------------------------------------------------------------

The final result is stunning.


It looks nice, but does it perform well? Absolutely! See for yourself below!
YouTube Video

Comments

Popular posts from this blog

Creating a simple dialogue system in Unreal Engine 5

Remaking Mario in Unreal Engine 5 (Part 1)