Get Speedtree wind strength (FSpeedTreeWind::m_fCombinedStrength ?)

Hi,

I would like to attenuate my wind sound cues to follow the gusts and calms of the wind blowing through my SpeedTrees. Looking through the code, I can see the calculations for these wind gusts in SpeedTreeWind.cpp It all seems very complicated, and it seems every SpeedTree mesh has its own FSpeedTreeWind class. However, I’m guessing m_fCombinedStrength is the value I want. So I tried:

FSpeedTreeWind *w = AStaticMeshActor::GetStaticMeshComponent()->StaticMesh->SpeedTreeWind.Get();

but when breaking into the C++ debugger, I see most of w is zero . I must be looking in the wrong place - at the wrong mesh perhaps? My question is, how can I retrieve a measure of the Speedtree wind strength? Please note, I do not want to alter the engine source, just extend it with my own classes. Using version 4.7.6.
MM

That is just the original wind data for that tree. The actual wind that is being computed is stored in FScene. It has a map of unique tree to wind object, so the wind computation is optimal for the visible trees in a scene. Even then, each wind object can have separate gusting parameters, so two trees may not necessarily sync up their gusting.

Often “wind through a tree noise” is from leaves rustling, not branches moving. Different kinds of leaves behave differently, of course, but most leaves rustle the most at moderate wind. In max wind they roll up. What I’m getting at is you can probably fake it for about as good of an effect. You could find the wind strength and direction at a particular position by summing up the influences of all the wind directional sources there.Randomly changing the volume of your wind noise for short bursts does very well to fake the gusting on the trees, especially if it’s at about the same frequency as the gusting.

Hope this helps