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:
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.
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.
Settings and Customization. There are three main components new to version 8 in this dialog:
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.
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.