Learn how to export custom geometry for use as leaf, frond, or force meshes from the SpeedTree Mesh Utility.

Custom
mesh geometry can be imported into the SpeedTree Modeler by way of the 'Meshes'
tab in the Assets bar. Meshes can be
used with leaves, fronds, or mesh forces. Meshes can be imported in either the
OBJ or STM (SpeedTree Mesh) formats. Use the utilities that ship with the
Modeler to get these assets out of 3ds Max and into the Modeler.
STM files can only be exported from the SpeedTree Mesh Utility out of Autodesk® 3ds Max® (Maya® or other 3D application users can always export to OBJ and bypass using the mesh utility).
The SpeedTree Mesh Utilities were written in in the MAXScript language and must be loaded in the same manner as any other MAXScript.

The launcher script is located here -> "[SpeedTree Modeler Install Dir]/Scripts/3ds
Max/SpeedTree Utility Launcher 5.1.ms". Run the script from within 3ds Max by
selecting the menu item 'MAXScript->Run Script' and browsing to the location
above.
Press a button to load either the SpeedTree Mesh Utilities or the SpeedTree Material Utilities. Pressing 'View Help' will load this document.
Load at Startup - Once ran, the SpeedTree Utility
Launcher will load on startup as a convenience only if 'Load at startup' is
checked at the top of the launcher.
NOTE: Windows® Vista® and Windows® 7 users will have to run 3ds Max
with the 'Run As Administrator' option to register the launcher settings.
Otherwise Maxscript cannot write to disk.

Use the SpeedTree Mesh Utilities to export geometry as a static model for use within the SpeedTree Modeler. To export a mesh, you must select an object in the scene for export. Only one object can be exported as a mesh at a time. If multiple objects are selected, only the first item in the selection array will be exported. It will be listed in the utility panel ("Leaf01" in the image to the right). The triangle count and dimensions for the selected object appear below the object's name.
There are a few options that appear below the object details that are described below. Their selection states are "sticky" (they will remain in their set states next time the utility is ran) as a convenience.
If using a unit system other than "Generic" (such as meters, inches, etc.), enabling this option will export the model resized to the conversion of "system units" to "display units" (see the 3ds Max documentation for more information on system and display units). If no conversion is applicable (such as in the "generic units" case), this option is not available.
When this option is checked, custom-edited normals will be exported. Normals are generally altered via the application of an "Edit Normals" modifier. It is often desirable to alter the normals of thin-walled geometry to give the mesh an illusion of greater depth (see the 'Project Normals' tool for more info).
Disabling this option will reset the normals to coincide with the object's face normals on export, even if an "Edit Normals" modifier is present in the modifier stack.
Meshes are oriented and positioned in the SpeedTree Modeler by using the origin of the scene of the exported mesh as its pivot point. If your object is translated away from the scene origin, it will be offset by that same amount when used with your tree. When this option is checked, the object's translation is ignored and the mesh is exported as if the object is positioned at [0,0,0], effectively using the object's local pivot point instead of the scene origin.
Use this drop-down to switch between exporting either STM or OBJ files.
To export an object, press the "Export Mesh" button at the bottom of this group once the desired object is selected. A save dialog will appear allowing the user to specify a filename for the exported geometry.
Mapping coordinates must be present in the object before it is exported. Additionally, textures applied to leaf meshes should not tile, so adjust your applied 3DS Max materials accordingly (disable both U and V tiling) and ensure that all texture coordinates are in the 0.0 -> 1.0 range.
Below the 'Mesh Export' group is the 'Import Mesh' button. Meshes can be imported back into 3ds Max via this button. Any '.stm' file located on the user's system can be read back into 3ds Max upon file selection. Use 3ds Max's built-in OBJ importer for importing OBJ files.
After the SpeedTree Mesh Utility has been executed one time, a MacroScript is created, allowing the user to assign a hotkey or button to the quick save feature. The MacroScript is called "QuickSaveSTM" and is located in the SpeedTree category, accessible via the Customize User Interface dialog of 3ds Max ('Customize->Customize User Interface...'). Select the QuickSaveSTM action and assign either a hotkey, toolbar button, or menu item to it if desired.
"Quick Save" does not provide a save dialog, but instead replaces the last exported '.stm' file with the currently selected item. This is useful while "tweaking" a leaf mesh's normals or UV coordinates, which may require several quick iterations to achieve the desired results.
The SpeedTree Mesh Utilities houses a set of tools to aid you in the creation of
custom mesh assets, whether you are exporting to STM or OBJ.
OverviewDue to the nature of a typical leaf meshes (blade-like and low-detail), using the face normals looks "wrong" when applied to a tree. Usually normals need to be pushed "outward" so the tree lights as if it has volume. Otherwise each individual leaf will light as individual models regardless of its position on the tree, diminishing the illusion of a voluminous canopy.
Starting with version 5.0, The SpeedTree Modeler
includes tools for spreading and unifying the normals for leaves (both cards and
meshes) after being applied to the tree. See the 'Leaf Properties -> Lighting
group' contextual help to see how range, global reference, global, local, and
card smoothing affect leaf normals.
Projecting the normals before exporting leaf meshes can still dramatically
improve the flexibility of tree lighting since less global smoothing will be
required later.
"Project Normals" aligns each normal in an object to the vector shooting from a common origin through each vertex (a "starburst" effect). A "Projection bias" parameter is used to alter the origin of this projection. Values greater than zero push the projection "outward" (toward the negative Y Axis) while a bias of zero projects the normals from the object's center. The bias spinner's range is [1,-1] with a default value of 0.5.
![]() |
![]() |
![]() |
Each leaf lights faceted and uniformly. |
Each leaf lights smoothly, but uniformly. |
Leaves are smoothly lit by their position on the tree. |
This tool will mirror the selected normals on the desired object over any axis showing a highlighted check button. If no normals are selected, all normals will be affected flipped. Selecting the X, Y, and Z axis will completely invert the normals (the same as the 3ds Max's standard "Flip normals" action).

By pressing the button labeled 'Remove faces <', any faces with an area less than the number shown in the spinner to the right will be removed. Thin (low area) triangles can cause issues in the Modeler if used as a colliding mesh force, so it's better to remove them before using the mesh with the tree. This tool only works with "editable mesh" geometry, so you'll have to convert "editable poly" or other geometry to an editable mesh before using the tool.
Use this spinner (Range: 0 -> 0.04 generic units) to provide the minimum allowable area for each triangle comprising the mesh. Triangles that do not pass the test are removed from the object.
If thin geometry is carried over to the Modeler, it will be removed (with a warning in the Output bar) each time it is imported.
By pressing this button, the object's pivot point is moved to the selected option in the drop-down to the right of the button. The options for setting the pivot are:
This option will move the selected object's pivot to the scene origin (0,0,0) without altering the geometry of the object.
This option will move the pivot the center of the object without altering the geometry of the object.
When
using specific units in either the Modeler or your world builder, you can
harness this unit converter to resize mesh assets before importing them into the
Modeler. For instance, trees in the SpeedTree Model Library are loosely modeled
in feet, but you may be modeling a colliding mesh asset in meters, since your
project uses meters (optionally, you could enable the 'Use display units' option
in the 'Mesh Export' group).
Another use would be to generically convert another artist's mesh (or your own mesh from an older project) to your current working units. This is even useful for any mesh, regardless of whether it is to be used with the SpeedTree system or not.
The resulting scale is displayed below the conversion options.
WARNING: Applying the conversion more than once will scale the object(s) multiple times.
Use the 'Copy Transforms' tool to quickly borrow the position, rotation, or scale of another object in the scene. Optionally, the target being copied from can be hidden after the copy, if the selected object is intended to replace the target.
When importing mesh versions of SpeedTrees to render in high detail, the standard FBX importer that ships with Autodesk® 3ds Max® supports only a few
of the texture options that are used in the SpeedTree Modeler (such as opacity
in the alpha channel of the diffuse map). To ensure that materials are imported
as seen in the Modeler, you must process the materials with this utility.
Process
SelectedUse this button to process an object already in the scene.
If 'Process imported objects' is enabled in the 'FBX Material Processor' group, all imported objects will be processed to include alpha channels, normal maps, etc (whether or not they are SpeedTree assets). Objects can be manually processed with the 'Process Selected' button. All of the options below this one will affect how the object(s) get processed.
When checked, objects that are processed during import will have their materials organized into a single multi/sub material, with the correct material ID's applied. This option does not apply to objects processed with the 'Process Selected' button.
When checked, processed objects will be assigned bitmap file pathnames that
conform to the UNC (Universal Naming Convention) format. This is necessary if
the imported models are to be rendered over a network, since otherwise the
server will assume that the file is stored on the local machine. The UNC format
would convert "C:\\Trees\Sample\Bark.tga" to
"\\COMPUTER_NAME\C$\Trees\Sample\Bark.tga", where COMPUTER_NAME is the name of
the user's machine.
If enabled, the processing will create a "Translucent Shader" material if it contains transmission information (located in the alpha channel of the specular/trans map). These materials are more complex but more realistic with the scanline renderer.
If "Use Arch and Design (mi)" is checked, translucency will be enabled within the Arch & Design shader.

(left) translucency included, (right) no translucency
If enabled, the processed materials will not be "2-sided" and will have backface culling enabled if using the "Arch and Design (mi)" option. The associated objects will have backface culling enabled via object properties. When disabled, all backface culling flags are disabled and "2-sided" materials are enabled.
If enabled, processed materials will blend the vertex colors with the diffuse material. This will make baked ambient occlusion renderable. If using this method, adding additional ambient occlusion techniques such as radiosity or final gather are optional since interior vertices are already shaded with the baked-in ambient occlusion.
(left) Ambient occlusion included, (right) no additional ambient occlusion.
The following group of settings only apply to scenes with mental ray assigned as the current renderer, since they implement various mental ray specific shaders.
If your scene has "Gamma/LUT Correction" enabled, chances are that your bitmaps are set to have an input gamma of 2.2. This checkbox will ensure that normal maps are NOT gamma corrected by applying a "Utility Gamma & Gain (mi)" shader to degamma all normal maps. Otherwise, your normal maps will skew badly due to the input gamma settings.
When enabled, all imported materials are converted into "Arch & Design (mi)" shaders. We find that this shader family provides the most realistic surfaces available with the rendering packages included with 3ds Max. The Arch & Design shader provides great translucency, displacement, and reflective components, and plays nice with Daylight Systems, mr Sun and Sky, and Gamma/LUT Correction. As such, it is appropriate for all types of materials that can be generated in the SpeedTree Modeler.
When enabled, any processed materials that do not contain opacity or translucency maps, but do contain height data in the normal map alpha channel will have displacement enabled in the material. If your object is being processed throught the 'Process imported objects' option, the utility will prompt you if you want to weld the vertices of the object. You will likely want to say "yes" unless your object has custom-tailored normals. Otherwise, the geometry seam on each branch (and between bifurcations) will separate when displacement is rendered.
It is recommended to calculate a "displacement volume scalar" so that very thin branches only recieve a fraction of the displacement offset that the largest branch recieves. See the next section for more details.
"Use Arch and Design (mi)" must be enabled before including displacement.
Since the typical tree model has both very large and very small branches that share the same material, using a constant displacement offset on all branches will not work very well; the same amount of offset that is appropriate on the trunk will look far too rough for the smallest branches on the tree and vice versa. To accomodate this difference, you will need to compare the volumes of each branch and scale displacement based on the differences in volume. Calculate this displacement scaling with the options in the 'Displacement Calculation' group.
Since the difference in volume between the largest branch (usually the trunk) and
the smaller twigs can be orders of magnitude, a linear calculation will
cause most branches to be assigned a volume value that is far too low to be
visible in a render. Set the 'Volume scalar' value to something much lower than
1.0 for better results. You can think of this value roughly as "the percentage
of the greatest volume where displacement starts to decay" - basically an
exponent. The default value of 0.15 will render full displacement on the
majority of major branches, and only the last branch level will be void of
displacement.

(left) no volume scalar used (thin branches become too thick due to
displacement)
(center) volume scalar of 0.15 applied
(right) 0.15 volume displacement visualized
This value doubles as the value selector when using the 'Force selected faces' option.
This button will begin the process of calculating the volume of each element of an object (multiplied by the 'Volume scalar') and encoding those values into vertex data.
After calculating, the resulting vertex data will be shown on the model (in the viewport only), and the state of the 'Show/Hide' button will switch to 'hide'. Any elements showing white will render with full displacement, and branches shown in black will not have any displacement. Gray values will render a percentage of the displacement. Press 'hide' to restore the model to its original viewport mode.
This button will either show or hide the current displacement solution as vertex
colors in the viewport. Pressing the button while in either state will toggle
the display of the other state button.

(left) branches with displacement solution hidden
(middle) Solution shown,
but not calculated, or cleared
(right) Solution shown after pressing
'Calculate now' (darker branches will have less displacement)
Pressing 'Calculate Now' will force the selected object to display the solution upon completion and switch the state of this button to 'hide'. Press 'hide' to hide the displacement solution.
This button will reset the vertex channel used for the displacement calculation (all elements will render with the same displacement offset).
Sometimes, the automatic calculation will miss a few of the elements in the selected object. To force elements of an object to have a different displacement offset than was automatically calculated, select at least one face of the element in question, set the 'Volume scalar' to the desired displacement percentage, and press the 'Force selected faces' button.
The selected objects will be assigned the material ID value (per face) that is displayed on the spinner.