Model Viewer Reference Utility
SpeedTree Viewer is a comprehensive tool that demonstrates best practices for using both the SpeedTree Pipeline SDK and SpeedTree Runtime SDK. It details loading, rendering, and animating SpeedTree .spm and .stsdk models using a straightforward architecture, implemented in C++ and OpenGL. The application includes everything necessary to build and pre-built binaries, making it a valuable resource for developers.

Figure 1: SpeedTree Viewer in action, displaying a SpeedTree .spm model.
Configuration
SpeedTree Viewer can be configured to work with one or both SDKs, which is controlled by defining specific flags in the build configuration:
LOAD_SPM: Enables functionality for loading and manipulating .spm files using the Pipeline SDK.
LOAD_STSDK: Enables functionality for loading and rendering .stsdk files using the Runtime SDK.
Architecture
The Model Viewer is built with a clean and straightforward C++/OpenGL architecture. It provides short and clear examples of:
Model Loading: Efficiently loading SpeedTree models from both .spm and .stsdk file formats.
Rendering: Using OpenGL to render the models with high performance and visual fidelity.
Animating: Implementing real-time wind animations through shader programs. The .spm shaders detail how to load and animate for all four SpeedTree wnind modes: VFX, Runtime SDK, Legacy, and Lumberyard.