Announcement

Collapse
No announcement yet.

Interactive Foliage Actor Issue

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

    Interactive Foliage Actor Issue

    Hello,

    Is the interactive foliage actor still a UE4 work in progress?

    I have a static tree mesh which I am trying to bump around with the default character, these are the steps I'm taking to create the interactive foliage actor:

    1 - Drag the static mesh into the world (it has a collision mesh and collision enabled).
    2 - Down in the Actor section of Details, I use the convert dropdown and select 'InteractiveFoliageActor'
    ** At this point the static mesh is replaced with a capsule and the geometry is shifted to another position. I can't move the mesh representation.**
    3 - I create a material that tries to mimic an old UE3 UDK tutorial for the interactive foliage actor.

    http://udn.epicgames.com/Three/Inter...iageActor.html


    My material looks like this. I didn't find all the same nodes as in the UDK tutorial, so I improvised:

    Click image for larger version

Name:	InteractiveFoliageActorBlueprint.png
Views:	1
Size:	125.0 KB
ID:	1135939



    The tree doesn't budge as i move onto it or fire projectiles. Any ideas?
    Victor Frenkel [IMDB LinkedIn]

    #2
    You can use this tutorial from epic games:
    https://www.youtube.com/watch?v=XYPPd5oLoPM
    And in the Radius you chance the WorldPosition.
    reference
    http://dirty-windows.de

    my blog
    http://ulrichthuemmler.blogspot.com/

    Comment


      #3
      Looks promising, I'll try it out when I get home, thanks!
      Victor Frenkel [IMDB LinkedIn]

      Comment


        #4
        So, I still have an issue with using the interactive foliage actor's simulation, but first I'll describe what I achieved in a fashion similar to the tutorial you posted. Maybe it'll help someone:

        I was able to use a blueprint that rotates the tree when i get close to it.
        1 - Add an absolute world position as input, connect to RotateAboutAxis (RAA) position.
        2 - 0,0,0 constant vector as pivot (it's relative to position) to RAA's pivot point.
        3 - A function that rapidly gets bigger as character approaches (max clamped) to the RAA's rotation angle, which takes player's position as input (see Material Parameter Collections for how to do this).
        4 - RAA's Rotation axis just needs a normalized vector that is orthogonal to the player to actor and actor up vectors.

        BUT, this isn't the same as using the interactive foliage actor's simulation code to push the tree with the character. So i'm still stuck. Here's the latest progress on that front:
        I put print to viewport statements in the Tick and CapsuleTouched functions implemented for InteractiveFoliageActor and can see capsule touched events being fired when I enter the tree's capsule component.

        I also printed the vector describing FoliageVelocity and FoliagePosition at every Tick; these vectors are oscillating until they reach a small value, at which point the simulation shuts off ticking for this actor.

        This is all great, but the interactive foliage actor's static mesh representation is not reflecting the oscillating values I see being printed.

        There is a function that "propogates the new rotation axis and angle to the rendering thread" called UpdateParameters_GameThread. I bet there is a way to pick up the rotation axis and angle value from the blueprint and use it in the material to control world position offset, but I haven't figured out how to tap into these values. The code has a GetFoliageParameters function which outputs impulse direction and normalized rotation axis and angle (these are what I need in my blueprint, but can't get to them). Any ideas?



        Code is in Source/Runtime/Engine/Private/FoliageComponent.cpp
        Last edited by TheUtahTeapot; 06-20-2014, 02:25 AM.
        Victor Frenkel [IMDB LinkedIn]

        Comment


          #5
          Have a look at the new pivot painter map in the Content Examples that came with 4.2. There you find a setup for bending grass based on the player location.
          --------------------------------------------------------
          [New On Marketplace] Custom Character Creator
          --------------------------------------------------------
          [Marketplace]Multiplayer Melee Combat System - Animated Crossbow
          --------------------------------------------------------

          Comment


            #6
            That blueprint looks pretty similar to the solution I already found for bending the tree. What I'm looking for is a spring-like oscillating effect that the InteractiveFoliageActor is intended to create. See this video from UE3's version:

            http://udn.epicgames.com/Three/rsrc/...oughFields.mp4


            and here:

            http://udn.epicgames.com/Three/rsrc/...Explosions.mp4
            Victor Frenkel [IMDB LinkedIn]

            Comment


              #7
              Hey TheUtahTeapot,
              I'm looking to do the same thing, have you made any progress on this?

              Comment


                #8
                Originally posted by 3DMoss View Post
                Hey TheUtahTeapot,
                I'm looking to do the same thing, have you made any progress on this?
                Yes, see my post in the answerhub. I describe a hack/workaround in the question and my comment, but I worked on another part of my project in the meantime so I haven't found/created a cleaner solution.

                https://answers.unrealengine.com/que...-ue4-work.html
                Victor Frenkel [IMDB LinkedIn]

                Comment


                  #9
                  today i create a Interactive Foliage material, maybe its helpfull
                  https://forums.unrealengine.com/show...l=1#post118157
                  reference
                  http://dirty-windows.de

                  my blog
                  http://ulrichthuemmler.blogspot.com/

                  Comment

                  Working...
                  X