Wind animation is controlled by editing the properties on the Fan object and the wind properties of each generator in the model (e.g., branches and leaves). The recommended procedure is to run the Wind Wizard (“Tools→Wind wizard…”) and then fine tune the results.
When wind is enabled ('8' hotkey or “Enabled” property on the Fan), the model will animate continuously in the window.
When wind is enabled an overlay appears under the Fan object in the upper right section of the window, as pictured to the right. Set the direction of the wind by rotating the Fan (hold 'G', press the left mouse button, and drag the cursor as a shortcut for fan rotation).
Set the strength by clicking the blue arrow and dragging it between the “min” and “max” markings. The actual strength is indicated by the blue bar. Notice that models do not react instantly to strength changes; rather, they react at a speed governed by their strength response time. Wind strength will gradually reach the desired setting as the model reacts. Direction changes are handled in a similar fashion.
Gusting can be controlled by moving the green sections on the overlay. Drag the green arrow pointing left to a location between the “min” and “max” markings to set the frequency of gusts. Drag the green arrow pointing to the right at the gust range box and drag it up and down to set the gust strength. Click and drag in the gust range box (faded green rectangle) to set the limits of each gust.
Note: The blue strength bar will always indicate the effective strength of the wind based on your strength setting, the strength response time of the model, and the current gusting state.
The best way to get started tuning wind on a new model is to run the Wind Wizard (“Tools→Wind wizard…”). You will see the dialog pictured below.
Answer the questions on the dialog and press “Ok”. SpeedTree will analyze your model and set wind properties on the generators and Fan object based on your model's structure and your wizard selections. The model will recompute and wind will be enabled in the window when the wizard is finished. Feel free to edit the results as described below.
You can edit the animation at any time by changing the properties in the “Wind” group on each generator and on the Fan object. This section provides a high level overview of the process and each general category you'll need to address. For individual property documentation please reference the UE4 Fan object page.
Choose the “Preset” that best suits your needs based on your application. The presets control the balance between performance and quality in UE4 and include the following options (ordered fastest to slowest, and worst to best quality):
|No wind||The model will be static in UE4. Fastest, lowest quality|
|Fastest||Only global sway will be applied to the model.|
|Fast||Global sway and leaf ripple are applied to the model.|
|Better||Global sway, branch motion, and leaf ripple are applied to the model.|
|Best||Global sway, branch motion, leaf ripple, and leaf tumbling are applied to the model.|
|Palm||Global sway, branch motion, leaf ripple, leaf tumbling, and frond ripple are applied to the model. Slowest, best quality|
For the most part, the properties in each generator's “Wind” group simply act as scalars to movement amounts dictated by Fan settings. Use these properties to do things like make the outside leaves move more or make individual branches move less via a node edit to a particularly troublesome branch.
There is one notable exception to this rule: the “Wind:Apply” property on Branch generators determines which branch level gets independent motion during wind animation. For performance reasons, only one branch level gets independent motion, so it must be chosen carefully. The Wind Wizard will make an educated guess but you may wish to change it.
The generators that move independently in the wind are determined by the first generator – along any path from the “Tree” generator – to have its “Wind:Apply” property enabled. You can see which generators are currently chosen by enabling wind and looking for the numeric overlay in the Generation Editor. The wind level should be chosen such that the branches that move will have the greatest impact on the animation. This is typically big branches growing off the trunk (and almost never the trunk – it will sway with global motion anyway).
The whole model sways in unison according to the “Global Motion” properties, and branches at the wind level (and their descendants) sway individually according to the properties in the “Branch Motion” group on the Fan object. Use the profile curves on several of the properties to control how the motion changes as wind strength varies from low to high.
In general, “Global Motion” properties should be lower in frequency than “Branch Motion” properties. And each of these should be lower in frequency than leaf motion.
Leaf motion is divided into rippling (leaf vertices oscillate along their normals) and tumbling (whole leaves rotate about their anchor point). Leaf tumbling is considerably more expensive than rippling, hence it is only present in two highest quality presets.
Frond motion is always accomplished by frond vertices oscillating along their respective vertex normals. Frond motion is typically high frequency motion much like leaves. This style of motion is only available in the “Palm” preset.
Gusting provides a mechanism to have the wind strength periodically rise and fall, simulating gusty conditions. Edit the gusting properties of the Fan or use the overlay as described above to control gusting behavior.
The “Set conditions” menu option on the fan and wind toolbar menu provide shortcuts for setting common conditions like breezy and stormy. These choices set the nominal wind strength and gusting parameters to best match the named conditions. Use these settings to help guide wind tuning for models that will be in the same scene. The Wind Wizard will attempt to set all wind properties such that the model behaves appropriately under all of the preset conditions.
You can force a gust to happen by double clicking on the gust area of the wind overlay.
Note: “Duration” values of 0.0 still have an effect on gusting since the time to rise to the value and fall from it are not counted against the duration. Use 0.0 and low scalars to simulate turbulent conditions.
When you export a model to UE4, all of these wind settings go with it. There is SpeedTree code in the engine to replicate the behavior you see in the Modeler in your game.
Note: The wind animation is a continuous simulation both in the Modeler and in UE4. It does not loop.