A Few Maxscripts

A Few Maxscripts

I’ve had a few requests for some of the Maxscripts I’ve written to help making Track Making easier. So I’ll provide them here. They do a bunch of things which make it easier for track building. These are released as they are though and I can’t guarantee support and help with them, although I’ll do my best!

Install

Simply extract the scripts into your 3dsMax\Scripts\StartUp folder. The shortcuts script will load up automatically, the others will be available from the Utilities option on the maxscript dialog.

Shortcuts Script
There are a series of different shortcuts on this dialog. It should load up automatically when you start 3ds Max. I’ll briefly explain each option.

Poly Smoothing Fix
This attempts to add an edit_poly modifier, and then detach each smoothing group to a new element. However due to limitations with the scripting language, if you have already used an Edit Poly modifier and used detach to a different object it’ll do this. So test one at a time and make sure the settings are right.

Rotate Mapping 90
A common thing you need, adds a UVW XForm modifier and rotates the mapping 90 degrees.

Create Reverse Side
You often need a reverse side, this selects all polygons, clones them, and reverses them. It also adds a UVW Xform with a .5 V offset. You can edit the script or just delete this if you dont need this mapping change.

Assign Mat
Assigns the material in the Slot chosen next to it, to the selected objects. Saves having that big material window open!

Axis 0
Resets the rotation on chosen axis to 0 degrees for all selected objects.

Tyre Random
Rotates each selected object a random angle on its Z axis, randomly rotates slightly off it’s centre axis, and then resizes the z-axis slightly. Just what you need to make several hundred individual stacks of tyres have good variation!

Flag Random
Randomly rotates between +5 & -5 on the z axis, so that a row of flags all look slightly offset.

Random Vert Colour
This is one you probably need to edit the script for slightly, it can set a random vert colour between bounds. Can also set the same colour for every vert in each object or a different one for each vert.

Reset Scale
Resets the rescaling of the object to 100% in all axis.

Random UVW Offset
Offsets on the chosen axis by a random number between 0 and 1.0

Match Spline

This allows you to match two splines to each other as closely as possible. You can choose which verts you want to get matched, and also which axis should be edited. Please note you have to make sure the actual line in the shape which the verts you wish to edit are on, is selected on the sline submode.

Vertex Height Interpolator

This interpolates the z value of selected verts in an edit_poly object in between the two chosen points. There are a few different algorithms you can use to get the interpolated values. You will probably need to do some manual editing afterwards to get smooth transitions.

Select Every Other Vertex

Selects verts based on vertex number and the jump gap specified.

Line Height Interpolator
Works the same as Vertex Interpolator, except for splines. Ensure that you’ve selected the spline in spline sub mode before picking your verts, or it’ll crash!

Verts to Mesh
Moves the selected verts to the closest vert in the other mesh you selected. Can choose which axis are edited.

Verts to Spline
Moves selected verts to the closest knot on the selected spline. Can choose which axis are edit.

That’s all I think. Hope this helps you!

About the Author