User Tools

Site Tools

Importing to 3ds Max

After exporting a mesh from the SpeedTree Modeler, you can use the included MAXScript to load it into Max and recreate the materials as closely as possible.

To install it, go to the Utilities tab and select MAXScript“. Select “Run Script from the ensuing rollout and browse to the script, which can be found at <apps install>/scripts/3ds Max/


Once the MAXscript has been run, you will have a new rollout with buttons for “Import”, “Import for V-Ray”, and “Import for Mental Ray”.

When one of these buttons is clicked, it will ask to load a SpeedTree Material (.stmat) file. You don't need to worry about the format of the actual mesh exported from the SpeedTree Modeler, as that information is stored in the stmat file. The only difference between the three importers is the type of materials made after the mesh itself is imported.


Each of the importers has also been declared a macroScript, enabling you to attach the importer(s) to a button in the toolbar, a menu item, or a keyboard shortcut in the Customize User Interface dialog of 3ds Max. Please see the 3ds Max documentation on macroScripts for more information.

Extending the Script

If you wish to change how the materials are created, or add completely new material types, the MAXScript has been designed to be easily extensible in this manner.

You will need to make a MAXScript function that creates and returns a material (StandardMaterial, VRayMtl, etc.) based on the information stored in the passed-in STMaterial struct. Hooking the material up in the correct place on the mesh is handled for you elsewhere. You will also need to make a button in the utility rollout at the very bottom of the MAXScript, and you can add a macroScript declaration as well.

For examples, please see the MakeSpeedTreeMaterial, MakeSpeedTreeMaterialVray, and MakeSpeedTreeMaterialMentalRay functions in