Help me make sense of this UE4 foliage tech

Discussion in 'Console Technology' started by inlimbo, Jul 3, 2019.

  1. inlimbo

    Newcomer

    Joined:
    Feb 16, 2007
    Messages:
    172
    Likes Received:
    18


    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.
     
    eloyc likes this.
  2. inlimbo

    Newcomer

    Joined:
    Feb 16, 2007
    Messages:
    172
    Likes Received:
    18
    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:

     
  3. turkey

    Regular Newcomer

    Joined:
    Oct 21, 2014
    Messages:
    731
    Likes Received:
    423
    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.
     
  4. inlimbo

    Newcomer

    Joined:
    Feb 16, 2007
    Messages:
    172
    Likes Received:
    18
    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.
     
    #4 inlimbo, Jul 4, 2019
    Last edited: Jul 4, 2019
  5. milk

    Veteran Regular

    Joined:
    Jun 6, 2012
    Messages:
    2,858
    Likes Received:
    2,384
    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.
     
  6. inlimbo

    Newcomer

    Joined:
    Feb 16, 2007
    Messages:
    172
    Likes Received:
    18
    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.
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...