Help me make sense of this UE4 foliage tech

inlimbo

Newcomer

It's very cool stuff. And I'm not well versed enough to understand exactly how he's handling the grass in shader, but that's fine. As long as I understand that it's happening as an approximation, without "true" physics, that's all I need to know to bring me to my question: why split this simulation into a mix of approximations and the "true physics" of the palm trees (i'm assuming every leaf is boned and driven by the physics engine)?

Why not simulate the palm trees using simple approximated spring physics that often drive interactive cloth simulation? The same way Prince of Persia extended its approximated cloth and rope physics to generate interactive foliage. The same way Crysis did it. The same way I had assumed Uncharted 4 and Lost Legacy handled virtually every piece of interactive foliage except maybe grass.

Seems odd.
 
Maybe the true physics option is included simply to make the plugin more versatile and maybe those shader interactions are basically happening like spring interactions happened on fixed function hardware. Like I'd assume these elephant ears are boned and simulate just like the palms but it seems like this video is implying they're part of the same shader approximation as the grass:

 
Perhaps as it's new tech it's created with next gen levels of computation available. Personally realistic cloth and or interaction with the world is a very appealing idea. Games feel too floaty sometimes, this might give weight and ground the characters.
 
Maybe, but the approximated spring physics of classical rope and cloth simulation are extremely efficient and are even moreso with more horsepower behind them. So assuming he's not already doing that in compute shaders to render the grass/ground coverage, why not also run those spring physics in compute to handle the palms? With the right constraints in place the end result should be nearly the same.

Edit: Rewatching the original video I posted it looks like the elephant ears are tagged just like the palms when he demonstrates the dynamic radius of the true physics simulations. So, yeah, it would seem like approximated spring physics would offer a more efficient solution.
 
Last edited:
The guy says the grass "shader based sim" uses render targets, so what I'd assume from that is that it stores the sate of foliage as 2D textures encoding squash amount and maybe normal direction, and then some geometry shader distorts the grass models accordingly. Interaction with dynamic objects can be done by simply rendering such object that get close to the grass in texture-space, and interactively updating it every frame, probably unsquashing everything by a bit at every tick. This is much more efficient than having thousands of multi-joint 3D meshes doing collision detection and soft body physics.
 
Makes sense. And in that case I feel like his alternate, physics based sim should be built around approximated spring physics using vertex data rather than bones + the physics engine.
 
Very cool.

I hope to have full blown vegetation in next gen games, something that has always been a generation ahead for Cry Engine games.

$



This is Kingdom Come Deliverance, at least its beta that was no very well optimized but could run without issues on a decent PC and that's Cry Engine, an engine that was not successful this generation and that had to go throught the financial troubles of its owning company,
 
Back
Top