meta data for this page
  •  

SDK pipeline

In general, the Modeler-to-SDK pipeline is as follows:

  1. Export to game. After you’re comfortable with your model in the Modeler application, select File → Export to games (Ctrl+E). It will pop up a file selector for .stsdk files, an efficient binary format that contains a model’s run-time data which is ingested by the SDK.

  2. Configure export. 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 “Geometry:Vertex packing” and “Billboard: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. 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.