SpeedTree
    Show / Hide Table of Contents

    Wind overview

    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:

    Property Relevance to wind effects
    .spm file Holds the original definition of the tree model, including any wind settings the artist tunes.
    SpeedTree Modeler Where 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 file A tightly baked binary file that captures all of the run-time wind settings.
    Vertex shader Passes the per-vertex wind data (for example: wind weights, noise offsets) to special SpeedTree wind functions that govern wind dynamics.
    Noise texture A 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.

    Copyright © 2023 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX.