⭐ GPU-driven Interactive Realtime Grass
My touch-grass-simulator
Intro
Inspired by this research paper, I’m building a procedural grass system with physics simulation driven by the GPU Compute Shader in Unity. Still an on-going project, but the physics simulation features are mostly done. Each blade of grass is represented as a quadratic Bezier curve, and the tip of the grass blade is affected by natural forces (wind + stiffness + gravity) and collision. I made a slight improvement on top of the Bezier curve representation for the grass, using legendre-gauss solution for better approximation of the arc length (i.e. the grass length).
I later then integrated grass culling thanks to the power of compute shader (for calculating the number of grass and which grass to render) and indirect rendering. I love compute shader lol…
Demo
In the mean time, this will be the only grass I’ll be touching.
Physics
Culling
Resources
🔗 Responsive Real-Time Grass Rendering for General 3D Scenes
🔗 Bezier Arc Length
🛠️ Tools used
- C#
- HLSL
- Unity