SMD Collisionmodel Prep 3DS Max Tool Version 1.0

The whole purpose of this tool is to speed the process of making a collision model that will be exported as an SMD file and sent to the Valve model compile tools. This is a Macro written in MaxScript for 3D Studio Max. Below is a current list of features of this tool.

Smoothing Groups
To properly compile a MDL file from your SMD, your model must have unique smoothing groups for each element in your model. This tool automatically applies unique smoothing groups to each element of your model.
Texture Application
To compile, your collision model must have a texture applied to it with a bitmap in the diffuse channel--even though a collision model is never rendered on a screen and never uses a texture. This tool automatically applies a standard material and places a dummy texture in the diffuse channel--so now you dont' have to bother.

Installation

  1. Download the Zip File
  2. Copy the Wallworm folder and all its contents from the zip file to your scripts folder. By default, this is something like C:\Program Files\Autodesk\3ds Max 2010\Scripts
  3. In 3DS, click Customize > Customize User Interface
  4. In the Customizer User Interface menu, select Quads and choose wallworm.com from the Categories list. Drag the "Prepare Collision Model..." action to the place on the quad menu (to the right) that you want the item to appear
  5. Close the customize menu
  6. Now whenever you right-click a viewport, you will see the SMD Collision Prep option.

Using the SMD Collision Prep

Assuming that you have made a way to access the tool (in the install example above it is by right-clicking and bringing up a quad menu), you can bring up the tool after you have made your collision model. The tool will ask you to select the collision mesh. Voila! Each element in the model will have its own smoothing group and a diffuse texture applied. You can now export to SMD*.

Notes

Relevant Resources

Credits

This tool was programmed by Shawn Olson and Andrew Penry. Neither of us are masters of MaxScript... but we did manage to use our skills with other languages to put together this tool one afternoon. If you like it, please link to us and/or leave feedback in our respective sites.

A segment of code to select elements was used from Martijn van Herk.

And lastly, but not least, to Neil 'Jed' Jedrzejewski for offering wonderful plugins to us Max mappers. Without Jed, we'd have to use XSI instead of Max!