This is an interactive Foliage System with Individual Instance Logic made in Unreal Engine for the game "Eutierria" simulating triggered growth of individual instanced static mesh foliages.
Inhouse Production
Shader, Code
Solo
PC, Steamdeck
Stylized
I am currently developing my indie game "Eutierria". Eutierria is a stylized 3D Platformer about a little creature that is regrowing the environment by moving, exploring and absorbing Miasma to eventually recover more areas.
The goal is to create an interactive, performant system to simulate said growth while also being visually appealing, expandable and easy-to-use.
When I first started out I used the foliage tool that comes with Unreal Engine. The problem was that instanced foliage meshes are drawn as one call, meaning that every change that happens to one single mesh will be effecting all other meshes as well: implementing the growth was one thing but making it happen only to individual meshes was another.
Using actual actors (blueprints with meshes and collision boxes) would totally exceeded the performance but would work on individual plants.
In the end I settled on a mix of both.
Since my game is still work-in-progress the following footage will show placeholder textures and meshes.
I created three different kinds of static mesh foliage materials for each single foliage type (grass, flower-01, flower-02, ...)- alive, dry and dead. Dry and dead type foliage can be regrown and visually turn into vibrant, lush and alive foliage.
Each static mesh foliage consists of the mesh (usually some plants merged into one mesh), the material on the mesh and a really simple collision box around the mesh that checks whether the player triggered it or not. I set up code to keep track of already grown foliage by using structs and data tables.
I am using the foliage tool with instanced static mesh foliages and also one blueprint- a Foliage Instanced Static Mesh Component Class that makes use of custom data fed to the material shader. I am using the delta time for "animating" (lerping) between the states.
It is also possible to change different parameters for both the dry and the alive version, for example: crank up the wind strength for bigger, more lush foliage so it sways more in the wind then smaller, broken foliage of the same type. I can also lerp between two different texture sets: use a smaller, "broken" opacity mask and muddy albedo map for a dried out bush and use a more opaque and fuller opacity texture and vibrant albedo map for a healthy bush.
If there is no texture I can also use a range of colors to blockout where the foliage is placed in the level. The range of color constist of three set colors that connect to a lerp node. It lerps based on the foliage's position. This way the overall look is more natural and less artifial. Of course the colors then can be mulitplied with textures later on to keep a base color but slightly alter it in order to keep that natural look.
I use the same logic I had for the growth to simulate some wiggling when the player moves through the plants. In the code I also handle wind- the speed, direction and strength- which I send to the material via the Material Parameter Collections.
You can reach me basically anywhere,
pick your prefered platform:
or