Announcement

Collapse
No announcement yet.

Foliage collision + foliage bend on collision- In engine feature?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Foliage collision + foliage bend on collision- In engine feature?

    I've been going through the forums and documentation on my effort to make a decision on switching from Unity to UE4. My amateur project is young enough that switching wouldn't be a huge hassle. So I decided that character models and animation transferring won't be a problem (which was my first question).

    Now my 2nd very important issue is foliage collision physics. In Unity, via a user generated tool from the asset store, I easily applied collision-bending to all my vegetation. It is very key to my game. On any plant, or mesh basically, I can adjust the degree of bend (resistance, bounciness) that occurs when an object hits it. Like painting a texture, just paint the least/most affected areas. Easy stuff.

    It gives the world so much more life. To run through a field and see the grass bending around the character is such a significant enhancement to the experience.

    Is foliage collision bending physics a built-in feature of UE4? I can't find any tutorials. Just collision only. The meshes remain static. Nothing about bending grass, bushes, any mesh. If not a feature, are there plans for more lively vegetation in the near future?

    (Vegetation bending physics is my 2nd of 3 key reasons for me to switch to UE4. First reason turned out great. 3rd is wind. But that comes after grass

    EDIT: I guess more accurately, I'm asking about a grass bending shader - like wind shaders. Not an expensive renderer for each blade or branch. A shader that bends foliage (like a quick small punch of wind) when a character collides with it. Like the character's mesh has a breeze and makes foliage react on direct contact. It is cheap on GPU because Unity does it with the shader I linked below in followup post.
    Last edited by comet; 04-01-2014, 06:54 PM.

  • replied
    GreasyExcretion I believe that's because you need all of it to have soft edges/1 smoothing group. You might also have split tangents.

    Leave a comment:


  • replied
    Originally posted by LukasMKS View Post

    Hey I found this tutorial which does the same thing pretty much but explains the whole process.

    https://jesshiderue4.wordpress.com/m...ayer-movement/

    Your welcome
    I tried this, but for some reason my mesh is behaving like this when I get close. Any idea what's wrong? Does the UV have to be built a specific way?

    Leave a comment:


  • replied
    Hi guys,

    I checked out this forum to create a foliage system that works with the foliage tool and does react physically.
    the systems contain:
    - physical Foliage bending (spawning and despawning physics actors)
    - reaction like forces and impulses (explosions)
    - A vertex shader to add more floatyness to the leaves
    - Fire propagation
    - Foliage trampling by heavy objects

    check it out: https://forums.unrealengine.com/show...tion-Trampling

    Leave a comment:


  • replied
    Originally posted by Alexsander View Post
    I can`t get this to work, I don`t know how to do it!!! Please someone help me! I`m very new to Unreal so I can`t get it to work! I tried putting this material`s nodes into my grass material but I don`t know where to link the last multiply because the image doesn`t show and I can`t find the `Spherepos` node! Please help, I can`t find any foliage collision tutorials, that`s the first one I found!
    Hey I found this tutorial which does the same thing pretty much but explains the whole process.

    https://jesshiderue4.wordpress.com/m...ayer-movement/

    Your welcome

    Leave a comment:


  • replied
    Originally posted by mcgillchris View Post
    [MENTION=46340]richst42[/MENTION] make any progress with this?
    Hi, maybe these tutorials will help. Jonas has a bunch of very informative tutorials on various aspects of UE4.
    https://www.youtube.com/playlist?lis...qE5yc7-g1FaqaP

    As far as getting grass/foliage to stay deformed after moving through an area, I was able to get some results but this still needs more work. Hope that helps!

    Leave a comment:


  • replied
    [MENTION=46340]richst42[/MENTION] make any progress with this?

    Leave a comment:


  • replied
    Hello, been following this thread as I was really interested in dynamic foliage collision as well. The physics driven systems look really impressive until I saw how the NaughtyDog guys did their dynamic foliage in Uncharted4. They spoke about physics solutions being way too heavy for a game. So as far as I can tell it sounds like they've gone for a material approach instead. You can watch the video here: https://youtu.be/VYueRQea74c?t=41m45s. perhaps to get the grass/foliage to stay down after passing through would be to leave a trail of spheres/capsules behind the character that also influence the material bending, then scale down over time to let the foliage lift up again?

    Leave a comment:


  • replied
    I can`t get this to work, I don`t know how to do it!!! Please someone help me! I`m very new to Unreal so I can`t get it to work! I tried putting this material`s nodes into my grass material but I don`t know where to link the last multiply because the image doesn`t show and I can`t find the `Spherepos` node! Please help, I can`t find any foliage collision tutorials, that`s the first one I found!

    Leave a comment:


  • replied
    Originally posted by CommunistSquared View Post
    I got this to work, but does anyone know how I could possibly modify it to keep the grass in the bended position for some time (or permanently)?
    Not using that method, since it's based on an influence sphere that's determined by the material itself.

    The only other way I can think of, would be to generate the 'influence' in a Blueprint and feed it by that. The blueprint itself would have to keep track of the 'influence' areas so to speak and modify it over time. Plus you'd have to convert it to world-space coordinates that the Material could actually use in the vertex shader. You'd essentially be generating a volume of scalar values on the fly, with varying granularity until you can a reasonable performance / graphic compromise. It'd also be pretty inefficient since you'd have a lot of 'wastage' area.

    So in short, no, not easily.

    Leave a comment:


  • replied
    Originally posted by mAlkAv!An View Post
    Just gave it a quick try and came up with this simple material. It's using the UVs green channel to prevent the grass base from being moved away. There are 2 parameters to adjust radius and strength of the bending effect.
    [ATTACH=CONFIG]6384[/ATTACH]
    GIF: http://abload.de/img/grassbent01a7bs0q.gif
    I got this to work, but does anyone know how I could possibly modify it to keep the grass in the bended position for some time (or permanently)?

    Leave a comment:


  • replied
    Yes. Priorities. It really sucks sometimes that they are not employing a few hundred million developers. Then we could have everything we ever wanted in just a few days.

    Leave a comment:


  • replied
    Originally posted by Crocopede View Post
    Is it hard to setup?

    Negative. just time consuming. Simple bone setup and skinning.
    Adjust the constraints in phat with high spring values and angular settings

    Im sure with some projection and linear damping those jitters can be removed.

    In the blueprint just add a box volume and if character or objects enter volume activate simulations. If none disable simulations.
    Pretty simple.

    But keep in mind this approach is fruitless until actors are allowed to be added to the paint foliage tool. It would be too time consuming to place vegetation manually

    The simple bones example
    [ATTACH=CONFIG]31008[/ATTACH]
    2-3 bones should be fine and you prob won't get any jitters. Plants are not that flexible anyway.

    It shouldn't be hard for EPIC to add bending, priorities I guess.
    Last edited by Errvald; 03-20-2015, 08:43 AM.

    Leave a comment:


  • replied
    Originally posted by Crocopede View Post
    Is it hard to setup?

    Negative. just time consuming. Simple bone setup and skinning.
    Adjust the constraints in phat with high spring values and angular settings

    Im sure with some projection and linear damping those jitters can be removed.

    In the blueprint just add a box volume and if character or objects enter volume activate simulations. If none disable simulations.
    Pretty simple.

    But keep in mind this approach is fruitless until actors are allowed to be added to the paint foliage tool. It would be too time consuming to place vegetation manually

    The simple bones example
    [ATTACH=CONFIG]31008[/ATTACH]
    Ah its a shame instanced meshes wont use it, otherwise id invest the time willingly.

    Leave a comment:


  • replied
    Is it hard to setup?

    Negative. just time consuming. Simple bone setup and skinning.
    Adjust the constraints in phat with high spring values and angular settings

    Im sure with some projection and linear damping those jitters can be removed.

    In the blueprint just add a box volume and if character or objects enter volume activate simulations. If none disable simulations.
    Pretty simple.

    But keep in mind this approach is fruitless until actors are allowed to be added to the paint foliage tool. It would be too time consuming to place vegetation manually

    The simple bones example
    Click image for larger version

Name:	bb69b050b4.jpg
Views:	1
Size:	28.7 KB
ID:	1070769

    Leave a comment:

Working...
X