Punisher

Enable Renderable Vertex Colors

Vertex colors do not render in the scanline or mental ray renderer by default in 3dsmax.  Nor is there a switch to enable them.  So, I built a script that tweaked the selected object or scene’s materials to allow this.

Interface Shot:

Material Change:

Results:

The screenshot above has a Advanced Lighting Radiosity pass baked down into vertex colors that were tweaked using the Vertex Color Tools Suite script to augment hue, control blending, and fix problem areas.

The render maintained the vertex colors, allowed over-brightening, and added cast shadows.

vConvex Hull Maker

Here are some screens from a convex hull maker script that I made as we began to integrate physics engines into our games and hence had the need for convex shells for collision calculations.

It was an interesting script to right.  I treat the source meshes as a point cloud.  I then start at any three points, build a face, and then randomly jump through all of the remaining points looking to the center to see if it can see any triangles.  It is sees one, it is concave and is deleted.  Then new faces are built.  Process is repeated until all the points have been run through.

Description:

  • This script builds convex hulls based on selected geometry.
  • Definition of a convex mesh: ”An object is defined as convex if, given any two points inside the object, you can always go in a straight line from one to the other without going out of the object.”

Usage:

  • Workflow:
  1. Select the object(s) that you want to build a convex hull around.
  2. Verify that the scope option in the script’s ui is set appropriately.
  3. Press the “Build Hull” button to create the new hull object(s).
  4. Select the new hull(s) and name them properly. (They will all be named “ObjectXX”)
  • Options:
    • Scope:
      • “Selection as single object”
      • “Individual Objects”
      • “Update Viewports”
        • This is a frivolous option that will allow you to watch the hull being built in the viewport.
        • Note this option drastically slows down the hull creation process.

Advanced Lighting Settings Utility

Description:

3dsmax had one of the first available tools for calculating radiosity and it did this at the vertex level.  So, we decided to make use of this for generating vertex color based lighting for our levels. The problem that quickly arose is that we wanted different light setups within the same level max file, i.e. one for a daylight exterior, another for a darker interior, and so on.

This script facilitates this by storing multiple radiosity and exposure settings coupled with associated geometry and lights.  It allows for batch processing one or more of these settings and where possible blending the vertex colors at transition edges, such as the threshold of a door.

Screenshots of the script’s gui:

Usage demonstration:

Vertex Color Tools

vcTools is a compilation of several maxscripts that aide in manipulating vertex colors on single or multiple objects at a time in 3dsmax r5+.  I built this script suite as a reaction to missing functionality that we needed to set and manipulate vertex colors in 3dsmax for level art in Summoner.

There were several modules including:

• Assign Vertex Colors
• Adjust Vertex Colors
• Pits’n’Peaks
• Utilities
• Vertex Color Selection tools

Download the .chm file HERE for complete details.

NOTE: This script relied on several compiled extensions that do not ship with 3dsmax and therefore it is not compatible with current versions of 3dsmax.  It could be updated, but the reason to do so has become much less compelling since the inclusion of the Vertex Paint Modifier (which incidentally referenced this script numerous times in is beta spec.)

Here are a few sample images from the documentation: