This document describes how custom SpeedTree Models can be formatted, compiled, and converted into Library Objects for use with Prepar3D v4. Note that the SpeedTree Modeler and SpeedTree Compiler tools needed to create and compile SpeedTree models are not included with Prepar3D and must be licensed separately. Please contact http://www.speedtree.com/ support for more information.
Creating SpeedTree Models
SpeedTree models can only be created using the SpeedTree Modeler. The SpeedTree Modeler has documentation explaining how models are made. In order to work with Prepar3D, the model needs a GUID and Friendly Name embedded in its user data. To do this:
- Open up the SpeedTree Model (.spm) in the SpeedTree Modeler
- Select "Tree Properties" in the Properties windows
- Find "Custom" properties section. It should be at the bottom of the Tree Properties window.
- Type the friendly name into the "User data 1" field
- Type or paste the GUID value into the "User data 2" field. GUIDs can be generated using a GUID generator.
Compiling SpeedTree Models
SpeedTree Models (.spm) must be compiled to SpeedTree runtime models (.srt) using the SpeedTree Compiler before they can be converted to MDL for use with Prepar3D. To display properly in Prepar3D the following compiler settings should be used:
- Creating an srt file requires the SpeedTree Compiler which must be purchased/licensed from IDV.
- The setting Compile->Shader Compilation->Material Merging should be set to "SpeedTree 5.x style"
- In order to ensure trees look correct from above, all atlases should enable the horizontal billboard by checking the box that says "include" in the Horizontal section of the atlas properties
Creating SpeedTree Library Objects
Before creating library objects using bglcomp, the compiled SpeedTree model must be converted to Prepar3D's MDL format using the SrtToMDL tool. The SrtToMDL tool is used to compile SpeedTree runtime files (.srt) to Prepar3D model files (.mdl).
The tool can be found in the SpeedTree section of the SDK, found here:
SrtToMDL is a simple command line tool which takes only the srt filename as a parameter.
For example, if your current directory was the SpeedTree folder and there was a file in that directory called MyModelFileName.srt, then
the tool would create a MDL file with the following command:
It can also be used by dragging an srt file into the SrtToMDL executable using Window's File Explorer.
After generating mdls, bglcomp can be used to create a bgl library for a group a trees.
Any textures output by the SpeedTree compiler need to be copied into a directory in Prepar3D's texture path list. Unless they will be shared between multiple bgls, the simplest solution is to put them in the textures folder of the scenery entry containing the newly generated bgl.