Skip to main content

XWindfield

XWindfield provides a shared, camera-centred 3D wind field for materials and GPU Niagara effects. It combines scene wind, turbulence and temporary local emitters, with separate trunk, branch and leaf bending responses for vegetation materials.

Open Control Panel > X:VFX > XWindfield to adjust the field and visualize it. XWindfield is the displayed name; existing console variables, material expressions and source identifiers retain WindField naming.

What It Currently Offers​

CapabilityCurrent implementation
Shared wind simulationA camera-centred 64 × 64 × 32-cell field updated at 30 Hz
Ambient windUses the scene's directional wind sources, including the private XFSDK Wind actor
TurbulenceConfigurable velocity scale, length scale and evolution rate
Local forcingTemporary directional/radial emitters through the renderer API
Vegetation responseSeparate trunk, branch and leaf bend fields for material use
Material samplingDirection, velocity, speed, relative strength, gust and bend outputs
Niagara samplingGPU-only Shared Wind Field data interface
ExecutionPrimary-GPU simulation or experimental worker-GPU execution
DebuggingViewport wind vectors with spacing, scale and speed-reference controls

The field follows the camera rather than covering the entire world. Its default 400 cm cell size gives a 256 × 256 × 128 metre simulation window. Changing cell size restarts the field.

Enable and Configure​

[ConsoleVariables]
x.WindField=1

Configure a scene wind source to supply the prevailing wind. Materials and Niagara systems must explicitly sample the field and use its outputs; enabling it does not automatically animate existing assets.

The simulation advances at 30 Hz. With x.WindField.PresentEveryFrame=1, sampled volumes ease toward the newest step each frame. Setting it to 0 skips that per-frame unpack work and presents new simulation steps as they arrive.

Foliage and Materials​

The Wind Field material expression supports surface materials and exposes:

OutputMeaning
DirectionNormalized wind direction, with an ambient/default fallback
SpeedSampled wind speed in metres per second
StrengthSampled speed relative to ambient speed; not a fixed 0–1 mask
GustGust value in the wind sample
WindWorld-space velocity in XYZ and gust in W
Trunk BendHorizontal trunk response
Branch BendHorizontal branch response
Leaf BendHorizontal leaf response

Use the relevant outputs to drive World Position Offset. Mesh masks, vertex colours or Pivot Painter data can determine which parts bend and how strongly. A wind sample is an input to the material's animation, not a complete foliage deformation setup.

Pivot Painter-Style Bending​

The shared shader helpers support sampling at hierarchy pivots:

  • Trunk: WindField_GetBend(Pivot).xy.
  • Branches: WindField_GetBend(Pivot).zw.
  • Leaves: WindField_GetLeaf(Pivot).

WindField_ApplyBend(Position, Pivot, Bend, MaxAngle) rotates a position around its pivot, with MaxAngle in radians. These helpers are defined in /Engine/Private/WindField/WindFieldSample.ush.

This provides the inputs/helpers for Pivot Painter integration; it does not automatically replace an asset's existing wind material.

Niagara​

Add the Shared Wind Field data interface to a GPU Niagara system. Its SampleWind function takes a world position and returns:

  • Velocity: world-space wind velocity in centimetres per second.
  • Gust: sampled gust value.
  • FieldWeight: contribution of the simulated field at that position.

Convert local-space particle positions to world space before sampling. Use the returned velocity in the system's own force or velocity logic; sampling alone does not move particles.

The data interface samples the previous completed shared volume, including turbulence and bursts. Outside the simulation window it returns ambient wind with zero field weight. CPU Niagara simulation is not supported by this interface.

Units

Material/shader wind velocity uses metres per second. The Niagara interface converts its velocity output to centimetres per second. Keep that difference when sharing response settings.

NVIDIA Flow​

Flow shares ambient wind and local directional/radial emitter forcing through the renderer API. Its actors expose their own wind-coupling controls.

The integration shares forcing inputs, not the complete evolving XWindfield simulation volume. Simulated turbulence is not fully transferred to Flow, and fire-generated flow does not feed back into XWindfield.

Simulation Controls​

Console variableSource defaultPurpose
x.WindField1Enable the simulated field
x.WindField.CellSize400Cell size in centimetres; changing it restarts the field
x.WindField.Turbulence.Speed2Turbulence velocity scale in metres per second; zero disables generation
x.WindField.Turbulence.Length3200Turbulence length in centimetres; clamped to at least four cells
x.WindField.Turbulence.Rate0.15Evolution rate in noise cells per second
x.WindField.PresentEveryFrame1Ease sampled volumes toward the newest simulation step every frame
x.MultiAdapter.WindField1Use a worker GPU when available and enabled

Source defaults can be overridden by project configuration and per-scene turbulence settings.

Worker GPU​

[ConsoleVariables]
x.MultiAdapter.Enabled=1
x.MultiAdapter.WindField=1

Worker execution requires the fork's supported secondary-GPU setup. Setting x.MultiAdapter.WindField=0 selects primary-GPU simulation. Compare simulation, transfer and presentation cost on the intended hardware; worker execution is not a guaranteed improvement.

Viewport Visualization​

Enable Show wind vectors in Control Panel.

Console variablePurpose
x.WindField.DebugShow vectors
x.WindField.Debug.StrideVector spacing
x.WindField.Debug.ScaleVector size
x.WindField.Debug.MaxSpeedSpeed reference for visualization

Arrow direction shows wind direction; colour and length indicate speed. Calm cells do not draw arrows. Visualization requires an enabled field, realtime viewport rendering and ShaderPrint support.

Current Limits​

  • This is a local camera-centred simulation, not a persistent world-wide wind volume.
  • Outside the window, or while the simulated field is disabled, material sampling falls back to ambient wind and steady bending responses.
  • Existing foliage materials need explicit integration; Niagara sampling is GPU-only.
  • Flow coupling shares forcing inputs and is not bidirectional fluid coupling.
  • These capabilities are identified from the current source. No build or runtime validation was performed for this documentation update.