Documentation

SpeedTree Runtime SDK

Version: 10

SpeedTree Runtime SDK

Version: 10

Wind overview

Learn how the SpeedTree Runtime SDK implements wind effects.
Read time 1 minuteLast updated 2 hours ago

SpeedTree's powerful wind system is flexible and scalable, ranging from simple mobile device level effects to cinematic quality used in dozens of feature films.
In the Runtime SDK, wind effects are largely implemented by a vertex shader. The general flow is outlined in the figure below:
General flow of wind effects

Property

Relevance to wind effects

.spm fileHolds the original definition of the tree model, including any wind settings the artist tunes.
SpeedTree ModelerWhere artists preview and tune the wind behavior of each model. It is also the tool that exports .stsdk files to be used by the Runtime SDK.
.stsdk fileA tightly baked binary file that captures all of the run-time wind settings.
Vertex shaderPasses the per-vertex wind data (for example: wind weights, noise offsets) to special SpeedTree wind functions that govern wind dynamics.
Noise textureA special static texture designed to work best with the wind system that the vertex shader uses for rolling wind effects.
CWindStateMgr
A CPU-side C++ class that acts as a state machine for the wind simulation, computing and uploading a few control variables to a wind shader constant buffer.
Shader wind functions, example code, and the full source to
CWindStateMgr
are all provided to leverage this system outside of the standard SpeedTree pipeline.