Input files
The SpeedTree Pipeline SDK works with SpeedTree Procedural Model (SPM) files. For best results, you must understand the nature of .spm files and sidecar files. This page provides all the necessary information and instructions to prepare your models for use in the Pipeline SDK.
SPM file
An .spm file is a small, zipped XML files that encapsulates all the structural and visual information about a SpeedTree model, including its generators, procedural parameters, materials, animation data, and wind effects. The .spm file format is optimized for use in the SpeedTree ecosystem and provides a comprehensive representation of the tree model.
SPM sidecar files
Sidecar files are separate assets, such as textures or meshes, that the model uses by external reference. They commonly reside in the same folder as the .spm file or a folder beneath the .spm file's path.
Textures
Textures are crucial for defining the visual details of a SpeedTree model. These files provide surface information such as color, normal and height maps, and specular maps.
Meshes
External mesh files are meshes the tree author referenced when creating the tree model. They may include small leaf meshes, pinecones, berries, or sculpted trunks.
Prepare a model for SDK use
To ensure your SpeedTree models perform optimally and maintain their intended visual quality when used with the Pipeline SDK, it's important to follow best practices during the preparation phase.
Best practice | Description |
---|---|
Keep model and sidecars together | As sidecar files are not included in the .spm file, you must ensure they're correctly referenced and always available when using the Pipeline SDK. |
Bake texture adjustments | If you adjusted texture properties from the Modeler, like contrast, hue, and brightness, you must bake these adjustments directly in the texture assets to ensure they are reflected when using the Pipeline SDK. The Pipeline SDK can't modify textures as needed because they are sidecar files. |
Cap texture resolution | If your model uses high-resolution textures, you should cap that resolution during the baking process to optimize performance when using the Pipeline SDK, especially when prototyping. For example, cap values of 1024 or 512 pixels are common and can greatly speed up iteration time. |
Configure wind mode | To ensure your model realistically animates with the wind as per your expectations, you must set the appropriate wind mode in the Modeler before using the model with the Pipeline SDK. The wind mode set in the .spm file will be the only wind mode available for use with the Pipeline SDK. |
Steps to follow
To prepare and package a model for use with Pipeline SDK according to all requirements and best practices mentioned above:
Launch the SpeedTree Modeler and open your model.
In the Tree window, select the Fan gizmo at the top right.
In the Fan properties, set and adjust the wind mode according to your needs.
From the menu, select File > Package tree.
In the Package Options dialog, select and configure the following options:
- Bake texture adjustments.
- Clamp texture size, with a value of 1024, for example.
Note
You can Compress the output as a zip file for portability convenience, but you'll have to uncompress it in the end to use it with the Pipeline SDK.
Click OK and save the file.
Tip
If you don't use the Compress option, ideally save the output in a dedicated folder to get a clean and ready-to-use fileset that includes only the targeted model and its related assets.