Edit: The grass system demonstrated here was enterily reworked and much more improved and is available as a Tier 3 reward on my Patreon: https://www.patreon.com/GhislainGir
This is a playable demo I created in 2021 in Unreal Engine, using blueprints, to showcase my grass interaction system.
It's an improvement over a previous system I created. It fixes a limitation I had which didn't allow other actors to interact with the grass as well as reduces the overall shader cost. It features extra functionalities like the ability for actors to draw special effects for attacks, spells, impacts and so on.
It uses Render Targets to draw two velocity maps using a clever batch solution to render 32 effects per material draw instead of rendering effects one by one onto a Render Target which, turns out, is super expensive.
GPU wise I'm quite happy with the performance although it still could be improved, CPU not so much (up to 1ms on a TR1950X). I've yet to try to nativize the blueprint and see if it improves performance which it should since the main issue is looping through up to four array for a total of 84 entries, at 60fps... which is... not ideal :). I've ideas to improve that but I guess my next step is to try a fully Niagara based approach and see if that'll work better. Hope you like it!