User Tools

Site Tools


SDK Pipeline

What's New From Version 7?

The Modeler-to-SDK pipeline has undergone the biggest change between versions 7 and 8. We feel it is more flexible, straightforward, and efficient. We saw significant draw time reductions in our testing against version 7.

Pipeline

In general, the full SpeedTree games pipeline is as follows:

  1. Export To Game. After you’re comfortable with your model in the Modeler application (must be version 8.x), select File → Export to games. It will pop up a file selector for .stsdk files. This is a format new to version 8 (was SRT in version 7). It is an efficient binary format that contains a model’s run-time data, which is efficiently read by the SDK.

  2. Configure Export. In version 7, there was an application called the SpeedTree Compiler. This functionality has been merged into the Modeler application and changed considerably. After an .stsdk file is selected, the dialog below will pop up.

  3. Settings and Customization. There are three main components new to version 8 in this dialog:

    • Atlas: When “Everything” and “Allow V wrapping” are selected, the exporter will likely generate a one draw-call model on export.

    • Geometry: Notice the combo boxes “Vertex packing” and “BB vertex packing”. These allow developers to control the vertex format used in the .stsdk (to be matched by the vertex shader). Further, developers can now write their own packing algorithms using the Lua scripting language. Details are in the Vertex Packing section.

    • Textures: Like vertex packing, developers can also control how the texture atlases are packed. In addition to the presets we provide, developers can write their own using GLSL. Details are in the Texture/Atlas Packing section.

  4. Importing the .stsdk File. The .stsdk file is then loaded by your application using the SpeedTree SDK. A complete example of how to load an .stsdk and access its geometry is in the Accessing Geometry Using the SDK section.

  5. Shaders. Part of what the Compiler did in version 7 was to generate a long series of shaders based on a set of shader templates supplied with the SDK. In version 8, developers are free to use their own shaders, without the need for a rigid SpeedTree structure. The only restriction is that your shader’s vertex declarations must match the vertex packing you selected upon export. There is currently no safeguard in place in the SDK to verify a match. If they don’t march, it will most likely crash on load. We have provided a series of efficient reference shaders that we use for the example forest. There is more detail on this in the Shaders section.