meta data for this page

Version 9.1.1

This is the first release of the SpeedTree Games SDK to correspond with SpeedTree Modeler 9. There is no version 9.0.0.

The SDK did not receive any sweeping changes between major versions 8 and 9. The updates center around a new wind algorithm and how shaders are loaded in the reference application.

Games Modeler version 9.1.1 and newer is required for model compilation against the 9.1.1 SDK.

Features

  • Introduced a new .stsdk format. The v9 .stsdk file format is not compatible with the v8 .stsdk format. All older tree models will have to be recompiled to use with the v9 SDK.

Improvements

  • Added support for Visual Studio 2022. All Visual Studio SpeedTree source projects are now available for versions 2022, 2019, 2017, and 2015. Older Visual Studio SpeedTree projects are no longer available.
  • Updated the wind system to use a more flexible algorithm. The system remains configurable where multiple wind options can be toggled at compile time including branch1 and branch2 wind, global/shared wind, ripple, and shimmer effects. The wind system now also does the following:
    • Handles wind on a wider variety of trees (for example, palm trees)
    • Provides two levels of branch wind (as opposed to one in version 8)
    • Can be made to run solely on the GPU with no involvement from the C++ wind class other than to advance time. It should be noted that the system is still controlled by a central C++ wind class, a set of vertex shaders, and per-vertex wind data.
  • Added SRGB support so all texture loading classes now take a LINEAR/SRGB input for interpreting textures on load.
  • OpenGL updates:
    • Cleaned up the DDS and TGA texture loaders in the OpenGL renderer:
      • DDS now respects the LINEAR/SRGB flag and uses the SDK callback system for binary file loading and heap allocation.
      • TGA has all the changes the DDS loader does, and the class interface is also greatly simplified. Instead of multiple unused member functions, it now uses a single static function to both load the TGA and create the corresponding texture.
    • Improved shader loading error messages.
    • Fixed errors in the imgui console so they now display properly when the scene fails to load (required a decent rework of MyMainOpenGL.cpp).
  • Updated Vertex packers. Vertex packers in the Modeler application updated to support the new wind system. Sample vertex shaders in the reference application were adjusted to match.

Changes

  • Changed the shader naming and loading approach in the reference application. When loading shaders to render .stsdk geometry, the reference application now uses the name of the vertex packer selected on .stsdk export from the Modeler. This approach provides more flexibility in the types of geometry rendered in the forest and lets you add any type of vertex definition. Using the new v9 wind system as an example, you can create two different packers: one that uses only one level of branch wind and another that uses two levels. The single-level packer has a smaller vertex and an associated shader with fewer wind instructions.
    • Loading example: This change is demonstrated in the function MyRenderStateCallback() in MyPopulate.cpp in the reference application. For example, if an .stsdk file is exported with the Standard vertex packer for 3D geometry and Standard_Billboard for the billboard geometry, the reference application attempts to load standard_vs.hlsl and standard_ps.hlsl for 3D geometry and standard_billboard_vs.hlsl and standard_billboard_ps.hlsl for the billboard geometry. Please note that developers can implement any scheme they choose. The reference application is just one working example.
    • New reference shader names: The example shaders used with the reference application have been renamed in accordance with the new shader-loading scheme. Here are some example name changes:
      • 3d_trees_vs.hlsl > standard_vs.hlsl
      • billboards_vs.hlsl > standard_billboard.hlsl
      • grass_vs.hlsl > standard_grass_vs.hlsl
      • grass_fogged_vs.hlsl > standard_grass_fogged.hlsl
  • Updated the example shaders in the reference application. Most of the example shaders are the same as version 8, but there are a few differences:
    • The example shaders have been renamed, as noted above.
    • Vertex definitions and packing correspond to the updated Modeler vertex packers, changed for wind.
    • They have new wind code, mostly contained in WindShader_Sdk.h.
  • Core Library Changes:
    • Raised ST_MAX_NUM_STSDK_MATERIAL_MAPS from 5 to 16. The number of material maps in an .stsdk is variable, but the maximum the SDK will support is now 16.
    • Rewrote the CFileWindConfig class to reflect the new wind system.
    • Increased the default size of CFixedString from 256 to 512 characters.