Announcement

Collapse
No announcement yet.

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

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

    #31
    How does that collection parameter node named sphere pos work? How do you create such a parameter? I couldn't find anything in the documentation. I assume this node specifies the sphere that surrounds the player for plant collision? Is this sphere created in Maya or 3Ds Max, or is it obtained from within UE4?

    EDIT: Ah, here it is. Missed it on the first read.

    https://docs.unrealengine.com/latest...ons/index.html

    I'll ask more questions if this doesn't clear things up.
    Last edited by Rexemcn; 09-17-2014, 02:55 PM.
    http://www.artosaurusrex.org/

    Comment


      #32
      So I am at the bar ATM and everything Is too loong so I didn't read but heres how I do it. get the moving player/moving objs facing direction and bend twords using that vector. I then have a variable that is multiplied by Rand and use that value as a timer for when the grass/foliage springs back up. it give a steam rolling effect. but it works well for me. btw I use a blueprint not foliage. But a shader shouldn't be too different. Hope this gives you some useful info.
      Last edited by SaxonRah; 09-17-2014, 01:30 AM.
      Youtube
      Machine Learning C++ Plugin
      Lindenmayer System C++ Plugin

      Comment


        #33
        Tried creating a Material Collection Parameter. The details are not present in the properties window, and right clicking and then clicking details for this newly created parameter does not show the details for this parameter either. The entire window is just blank, except for the save and find in CB buttons on the top left of that window.

        Frustrating.
        http://www.artosaurusrex.org/

        Comment


          #34
          Hey guys i have been trying to figure this out for a week now and i am still completely confused. I am trying to bend the foliage away from the player and i have everything in my material setup except i don't get what these material parameters and blueprints are doing or even how to make one for this setup.

          Would someone mind posting a screen of their material parameters and blueprints?

          Also is anyone using Pivot Painter? Is this a completely separate way to control foliage bending/collision or is it needed?
          Last edited by Dynako; 09-29-2014, 03:39 PM.

          Comment


            #35
            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
            This is good, it would be great if you did a short tutorial for building and placing this it would allow more feedback due to increased exposure.

            Comment


              #36
              The way crytek did it wasn't very expensive. In fact it even works perfectly well on mobile.
              I am of the opinion this is something Epic might want to consider investigating. Anyway. Its their call but i feel its a feature that would make basically everyone happy.

              Im sorry to say but a simple material setup isn't sufficient. It looks terrible. And is not practical for big plants with details. Sure some grass blades n stuff looks fine. But i haven't seen a single example of it looking great with big plants.
              Anyway. I know pretty well how crytek approached it and thought i would try and mimic it with a blueprint. I cant code otherwise i could have been of more help.

              My results are pretty weak considering it was a very quick setup just to establish if its worth investigating more.

              http://celestialarch.com
              Free UE4 things available. More coming

              Comment


                #37
                Originally posted by Crocopede View Post
                The way crytek did it wasn't very expensive. In fact it even works perfectly well on mobile.
                I am of the opinion this is something Epic might want to consider investigating. Anyway. Its their call but i feel its a feature that would make basically everyone happy.

                Im sorry to say but a simple material setup isn't sufficient. It looks terrible. And is not practical for big plants with details. Sure some grass blades n stuff looks fine. But i haven't seen a single example of it looking great with big plants.
                Anyway. I know pretty well how crytek approached it and thought i would try and mimic it with a blueprint. I cant code otherwise i could have been of more help.

                My results are pretty weak considering it was a very quick setup just to establish if its worth investigating more.

                That actually looks pretty **** good, apart from the small stutters. Was it particularly hard to setup?

                Comment


                  #38
                  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
                  http://celestialarch.com
                  Free UE4 things available. More coming

                  Comment


                    #39
                    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.

                    Comment


                      #40
                      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.

                      Comment


                        #41
                        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.
                        http://celestialarch.com
                        Free UE4 things available. More coming

                        Comment


                          #42
                          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)?

                          Comment


                            #43
                            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.

                            Comment


                              #44
                              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!

                              Comment


                                #45
                                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?

                                Comment

                                Working...
                                X