PLAYABLE TECH DEMO: GPU Grass Renderer
Added 2018-04-27 19:56:52 +0000 UTC
I was working on this partially as an excuse to teach myself to use DrawMeshInstanced for drawing large quantities of meshes in a scene, but I also ended up learning basic physics "simulation" and made a velocity field purely through improvisation.
The other reason I created this was because I'm hoping to make a lot of environment art & rendering tech for an unannounced game I'm working on by myself.

It was heavily inspired by the dynamic grass found in thatgamecompany's 2009 game Flower, albeit here I'm using lines geometry instead of triangles (mainly for stylistic choice, though I'm not certain if there's much performance gained through using exclusively lines).
In the future, I would like to try writing a tutorial on either physics simulation vector fields and maybe how to write this grass renderer yourself, but it's still very rough and early.
Right now, there's only a WebGL build available, but if there's enough demand, I'll post standalone Windows, Mac, and Linux builds.
I'm still trying to gauge performance and don't have access to any other computers than my main rig with a GTX970 GPU, so if anyone could share their specs and performance results under different grass densities, I would greatly appreciate it!
Comments
unfortunately, WebGL caps the framerate at 60fps no matter what which is why I'm considering releasing a standalone build soonish.
ompuco
2018-04-30 08:47:43 +0000 UTCIs the fps locked? With a 1070 gpu I can't seem to get over 60, also an option to increase the density further would be cool. Funny enough this looks more like green fur to me ;)
Dana F
2018-04-28 14:53:52 +0000 UTCcurrently getting about 40 fps with 262144 blades at 4k, on a mbp 13 with an intel iris plus 650 iGPU so that's pretty darn fast dude
Sam Loeschen
2018-04-27 20:50:54 +0000 UTC