Announcement

Collapse
No announcement yet.

Unreal WindDirectionalSource Component Radius and Point Wind parameters not working

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

  • Unreal WindDirectionalSource Component Radius and Point Wind parameters not working

    Hi,

    I am trying to simulate in Unreal the effect of the wind generated by the propeller blades of an helicopter flying over a forest. I would like the wind source to move with the helicopter and only affect the trees that are within the radius of the wind source and not the entire forest.

    Is it possible to have one WindDirectionalSource Component generating wind / affecting only a certain area where Speedtrees objects are located? As far as I can tell, the Point Wind and Radius parameters are not doing anything at all (in fact if I set the Point Wind parameter to True, the simulation stops). Also, is it possible to have multiple WindDirectionalSources in a scene that affects only what is within their radius?

    https://api.unrealengine.com/INT/Blu...ius/index.html

    Thanks,

  • #2
    Hello,

    You can have multiple wind sources in the scene.

    However, we don't recommend using "real" SpeedTree wind sources for local effects. When keeping things rendering as fast as possible, switching between global and local effects can cause hitches in the animation, and there is no great way to blend the output of SpeedTree wind objects to avoid them.

    Instead, there is an ExtraBend parameter on the SpeedTree node in the materials. This works similarly to the global wind motion, so it is already tuned for the tree. However, you give it a (un-normalized) direction and it just bends the tree that way. With this, you can have trees respond to the player or explosions or your local helicopter wind effects very easily. It could be a matter of simply bending the tree away from the helicopter, perhaps with a little sinusoidal motion. Or you could do something very advanced and simulate a pressure gradient over your level, stored in a texture, which you could look up in the material.

    Hope this helps

    Comment


    • #3
      Thanks for the quick reply.

      I will experiment with the Extrabend Parameter. Since the effect of the WindDirectionalSource Component seems to affect the entire scene (e.g. painted foliage / forest) what is the purpose of having multiple wind sources, if they are all global anyways? I've been trying to have multiple sources in a scene but I don't know how to set them up to affect only a limited radius around them.

      Could you please explain me how this works in Unreal (I've searched everywhere and can't find information about that, how to set the radius, does the Point Wind parameter even work, how to use it, and if so does it work only with unique instances and not with painted foliage, etc)?

      Thanks,
      Last edited by Onoa; 03-27-2019, 02:03 PM.

      Comment


      • #4
        So, I've experimented with the Extrabend parameter and I don't think that I will be able to achieve what I want with it, at least not to the degree of quality that I am aiming for. The end result movement of the branch and leafs is too simple to recreate the complexity of the wind animation itself.

        The parameter that I would like to modify per material instance is the Speed parameter (Strength parameter in the SpeedTree modeler).

        https://answers.unrealengine.com/que...wind-dire.html

        "Strength controls how multiple wind sources are combined when there are multiple. You can make one source apply more, even if another source is closer. Speed is how fast the wind is. Little confusing with the SpeedTree SDK, where strength is the wind's strength (aka speed). But that isn't revealed anywhere in the GUI. Speed is what you should edit, and SpeedTree expects values between 0 and 1."

        The idea is that the normal wind speed of the entire forest would be something low like 0.1 (foliage would be slowly moving) and when the Helicopter would be nearby some trees, I would access these instances and set the Wind speed to 1 (full wind strength / storm settings) but only for these instance. So the result would be that most of the forest would still be playing the wind at 0.1 and the trees that are close to the Helicopter would be playing the wind at speed 1.

        I don't think that's possible because there seems to be no way to access / set the speed parameter inside the SpeedTree Material node (assuming that's where all the shader operations are done). So basically, I wouldn't need more than one "real wind" source in the scene, but instead just be able to access / change the Wind Speed per object through a material instance.

        Let me know if that makes sense...

        Thanks,

        Comment


        • #5
          Hello,

          Wind is not computed on every single instance. The motion is just offset per instance. This is how a whole forest of trees can be animated when using mesh instancing for speed, but still look like it's all not in sync. This is why using wind objects will not do what you want easily. If you really got into the code and applied different wind objects to different trees, you could do it, but you would be breaking mesh instancing to do it.

          Using the extra bend should do what you want. The motion you apply there is as simple or complex as you want. The way I envision it... put the helicopter position into a shader parameter using blueprints (see below). Then in the material, compute the direction from that instance. Use a sinosoid, or maybe even a noise function, to oscillate the magnitude over time, multiplied by 1/distance from the helicopter (with a scalar). Have parameters for speed and strength so it can be tuned easily. I haven't done a helicopter, but I have done this to move foliage as a player walks around in it, and it worked pretty well.

          https://docs.unrealengine.com/en-us/...terCollections


          Hope this helps

          Comment


          • #6
            Using the extra bend should do what you want. The motion you apply there is as simple or complex as you want

            Do you mean that I could replicate in some ways the same level of quality of the wind created with the Speedtree Modeler? I'm thinking highest quality setting, with global swaying leaves and branches animation (e.g stormy weather). Looking in the 2 materials that have the Speedtree node, I don't understand how I could move branches and leaves individually on the same tree, and replicate what is done when the wind animation is playing back the speedtree data. What's achieved by the speedtree wind looks much more complex than what I can achieve using the extra bend vector. All the branches and leaves move in various directions, randomly.

            The best I can achieve is swaying the whole tree + leaves all at once in the same direction (while the calm wind animation is playing), so the end result looks like a tree bending quickly with leaves and branches that move slowly, out of sync with the level of turbulence.

            Do you know how I can move the branches and the leaves independently like what is done in the SpeedTree modeler? If I input something in the Extra Bend param, ALL the branches and ALL the leaves move at once. That's the part that's confusing me. This would work well for moving trees or grass away from the path of the player, but not for my I am trying to achieve I think.

            Btw, do you know where this animation data lives? It's imported somewhere and referenced when activating a wind object, but I don't know where it is stored.

            I will experiment more tonight and try to understand and see if I am missing something.

            Thanks!


            Comment


            • #7
              Hi Greg,

              I've made 2 videos to help you understand what I am trying to achieve.

              This first video shows at the beginning the wind strength and animation that I want to have for the "normal" state of the forest trees. At the end of this video I increase the Speed (Strength) setting to 1, and now this shows how I would like the trees to behave when the helicopter is above them. As you can see, the leaves and the branches move independently, etc. Since it's using the SpeedTree animation data. I don't think I can achieve this result by using the Extra Bend parameter.




              This second shows what I can achieve by using the Extra Ben parameter (at least how I currently understand I can use it). At the beginning, you can see that the motion is working, but the entire tree moves, branches and leaves, using the same direction vector that I calculate and feed in the material as a test. At the end of the video, I increase the speed of the wind so we now have the Extra Bend + the wind animation playing at the same time, in an additive manner. The problem is that if I use this method, it means that I need to increase the Speed setting of the wind when the Helicopter is nearby, and this will make the entire forest swaying under heavy turbulence. Otherwise, I have to only increase the Extra Ben parameters, but the end result looks like the beginning of this video and is not the result I am trying to achieve.




              Thanks,


              Last edited by Onoa; 03-29-2019, 12:44 AM.

              Comment


              • #8
                So it looks like what I am trying to achieve is not possible with Speedtree. I would like then to make this a suggestion for a new feature that maybe your dev team can look into. I think it would be really useful to be able to control the wind animation only on certain instances (think of it as what is possible to achieve using the Extra Bend Parameter, but for the wind animation) and not have it applied globally. It would come at a performance cost, but it would be great to have the option to do so. For now and this project I'll look at other options.

                Thanks!

                Comment

                Working...
                X