Andrew Walker

technical artist

Multithreaded Realtime Plant Growth

This project uses the C# Job system to grow branching plants over surfaces. With multi-threading, hundreds of branches can grow simultaneously without impacting the game thread.
Surfaces are traversed with looping a-sync ray casts, which output into a pre-sized buffer (this determines the max branches which can be grown in parallel).
The leaves are instanced in script for excellent rendering performance and the plant structure is created procedurally.

As the mesh structure is created in chunks, the growth needs to be lagged behind for a smooth transition. To achieve this, the mesh is alpha clipped by masking growth areas in vertex colour, then smoothly lerping a growth value which is passed into the shader.

Next steps:

– rule based system for creating different types of growth
– detailed VFX
– handle interaction with dynamic objects