This was started as a little experiment to learn Unreal with our studio's switch from proprietary tech to a blended Unreal | RAD Engine in Spring '24. Still had many more features and optimization to lead to full production, but was quickly shaping up to be more versatile, scalable, and performant than I had hoped. Will likely recreate a similar system as a personal project and can take much, much further!
For the needs of an ambitious AAA VR IP and the performance constraints of the platform, this was a solution that ran custom HLSL code through Niagara Grids > Render targets to push rich real-time physical interactions with foliage, cloth, VFX, and gameplay with wind and localized and dynamic forces. The cost was hierarchal to the resolution of the grid, distances, and LODS and therefore had no cost scaling to the number of affected assets. The core HSL code that calculated the grid forces per-frame was running sub 0.02 ms on the GPU and little to no CPU costs. This allowed convincing effects from a gentle breeze to a hurricane force and dynamic interactions from combat, turbines, footsteps, etc that could be achieve with zero simulations and a lightweight LUT based vertex shader animation.
I have many more plans to grow the system, but in this experimental stage it supported:
+ Global Wind Controller
+ Indeterminate number of Local Wind Controllers: Volumes with opacity + falloff to determine local effect
+ Flatten Volumes: Would depress or 'Trample' foliage based on intensity and falloff. Could be temporary or persistent.
+ Dampening Volumes: Reduces wind forces based on intensity and falloff. Effectively allowed 'free' authoring of environmental occlusion from wind based on obstacles, interiors, etc
+ Impulse Volumes: Applied Outwards, Inwards vector impulses, bending, and spin animation. Ex: Turbines, Explosions, Attractors, subtle repulsion from characters moving through, etc)
These forces and volumes could be flagged as 'static' and these layers would be baked and cached in the editor, for zero run-time overhead, or flagged 'dynamic' and the blueprints would be processed in-game for both Sequencer Animations or run-time gameplay scripting. This would allow dynamically animating any force property, position, or scale of the volume, and the various controllers could be layered together for more complex effects (ex: large falling boulder could have an impulse volume push away foliage and FX as it hit the ground and leave a persistent flatten volume so the foliage appeared trampled beneath it). For performance control there was a pooling / throttling, and client LOD system to prioritize any dynamic pools of assets injected (weapon impacts, tracers, character / enemy body & footsteps.