Unreal Stylized Grass System


Stylized Grass Material done on Unreal5.
Had the opportunity to play around and do a stylized grass shader for an upcoming VR project, the challenge here was to maintain the shader complexity as low as possibly and fake as much features possibly.
The Shader has cloud  and shadows simulations all build in it, as well as a sway and trample system to react to the player movement on the environment.

Material Setup


The Material setup itself is a basic combination of simple workflows. 
The cloud/shadow simulation is created by combining a noise (which pans over time) and a wind simulation that takes a direction (controlled either via parameters or on the level blueprint). I've also choose to disabled the simulation based on how far from the camera it is to avoid the cost when its not necessary.
A import step here was the angle correct normals, so the grass blades bending work with the wind and the trampling and sway systems. 

Subsurface Scattering


I choose to use the subsurface scattering on the material, to create variation of colors on the grass.
The material has a function where you can use vertex painting on the landscape/terrain to create health and dry areas of grass.

Sway & Trampling SubSystems


To give feedback on the player movement i created a SWAY and TRAMPLE system.

The sway system uses a combination of world normal and World position offset to dislocate the grass blade as the player moves through them.

The Trample system is a bit more expensive as it uses a render target to capture the pathing that the player creates on the environment.

Both system have parameters to control how long it takes to the grass blades to bend back to its original positions, the strength of the bending and the radius of the player(s).  

Previous
Previous

WSystem-Unity Tooling

Next
Next

Niagara BOIDS - Swarm