User Tools

Site Tools


Importing into Unity

Note: SpeedTree 8 for Unity is compatible only with Unity 2018.3 and later.
Note: Files exported by the SpeedTree for Unity Modeler will only work inside of Unity (.ST)

Export your SpeedTree into your Unity Project directly into the Assets folder under your Project. You can also export it to a designated spot and copy it into your Project folder. Unity can read the .st file automatically and also detects when you save new changes to the file and re-imports files as necessary. 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.

Your folder might look something like this: \\UNITY> (Your Project's Name)> Assets > SpeedTrees

Note: Do not simply import the .st file from a different location. Unity will not be able to find the texture files.

Placement

Manual

Adding models to the scene manually To add models one at a time, simply drag the SpeedTree object from the “Asset browser” in Unity and drop it in the scene. The model can then be transformed like any other object in Unity.

It is important to note that rotating an instance of the asset is fine. The billboard shader will take the rotation into account when selecting the appropriate angle from the 360-degree billboard atlas.

Painting models

SpeedTrees can be painted on terrains similar to other mesh objects. Go to the tree tab on the terrain and click “Edit Trees”. Add the tree asset you wish to paint in the resulting add tree dialog, and it will then show up in the “Trees” section. Grass assets are also painted in the “tree” tab, not with the Unity grass system.

After selecting the tree you wish to paint, you can adjust the painting tools with the parameters below it. “Tree height” lets you control the scaling of the tree when painted. With SpeedTrees, you most likely want to enable “Lock width to height” and “random tree rotation” for the best results (these are enabled by default).

You can adjust the switch from 3D tree to a billboard with the “billboard start” and “fade length” parameters on the settings tab of the terrain.

Adding a wind zone:

Wind behavior is tuned inside of the SpeedTree Modeler. To see the wind animation in Unity, you must add a 'Wind Zone' object to the scene. Use this object to set the strength and direction of the wind.

To create a Wind Zone GameObject directly, go to Unity’s top menu and go to GameObject > 3D Object > Wind Zone . You can add the Wind Zone component to any suitable GameObject already in the Scene (menu: Component > Miscellaneous > Wind Zone). The Inspector for the Wind Zone has a number of settings to control its behavior. Since the SpeedTree has been set with Unity wind before import, the tree will now interact.

Note: You'll probably want to turn down the wind object to a moderate level since the default is 1.0 (high wind).

For additional help check out Unity's documentation. https://docs.unity3d.com/Manual/class-WindZone.html

Changing the LOD

Your LOD is set and written into the exported SpeedTree mesh, but you an adjust your assets LODs by using the “object inspector”.Use this control to edit where the LOD transitions will occur by dragging the borders between LODs left and right.

For additional help check out Unity's documentation. https://docs.unity3d.com/Manual/LevelOfDetail.html