Tech Art 2011

A summary of the scripts I’ve written between 2008 – 2011.

Company:  THQ San Diego
Programs:  MotionBuilder, Maya, Max, Unreal Engine,
Languages:  Python, MEL, MAXScript
File Formats:  FBX, PSA

The Face UI:

The Face UI was developed to create facial animation for use in the Unreal engine.  It uses a hierarchical node structure that allows non-destructive hand-key layering on top of motion capture performances.

Included is a pose system for saving individual face regions or entire emotions.

Command Layout:

•   Button “Import Masks(s)” will import the universal mask, constraining and baking the mask’s “Vault” locators to the character’s joint positions., which creates the offset hierarchy for layered animation.

•   Button “Toggle Tweak Node Vis” will reveal the “Tweak” nodes that can be used for performance adjustment, e.g., giving a character an Elvis sneer.

•   Slider (next to the “Toggle Tweak Node Vis”) button controls the transparency of the Tweak nodes.

•   Button “Select Base Curves” will select the bottom-most channel that the selected Tweak nodes are constrained to (mocap, if it is present).

•   Button “Select Look-at” will select the iconic eye controller, which controls the eyeball direction (via aim constraints).

•   Button “Face Cam” will toggle the perspective view and look through the “Face Cam” – a camera parent constrained to the face.

Controls Layout:

•   All of the iconic controls are set up with ranges 0 to 1, for easy resetting via the channel box.

•   The “Auto Lids” control turns on or off auto (SDK) eyelid shaping that occurs when the eyes move left or right.

Poses Layout:

All poses save are based upon the iconic controls selected.
During pose restoration, if the icon controllers are selected, only their values will be restored from the saved pose. Otherwise, all values are restored.

MotionBuilder UI:

The MotionBulder UI is a Python script containing tools used to take an animation from start to finish through the pipeline.

Functions:

•  Button “Attacker” will add an “Attacker” namespace to the joints and connected mesh of the selected character.

•  Button “Body Poses” will merge the body poses file into the scene.

• Button “Swap Character” will merge in a browsed-to character and swap him for the selected character.

•  Button “Toggle Plot” will plot the animation to a rig or to the skeleton, depending on which is currently plotted.

•  Button “Create Clip” will create a clip in the story editor from the current actor and take.

•  Button “Save MO(s)” will perform a “Save As” of the skeletons and the “animation” takes, writing a “_MO” (motion only) file.

•  Button “Export PSA(s)” will call Maya in batch mode and export a PSA animation of the selected character.

PSA Exporter:

The PSA Exporter was developed to perform three main functions:

•  Zeroing out a character for cases where he flies through the air (feet leave the ground) and lands again (feet or body impact).

•  Plotting the character’s hips translation to a “positionLocator” node (that is read by the game).

•  Exporting animations in the Unreal PSA format.

The tool opens up with collapsed layouts, revealing the most frequently used features:

Settings:

Expanding the settings layout reveals the options for the UI and functionality. The control explanations (in order of UI):

•  Checkbox “Use UI config file when importing and exporting” will record the UI settings and save a UI config file on PSA export. It will also read in the config on import.

•  Checkbox “Perforce auto add or open for edit” will auto add or open for edit exported PSAs and config files in Perforce. It will also collect source files (if they’re open for edit).

•  Checkbox “Open Explorer folder on export” will open an explorer window revealing the exported PSA location.

•  Field “FPS” is the ActorX export rate. It should be kept at 60 fps for In-Game exporting.

Export Fields:

The exporting section contains fields that are used to build necessary options for exporting through Maya’s ActorX.mll plugin, for unreal export in the PSA format.

The fields in this section will be auto-completed upon browsing for the “MO” .fbx file using the “Import Attacker MO” and “Import Victim MO” buttons.

Controls:

•  Button “Import Attacker MO” and “Import Victim MO” buttons open a browser for browsing to “motion only” (MO) .fbx files, as exported from MotionBuilder.

•  IntField “Start Frame will be auto-populated upon “MO” browsing, with the first key of animation on the imported character.

•  IntField “End Frame will be auto-populated upon “MO” browsing, with the last key of animation on the imported character.

Zeroing and Center of Mass:

The “ZERO/CENTER OF MASS” Layout contains fields for “Zeroing” out a character (more like pinning in place, really), and calculating a new center of mass for realistic movement in the engine.

Usually, a character that jumps, flips, falls, or generally translates for any length of time requires “zeroing” and a new center of mass calculation.

•  IntField “Frame Feet Leave” is the frame right after the feet have left the ground for the character (or together).

•  IntField “Frame Before Landing” is the frame right before the character’s feet (or body) touch the ground.

•  IntField “Impact Up Distance” is for “dropping” a character the entered amount, for one frame upon landing (the curve is actually shifted back up this amount, creating the drop).

•  CheckBoxes “Process Channels X Y Z” allow zeroing of specific channels for different situations. For example, a character the “leaps” at another might only have the leap direction processed.

•  Layout “Center of Mass Settings” contains fields that are used to weight areas of the body for real-time calculation of the center of mass. These settings should mostly be kept as-is, as they are rarely (if ever) changed.

•  Button “Cmass Attacker” and “Cmass Victim” will do the zeroing, add the drop frame, and recalculate the center of mass for each character.

•  Button “Cmass Together” is used when the Attacker and the Victim are “stuck together” when flying through the air, sharing the same center of mass.

Note that “zeroing out” doesn’t mean taking the character’s hips to 0 0 0. It means the Hip values are queried at the “Frame Before Landing” field and are “pinned” there. The center of mass recalculation adds additional values back in.

Plotting:

•  Buttons “FIN Attacker”, “FIN Both”, and “FIN Victim” buttons will remove the translation curves from the Hips (on the Attacker) and put them on the positionLocator. The Victim’s positionLocator is kept where it is, so the engine knows the relative distance from the Attacker. (“FIN” standards for “Finalize”).

•  CheckBoxes “Plot T” and “Plot R” will toggle the translation and rotation on the positionLocator on and off.

Exporting:

•  Buttons “PSA Attacker”, “PSA Both”, and “PSA Victim” buttons export the animations out as a PSA, based on the fields entered in the ActorX section.

Camera Switcher Tool:

The Camera Switcher Tool allows a user to quickly set up a cinematic camera scene through the use of a spreadsheet and a real-time• expression.

A master camera is snapped to predetermined positions on playback by reading the spreadsheet and determining cut frames, the snap-to camera, and the interest aims.

Each of the individual cameras is connected to hand-held curves that can be dialed up or down through the UI.

Main Controls:

•  Button “Import Cameras” will import the predetermined camera file into the current scene.

•  Button “Create Target Locators” will create target locators and constrain them to a joint on the body. These are what the individual cameras aim at.

•  Button “Save UI Values” will write the UI values to a CameraSwitcher node to be saved with the scene. This node is read on the launch of the Camera Switcher UI.

•  Button “Add Entry” will add a new camera cut.

•  Button “Look Through Toggle” will toggle between and look through the perspective and the master camera.

•  Checkbox “Dampen” activates the global dampening system for all the cameras. This gives individual cameras a lag when following (aiming) at the interest locators.

•  FloatSlider “Past/Future” sets the Master Cam lag (a frame cache node) to favor looking in the past or the future.

Spreadsheet Entries:

•  Checkbox next to “Time” is used for selecting a cut for deletion.

•  IntField “Time” is used to set the frame at which the master camera will snap to the position of the target camera.

•  Button “<-” is used to set the “Time:” intField to the current value of the TimeSlider.

•  OptionMenu “Camera” is used to select the camera that the master camera will snap to at the time in the spreadsheet.

•  OptionMenu “Interest” is the locator the snap-to camera will be aim constrained to.

•  FloatField “Hand-Held” is used to numerically set the value of the multiply divide node connected to the hand-held curve channels on the snap-to cameras.

•  FloatSlider “Hand-Held” is used to set the value of the multiply divide node connected to the hand-held curve channels on the snap-to cameras.

•  CheckBox “Tracking” will aim the snap-to camera at the “interest” for the duration of the cut. If unchecked, the camera will start aimed at the interest, but will not follow.

•  FloatField “Focal Length” numerically sets the focal length on the snap-to camera.

Resulting Playblast:

It took cinematic director Dori Arazi under 20 minutes to set up this scene. He was very pleased.