One of the first tests many evaluators want to conduct is to model their own tree and see it in running in an environment. This page outlines the quickest way to make that happen. It covers the steps to that go from modeling a tree in the SpeedTree Modeler to seeing it being rendered in the SDK Reference Application (our sample environment). This page is not meant to get into the details of any one of these phases but rather take you through the process at a high level.
The first thing you'll need is a custom tree model. Use the SpeedTree Modeler to create a tree model for the test. Feel free to use your own texture maps and meshes – they'll all be processed and copied to the appropriate location by the SpeedTree Compiler in the next step. There are a few things you'll want to consider when modeling the tree to make sure it performs well when rendered in real-time.
The Modeler is designed to make tree models for movie special effects as well as real-time applications. Make sure the triangle counts on your model are appropriate for your application.
Turn on LOD in your model by selecting the “Tree” generator and checking “enabled” in the “Level of Detail” group. You'll also see the LOD distances in that group. Make sure they are appropriate for your scene (the distances are in the same units as the tree model). If you thing LOD transitions aren't happening where you'd like them, edit the distances in the Modeler and then recompile the tree. Each generator has its own set of LOD controls that you can adjust to tune transition behavior. Transitions can be previewed by using the LOD slider in the Tree Window.
Enable wind by clicking on the fan icon in the Tree Window toolbar. Select the fan to reveal the wind parameters available for tuning. There is a page in the SpeedTree Modeler documentation that covers wind tuning in detail. The wind settings you see in the Modeler will be carried over to the real-time environment.
Please view this section for detailed info on modeling efficient real-time trees.
The SpeedTree Compiler takes the artist friendly model from Step 1 and creates an optimized version for use with the SDK. You must compile a tree model before it can be used by the SDK. The Compiler performs these critical tasks:
To Compile a tree model, launch the Compiler and do the following:
This represents the bare minimum you need to do to get a tree model compiled. There are many other options to tweak and tune in the Compiler such as shader LOD, texture scaling, billboard generation, etc.
The SpeedTree Reference Application (Ref App) is designed to show tree models rendered using the SDK on a number of different platforms in a sample environment. The goal for this test is to replace the tree models in one of our sample forests with tree models of your creation. By doing that we'll skip over creating terrains and skys that only work in the Ref App and focus on the tree models that will render in any environment where the SpeedTree SDK has been integrated. Please take the following steps to see the tree modeled and compiled in Steps 1 & 2 running in the Ref App.
random_tree_population { filename "OutputDirectoryFromStep2\Atlas\TreeModelFromStep2.srt" quantity 50 slope_range 0 0.5 }
Run the Ref App by pressing the “Run” button. You should see 50 instances of your tree model on the terrain. If any errors occurred they will be printed in the Ref App console.
Now that you have taken a tree through the pipeline you can experiment with different LOD distances, shader LOD settings, texture atlas sizes, and any of the many other settings designed to tune appearance and performance.