Announcement

Collapse
No announcement yet.

Trees shearing in high wind

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

  • Trees shearing in high wind

    Hi,

    We're currently evaluating SpeedTree for a feature we're working on involving some trees in high winds. Something like this (0:50):
    https://www.youtube.com/watch?v=v61Rh1jxVa4

    If I ramp up the wind on the trees (for example BoardLead_HighDetail), only the leaves and higher level branches seem to get affected. If I want to get the trunk to move, I can turn on Apply Wind in the trunk properties, and then increase the weight. The whole tree moves in the wind, but the tree seems to shear rather than bend, ie. the height remains constant.

    Is this because SpeedTree isn't really designed for these types of high wind, or am I just getting it to move using the wrong properties? Otherwise we are really digging SpeedTree, very impressive!

    Thanks,

    Henry

  • #2
    Hi,

    Tuning trees for high wind like that is a little harder than it is for mild to moderate wind conditions. That being said, I believe we can achieve the look in that video (it will be a combination of using the Wind Wizard, branch/leaf wind editing, and editing some properties on the fan object). The best approach would be to have us take a stab at it on an example model and then use that as the basis for discussion and as a source to copy wind to other models. Are you testing with a library model, a sample, or a model of your own creation?

    Comment


    • #3
      Hi Michael,

      I'm testing on a sample tree - BroadLeaf_HighDetail (sorry I spelt the name wrong before). My process was:
      In wind/settings:
      - put the wind on maximum strength
      - scalars/distance to 2 (higher makes the model go crazy)
      - scales/frequency to 0.3 (so the waving looks like it has some weight)
      Then in trunk/wind:
      - turn on apply
      - weight to 1.5 and change the curve on the right to an exponential curve

      Can you suggest a better way to approach this? That was the only way I could find of getting the whole trunk to sway in the wind, but I was getting this shearing problem.

      Thanks,

      Henry

      Comment


      • #4
        Hi,

        There are three areas of wind editing you may want to take a look at:

        1) The 'Wind' group on the generators/nodes. This is where the wind weights are assigned and the wind levels are chosen (the 'Apply wind' options you've already found).

        2) The properties of the fan object (click the fan to select it). This is where the bulk of the wind editing is done. Here you'll find options for global, branch, leaf, and frond motion including distances, frequencies, and even motion algorithm selection.

        3) The 'Wind wizard' in the tools menu (or right click the fan). This tool sets up the model based on the answers to a few questions.

        I took a shot at making the high detail broadleaf sample look like the first tree in that video. I added a lot more global motion (the whole tree rocking) and changed the branch and leaf settings on the fan quite a bit. I've attached it below:



        Unzip the file and put 'HighWind.spm' in the 'Samples/Trees' folder in the installation location to make sure it loads with the maps. I've already written a book here so I'll let you take a look at that model and we can take it from there.
        Attached Files

        Comment


        • #5
          Hi Michael,

          That example you sent me looks great, but if you look at the video I sent you, the whole tree is bending in the wind, right from the base. In the HighWind scene you made, the trunk is moving a little at the tip, but the base is pretty much stationary. Do you think it's possible to get the whole trunk to move in the wind without getting the shearing effect I described?

          Henry

          Comment


          • #6
            "Global" motion (this is a fan setting) is the only one that has shearing prevention and is responsible for the tree lean in the example I sent. The algorithm doesn't allow for much bending near the ground but I can give you something to try if you're willing to edit one of the files in the installation. There's a number in there that affects how low to the ground global motion is allowed to go. We can change that and see if it helps.

            Comment


            • #7
              I too am very curious how to achieve this affect. It is something we could really use here.

              Cheers!

              Randy

              Comment


              • #8
                Hi Michael,
                Yes, it would be cool to see what effects we could get. Can you tell me how to change my installation please?
                Thanks,
                Henry

                Comment


                • #9
                  Just for some background info, global motion originally bent every vertex in the model that had a 'z' value greater than 0. That proved to be less than desirable for most wind conditions so we changed it so that only vertices higher than 25% of the tree's height were affected. It's that 25% that's the problem here.

                  With that being said, let's hack this thing up! There are two ways to get at this:

                  Method 1 (you can do this now)
                  Select the 'Tree' generator and change the 'Shape:Sink' parameter to a negative number equal to a value roughly 30% of your tree model's height. This should elevate the whole model into the air and, if you pick a good value, the bottom vertices still won't move but the ones just above them will. In the example tree in this thread try a value of -10. I did that and changed the global motion properties a little. Here's an edited version:

                  HighWind2.zip

                  Of course, you'll have to lower the model when you place it in your scene but all of this is something you can do with your current version.

                  Method 2 (this requires us to update the software)
                  We can, and probably will, expose this 25% number on the interface in a future release. Until then, you can edit this number yourselves by editing the file 'utility_wind.fx' in the 'Standard Shaders' folder in the installation location (it's probably not a bad idea to back this file up somewhere just in case). Look for the line in the function GlobalWind around line 128 that reads:

                  float fAdjust = max(vPos.z - (1.0 / g_vWindGlobal.z) * 0.25, 0.0) * g_vWindGlobal.z;

                  Change that 0.25 to 0.0 to make the effect go all the way to the ground. You'll have to get the shaders to reload every time you change it. You can do this by just disabling/re-enabling global motion in the Modeler.

                  This will let you see how it looks in the Modeler but this edit will not affect exported geometry caches. We'll have to update the exporters before that will happen.

                  Let me know how it goes, the 6.3 Cinema/Studio/Architect update should happen within a few weeks and if this is helpful we might be able to get it in there.


                  Thanks for your patience with this!

                  Comment

                  Working...
                  X