User Tools

Site Tools


CWind in Core

Almost all of the heavy-lifting wind computations are done in the vertex shaders. However, each CCore object does house a CWind object that is used to control a series of parameters that are uploaded to the shaders so that it can perform wind computations that match those tuned in the SpeedTree Modeler application. CWind also controls wind speed, performing random gusts based on the frequencies stored in the SRT file.

The CWind object can be queried from a CCore object and parameters can be set directly including, most commonly, wind speed and direction. The Forest library provides an interface for controlling a forest of trees, negating the need to access each CCore object individually.

To gain the best understanding of wind behavior, observe it in the Modeler. It always uses the directional wind model. The SpeedTree SDK should mimic its behavior exactly.