We discovered, after the majority of assets were authored, that we needed to convert our PC pattern maps to the technique we were using with NPC’s.  Pattern maps were used to customize the characters by replacing the pure RED, GREEN, or BLUE with a new color via the shader at runtime.

Rather than stick someone with the tedious task of reworking all of these bitmaps by hand, I created a maxscript that handled the heavy lifting.  Details below:

You need to install or upgrade Flash Player to view this content, install or upgrade by clicking here.

Here is an overview of how the script works.  It has  THREE main operations:

  1. Convert PC pattern maps to NPC pattern maps, as follows:
    1. Renders existing pattern maps (UV3) out to UV1…
    2. Converts the color setup from PC to NPC…
    3. Combines the Pattern & Diffuse…
  2. Renders out Decals on UV1.
  3. Ports shaders from PC to NPC materials.