3DS MAX SCRIPTS

Here you will find the 3DS Max Scripts I have written that have helped decrease the production time of the modeling/texturing process of game development.  The amount of  time to create these scripts ranged from 2 days to 5 days, but the amount of time and headaches saved greatly exceeds the production time of the script.

These scripts have been written for 3DSMax V.4. but should work for V.5

 

To download a script right click on the image and select "save target as".  It is suggested to save it to your 3dsmax\scripts directory. To install and run a macro script:

In 3DS Max go to the MaxScripts menu and click "run script"

Next go to the customize menu and select "customize user interface"

Go to the toolbars tab and under "category" find "Keffer Tools"

Then drag and drop the script to a toolbar.

 

Light Tools

This script will allow the user to visually select objects and set the include/exclude properties to lights.  This script was created due to the complex lighting methods for our current project.

Instructions:

Run the script.  This will display all the lights in the scene.

Select a light in the listbox.  A single click will select a light and a double click will select a light and find the objects it's including/excluding.  Or select a light in the scene and press "Get Light Objects".

Select the objects you wish to include/exclude.  You can add and remove objects by ctrl-clicking

Change the include/exclude parameters

Press "Change Selection".  The objects will show up in the bottom listbox.

Spline Tools

This script will divide a spline evenly or divide a spline while keeping the shape by typing in a vertex count or segment distance.  This is similar to the normalize spline modifier but we found that we needed a more generalized version of it.

Instructions:

Run the script.

Select a Shape and press "get SHAPE info".

Go into the SPLINE sub-object and select a spline, then press "get SPLINE info" .

Set the interpolation type.  "Even" will distribute the verts evenly in the Spline.  "Path" will distribute a number of vertices keeping the shape of the spline.  (This is good if you have a tight curves with long straights).

If you have multiple Splines in a Shape you can also set which one is first.  and reverse the direction of a Spline.  Make sure to press "get Spline info" when modifying different Splines in a Shape.

       

Material Combiner

Material Combiner rollout

This script will create a multi-sub material from multiple objects in a scene.  It will also re-id every polygon to the new material. Because merging objects will create duplicate materials this was written to clean materials for easier modifications to the materials.

Instructions:

This script will only work with multi-sub materials.  So it's best to select the objects you want to combine the materials into and press "Convert".  This will convert any Standard Material to a multi-sub material. (Don't worry about the extra slots the next step will clean all this up.)

Now with those objects selected click "Make Master Material"  This will create a new multi-sub material in the Slot # spinner.  It will filter out all materials that don't have a bitmap in the diffuse channel. 

If you are happy with the material it creates then click the "RE ID polys".  This will go through each object and assign the correct ID to each polygon to match up with the master material.  Note that this will collapse your objects to editable meshes.  It will also try to rename the material to the name of the bitmap.  But you need to put the path in the path text-box.

ID Info rollout

The ID tools will show you what id's are being used on an object and display the bitmap.

Instructions:

Select an object and press "get number of id's".

This will list all the id's used in that object.  If you select an ID in the listbox it will select the polygons using that ID and show you what texture and name is being used on that ID.  If you double click the ID it will open up the texture in a new window and add an unwrap uvw to the modifier stack.

Mass Material Modifier

This script will modify a multi-sub material and its properties.  This script is very useful to get base colors when using the assign vertex color utility.

 

       

Mapping Tools

This script will generate mapping coordinate on objects created with surface/cross-section tools (aka patches).  Because this modeling method was found to fit our current project  a mapping tool was high priority to create UV coordinates that would keep efficient triangle strips for the "next-gen" consoles.