Importing Models into Unity

NOTICE: These instructions are applicable for Unity 5. SpeedTree will not work with earlier versions of Unity.

When you save a model in the Unity version of the Modeler you should have an .spm file that represents your model. This is the file you will import into the Unity Editor. The SpeedTree model will be imported into a normal static mesh object. Click here if you don't have an .spm file.

The first step in using a model you've created in the Modeler is to import it as an asset in your Unity project. To do this, simply use the “Save as…” option in the Modeler to save the model in your project's asset folder (or any of its subfolders).

Unity will recognize the files and launch an import process to add it to your project. During this process you may be prompted to fix normal maps if you are using them. Select “Fix now” and the import process will continue.

If you have purchased Unity tree models from the SpeedTree Store, you can simply unzip the downloaded file directly into your Unity project's 'Assets' folder.

Please Note: This above method is the most convenient way to import trees into Unity. If you right click on the Assets folder within Unity, you are presented with the option to “Import New Asset…” This will import the tree asset without its textures mapped. You will then have to manually add the texture map to the tree within Unity (something you've already done in the modeler).

When the model has been imported you have the following items in your project:

A folder will be created with the same name of the model. This folder will have:

The tree asset object has the following options:

All edits to the tree asset properties must be applied before being used. Doing so “reimports” the model so be sure to have “Re-generate Materials” set appropriately to avoid losing material edits.

Each material will have the appropriate textures assigned to it. The purpose of having a set of materials per LOD is to provide control over the rendering effects used at each LOD. For example, you may want to decrease the complexity of the wind at lower LODs to increase rendering performance.

The following section details the options available on the SpeedTree material.

SpeedTree Materials

Each SpeedTree material contains the following options:

Geometry Type

This option essentially sets which shader will be used for the rendering of this geometry. This option is automatically set during import and should rarely be modified. The options include:

Wind Quality

Use this option to control the complexity of the wind shader. This option will be automatically set during import based on the settings in the Modeler (select the 'Fan' object then look for the property labelled 'Presets:Style') but can be tuned here for performance. It may be particularly useful to pick faster wind shaders for lower LOD materials to boost rendering performance. Wind quality options include:

Base Texture Map

The texture map and tiling properties for the base texture layer.

Normal Map

The normal map and tiling properties for the normal map layer.

Detail Map (optional)

The texture map and tiling properties for the detail map layer, if it exists (branches only).

Hue Variation & Color

When enabled, the main color used for the material will be randomly driven toward this color based on its position in the scene. The maximum amount it will be driven to the chosen color is governed by the alpha value of the color. Use this feature (particularly on leaves) to vary the colors of each instance of tree model. When combined with random rotations and scales, this effect helps add variance to the scene while still using a small number of unique tree models.

AO

Use this option to toggle ambient occlusion on the material. Ambient occlusion is precomputed in the Modeler and saved per-vertex in the geometry. You must compute ambient occlusion in the Modeler prior to saving the tree for this effect to work. See the full SpeedTree docs for information on how to fine tune this effect in the Modeler.

Main Color

The color of the material.

Specular Color

The specular color of the material.

Shininess

The shininess of the specular effect.

Alpha Test Reference Value

Alpha values below this level will be discarded.