Scope and Limitation

This tutorial will cover such topics as:

Managing your SpeedTree license for Lumberyard

Exporting trees from the SpeedTree modeler

Importing trees into Lumberyard

Using the tree assets in the Editor and basic foliage bending

Expected Results

At the end of this tutorial we’ll have a level populated with SpeedTree assets with basic wind foliage bending.

Methodology

Activating the SpeedTree 8 Lumberyard license

Go to the SpeedTree website to sign up for an account and redeem your free SpeedTree license for Lumberyard.

Once you’ve checked out the free license “purchased” it, you can go to your account’s Downloads Page to download the SpeedTree 8 for Lumberyard installer. Install the software.

While you’re at the store, go ahead and browse for the trees you’d like to be using for your project in the Lumberyard library. Trees aren’t cross-compatible across engines, so you’ll want to make sure you purchase trees for your engine of choice!

If you decided not to purchase any trees yet, the license comes with a few free trees for you to get started with.

Using the SpeedTree 8 Modeler

Launch the SpeedTree 8 Modeler. Once it boots, it will ask for your login information.

There’s a couple of sample trees which come with the installer. For this tutorial, we’ll work with the Broadleaf tree asset. You can find it in the samples folder of the installation directory (mine’s at C:\Program Files\SpeedTree\SpeedTree for Lumberyard v8.0.0\samples\Broadleaf). Open the Broadleaf_desktop.spm asset.

Once the tree asset is loaded, you can begin modifying the procedural parameters of your tree model. There’s an excellent tutorial series on how to use the tool on YouTube. Go check it out!

If your otherwise happy with how your tree currently looks, it’s time to export it and bring it into the Lumberyard Editor!

Exporting from the SpeedTree Modeler and importing into Lumberyard

Go to File/Export to Lumberyard… and export it to your project folder (for my project, I created a new folder in dev\MultiplayerSample\objects\environment\speedtrees\Broadleaf_desktop).

In the following export options dialog box, feel free to modify things as you see fit. You’ll generally want to tweak the scale value to get it to reflect the size you want in-engine. But otherwise, the default values should work just fine.

Once exported, you may close the SpeedTree Modeler and launch Lumberyard. The Asset Processor will take care of the new assets and when it’s done with them, the assets should show up on the Asset Browser.

Adding vegetation to your level

Now comes the fun part: painting trees into the level! Bob Ross would be proud.

Go to Game/Terrain/Edit Vegetation. This will bring up the Terrain Tool. Click on Vegetation to activate the Vegetation Tool.

Right click on the area where it says Objects to bring up a context menu and click on Add Object. Alternatively, there’s an Add Object icon to the top-left of this pane.

In the ensuing pop-up, select the Broadleaf_desktop.cgf file. This adds the specified object to your “palette” of vegetation objects so that you can paint the level with them.

Now it’s time to paint! Make sure that the broadleaf_desktop entry in the Objects pane is checked and click on the Paint Objects button. There’s a slider above it to adjust the brush size.

Click and drag in the Perspective window as you would in a paint tool to add the selected objects into the scene. Holding Ctrl before click-dragging deletes painted objects.

Modifying vegetation object parameters

You can also tweak the behavior of your painted objects by clicking on the entry in the Objects pane. There are several attributes here which you can modify to influence the randomness of the trees such as a randomized rotation, scale, density, etc.

In particular, you may want to modify the Bending attribute to allow for the vegetation object to simulate swaying in the wind. I specify a value of 1.0 to my trees because I feel that it makes them look natural.

Results and Discussion

Et voilà! Now you’ve successfully integrated SpeedTree 8 into your Lumberyard project workflow! Go ahead and browse for more trees in the Speed Tree store, or create your own assets!

Lumberyard’s Vegetation Tool is not restricted for use with SpeedTree assets exclusively. You can add import your own mesh objects for use with it. Some workflows even see using the Vegetation Tool to add doodads such as rocks and debris into the level.

As always, please feel free to send any questions my way! Any feedback about how the content of these tutorials and how they are presented is also welcome. Thanks for reading!

I’m taking suggestions on what tutorial to cover next. Feel free to hit me up on Twitter, if anything comes into mind.