Maxscript Programming

These are some of the tools that I've created in order to facilitate a more streamline and efficient workflow in the lighting department. Most of these scripts are based on a naming convention and lighting approach which I have setup during the course of production in 3ds Max.



Script: Generate Compile Script
Written by: Tan Jit Quan
Purpose: Generate a compiled reference script so lighters only need to run 1 script
Description:
  • Stores all script locations as filein references.
  • Will ensure scripts will run a specific order as certain scripts require to be run after other scripts.


Script: Generate Include/Exclude List
Written by: Tan Jit Quan
Purpose: Generate a maxscript to transfer the shot's lights' include/exclude list 
Description:
  • Stores all lights' include/exclude list
  • Writes it into a maxscript to be run in another file
  • The list will be "written" into the lights in the new file when the maxscript is run.
  • If the object is not in the shot then it will be bypassed.
  • Good for Master Set Lighters to generate the set lights' include/exclude list and reloaded by Lighters using the setting up script.


Script: Generate To Delete Array script
Written by: Tan Jit Quan
Purpose: Generate a script which can be put in the Pre-merge section of the setting up script to delete any old objects
Description:

  • Master lighter selects all the objects that are updated after the set file is handed over to the animator
  • This script will write a script to be put in the setting up script to delete the selected meshes.


Script: Lighters' File Manager
Written by: Tan Jit Quan
Purpose: it is to be used as an interface for lighters to use. It can be docked in 3ds Max.
Description:
  • Lighters can access all needed files by entering the episode/scene/shot information
  • All necessary folders are also quick to access.
  • All lighter tools can be accessed via the "Tool" drop down list.


Script: Lighting Utilities
Written by: Tan Jit Quan
Purpose: General tool written for Lighters to use during production
Description:
  • Selection of objects via various methods like controller parenting, naming convention, layer name or object ID
  • Modifies shaders and object properties via selection.
  • Matte/shadow/reflection shader 
    • Will detect whether there is a Cutout Map or Opacity map and applies it into the matte/shadow/reflection shader to retain its original shape
    • Will detect current transparency value and transfers it into the matte/shadow/reflection shader
    • Will also detect whether the material is an Arch and Design Material which has shadow bypass in the mental ray connection tab and sets the matte/shadow/reflection for shadow bypass




Script: Setting Up Script
Written by: Tan Jit Quan and Lim Wei Soon
Purpose:  Batch Tool for merging sets into animation file and running all selected modification scripts. 
Description:
  • Scripts for running before merging in the set can be included
  • Set merging and Settings Preset is done via file selection
  • Additional scripts to run after merging in the set can also be included
  • Standard Operating scripts are embedded and activated by checking the checkboxes
  • Can be used for a single max file or a folder of max files
  • If a section of the script is left empty, the script will bypass and continue with the next section



Script: Merge and Constrain Script
Written by: Tan Jit Quan
Purpose: Lighting tool for fast and efficient lighting using the position constrain technique.
Description:
  • Process
    • Create a dummy to be parented to the pelvis of the character or any selected object
    • Have Light Rig POSITION CONSTRAINT to dummy
  • Result
    • When character moves, the Light Rig will follow but if the character rotates, the Light Rig will remain in the same orientation
    • The Key light is supposed to be coming from the same direction and not rotating with the character
    • If the Light Rig needs to be moved to a better position, moving the dummy will change the position of the Light Rig
    • If the Light Rig needs to be rotated, you can directly rotate the Light Rig
  • Merging Lights, Light Rig and Light Links
    • By merging in the Lights, Light Rig and Light Links together, the parenting and position constrain will remain
    • In order to use the Merging Lights section, all naming conventions must be adhered to.
  • Include / Exclude section
    • The Right side sections are just for quick selections in the scene. You can create your own selection sets or selections 
    • Click “Selected as List” to add selected into the selected Lights in the multi listbox on the left
    • "Join selected" button is used to further add any other objects into the include/exclude list
    • If you need to duplicate include/exclude list from a light to multiple lights, you can just select the light in the master light drop down list and transfer it into the selected lights in the multi list box.

No comments: