User Tools

Site Tools


Custom Mesh Assets

Learn how to create custom geometry for use as leaves, fronds, zones, or force meshes.

Custom mesh geometry can be imported into the SpeedTree Modeler through the 'Mesh Assets' bar. Custom meshes can be used for leaves, fronds, zones, or mesh forces. Meshes can be imported as 'FBX', 'OBJ', or 'STM' (SpeedTree Mesh) files. There are also ways to generate meshes from within the SpeedTree Modeler, eliminating the need to use third party software to create meshes.

3ds Max Mesh Utilities

'STM' files can be exported through the SpeedTree Mesh Utilities for 3ds Max®. The SpeedTree Mesh Utilities for 3ds Max are located in the “[SpeedTree Modeler Install Dir]/Scripts/3ds Max” subfolder. The SpeedTree Mesh Utilities were written in the MaxScript language and must be loaded in the same manner as any other MaxScript (through the “MaxScript” menu select the item “Run script…”).

The SpeedTree Mesh Utilities for 3ds Max feature many extra tools for editing simple meshes for use in the SpeedTree Modeler. See the following sections for more info on these MaxScript utilities for 3ds Max: SpeedTree Mesh Utilities and SpeedTree FBX Processor.


"Generate Mesh" Tool

Meshes can be made automatically out of imported textures. Once a diffuse texture has been loaded into a material, the “Generate Mesh” button becomes available. The “Generate Mesh” Tool is located at the bottom of the Material Assets bar below the texture preview.

The tool dialog shows an overlay of the geometry preview, along with several options to control the shape of the generated geometry. The geometry is automatically cropped in to eliminate the maximum amount of transparent texture area as possible with the current configuration. Choose the options that you desire, then either create a Mesh Asset directly or export the custom mesh as an STM or OBJ file. When paired with the texture the mesh was generated from, the custom mesh will be an exact fit.

Algorithm

Choose “adaptive” or “grid”. Each type will fit the mesh as best possible with the given number of corners (adaptive) or width/height steps (grid). Use “add center” to make a point in the middle of an adaptive mesh.The point can be moved from the center to any place on the mesh to assign/change the pivot point.

Creation

This group specifies whether to make a new mesh asset, replace an existing mesh asset (with LOD mesh option), or to save the mesh as a file.

3D

The options in the 3D group control how the mesh will be shaped in 3D. Use the preview window above to see the mesh that will result. Use “Apex” and “Z offset” to add depth to the model. “Orientation” and “Flip” will make the mesh align to various different coordinate systems (the default is the XY plane). “Min area” will decimate faces smaller than this factor. “Double sided” will copy the geometry to both sides, for two-sided materials.

Information

This group gives diagnostics about the current mesh. The “Coverage” property shows how much of the texture has been cutout. The lower the better, but decreasing the coverage usually comes at the cost of more vertices.


Create Mesh Asset From Selection

Selected generators, nodes, and mesh forces can be saved off as mesh assets via the “Tools” menu item “Create mesh asset from selection…”.

Creation group

The creation group lets the user choose to either create a new mesh asset, or to replace an existing mesh asset. With the “replace” option, a specific LOD mesh level must be chosen.

3D group

This section of the dialog provides some basic options for orienting the new mesh asset.

Create new mesh force from asset

When checked, a mesh force will be placed at the scene origin containing the mesh asset. Since the mesh asset is gleaned from the scene selection, the resulting mesh force will lay directly on top of the selected scene objects.


Create Collection From Selection

Selected generators, nodes, and mesh forces can be saved off as collections via the “Tools” menu item “Create collection from selection”.

Collections

“Collections” are auto-updating mesh assets that are created out of generators, nodes, or mesh forces already in the scene. As the nodes that comprise the collection change shape in any way, the collection follows suit. Collections can be used to make trees collide against themselves.

For a more detailed look at collections, please see the following section of this help manual: Collections.


Custom Mesh Formats

When importing custom meshes, there are a variety of formats to choose from. OBJ and STM are the most common formats used for the SpeedTree Model Library assets. Starting with version 6.0, FBX, DAE, and 3DS have been added to the list of accepted mesh asset formats. The list below explains the advantages of each:

  • STM - STM stands for “SpeedTree Mesh” format. STM is a custom format developed by IDV specifically for use with the SpeedTree Modeler. The advantage to using STM is that the format is tailored to only contain the data needed by SpeedTree. It is also an ASCII format, so STM files can be edited in spreadsheet and text editor programs. A disadvantage is that there are not a lot of programs that support the format. Currently the SpeedTree Modeler can create them internally, and there is also an export script available for 3ds Max. Starting in version 6.0, STM has been changed to include two new types of data; detail texture coordinates and vertex colors.
  • OBJ - The main advantage of using OBJ is the multitude of tools that already support the format. OBJ is one of the oldest formats available. However, it is limited in its lack of “extra data”, such as detail texture coordinates.
  • FBX - Autodesk's FBX is a versatile format that is gaining in popularity throughout the industry, and can be exported from a growing number of third party apps, most importantly all by Autodesk. FBX files can hold much more data than the Modeler can use as a mesh asset, and does support advanced features such as detail texture coordinates and vertex colors. FBX camera data can also be imported separately through the “File” menu.
  • DAE - COLLADA (DAE) is supported as part of the FBX SDK. The main disadvantage to COLLADA files is the inconsistency of the format; results may be mixed.
  • 3DS - Autodesk's 3DS format used to be quite prevalent but has fallen in popularity since the introduction of FBX. Supported as part of the FBX SDK.