Face Control Projection Tool v1.0.0 Documentation

The Face Control Projection Tool projects a fully constructed control hierarchy (including optional control shapes, offset nulls, joints, etc) onto any mesh surface based on the location of your mouse pointer relative to the mesh.
This tool was developed to speed up the facial rigging process – although ultimately it should be used for whatever purpose for which you find it useful.

Installation

fig1
fig.1
fig.2
fig.2
fig.3
fig.3
  • Unzip faceTool_v1.0.0.zip wherever you want the script. A common location is My Documents\maya\scripts.

  • Drag install.mel into any maya scene.

  • In the UI that appears (fig.1), select how you would like to access the tool. The options are:

    • No Shelf

    • New Shelf (creates a new shelf for the tool)

    • Current Shelf (adds shelf buttons for the tool to the currently active shelf)

    • Existing Shelf (adds shelf buttons for the tool to any shelf, as indicated by your selection in the dropdown menu)

    • No Toolbar

    • New Toolbar (adds a new menu for the tool to the top of the Maya window)

    • Existing Toolbar (adds menu items for the tool to any top-of-window menu, as indicated by your selection in the dropdown menu)

  • Click install. The appropriate shelf and menu items (fig.2, fig.3) will be created and will persist in future Maya sessions.

Uninstallation

  • If you selected new shelf:

    • Open the shelf, then click the settings cog on the left of the shelf layout.

    • Click Delete Shelf.

  • If you selected current or existing shelf:

    • Right click on the shelf buttons for the tool.

    • Click Delete.

  • If you selected new toolbar or existing toolbar:

    • Navigate to My Documents\maya\[VERSION]\scripts

    • Locate the following file: faceControlProjectionToolMenuBuilder.mel

    • If that file doesn’t exist, but you do have menu items for this tool, execute the following script in a mel tab of the Maya script editor:

      • string $scriptPathArray[] = stringToStringArray(`getenv “MAYA_SCRIPT_PATH”`, “;”);
        print $scriptPathArray[1];

    • Navigate to the path that is printed in the script editor.

    • Delete faceControlProjectionToolMenuBuilder.mel

    • Open userSetup.mel and delete the following line:

      • source “faceControlProjectionToolMenuBuilder.mel”;

    • Save the file and re-open Maya – you should find that the tool has been uninstalled, and you can now move or delete the folder that contains it.

Activating and Using the Tool

Depending on what options you selected during installation, you may be able to access the tool multiple ways.

  • If you installed the tool with shelf buttons (see fig.2), you can activate the tool with default settings by simply clicking the Open Tool button. Alternatively you can open the tool UI by either double clicking the Open Tool button or right clicking it and selecting Open UI.

  • If you installed the tool with a toolbar menu (see fig.3), you can activate the tool with default settings by clicking Activate Tool in the toolbar menu. Alternatively you can open the tool UI by clicking the square option box to the right of Activate Tool.

  • Note that the Mirror Helper options are discussed below in Mirroring Center Offsets and X/Y/Z Axis Mirror Helper.

Using the tool is simple. Once you have activated the tool, you can click anywhere on any mesh object to instantly create a control hierarchy. The construction of the hierarchy is determined by the settings in the tool UI and is explained in detail below.
To be more precise with your control placement, you can click and drag to create hierarchies. The placement of a hierarchy is final once you have released the left mouse button.
Control hierarchies are automatically oriented according to the normals of the target mesh object. The orientation is arranged so that the Z axis is always facing away from the target mesh object, and the Y axis is facing up whenever this doesn’t conflict with the Z axis.
This version of the tool does not support vertex, grid, or curve snapping.

Navigating the Tool UI

fig4TypeB
fig.4

The UI is separated into 4 sections (fig.4): Mirror Options, Control Options, Hierarchy Options, and Naming Options.

Mirror Options

Mirror Across X/Y/Z

fig5
fig.5

The Mirror Across X/Y/Z option boxes affect how many control hierarchies are created and across which axes they are duplicated with each click. If multiple axes are selected, a duplicate hierarchy will be created for each axis.
For example, with only Mirror Across X checked, one hierarchy will be projected onto the surface where your mouse pointer is, and another will be created on the opposite side of the X axis (fig.5a). If all three axes are ticked, then a total of 8 hierarchies will be created, since each axis’s hierarchy must be mirrored to the others (fig.5b).

Mirror X/Y/Z Transform

fig6
fig.6

The Mirror X/Y/Z Transform option boxes affects transforms of all new control hierarchies, whether mirroring or not. With Mirror Transform turned on, hierarchies projected on the positive side of an axis’ center point will be reversed, compared to a hierarchy projected on the left side. This takes affect whether mirroring is turned on for that axis or not.
This has the following effect: Hierarchies on either side of an axis’ center point with mirrored transforms will move in opposite directions when transformed together
(fig.6a). Hierarchies without mirrored transforms will move in the same direction when transformed together (fig.6b).

Mirroring Center Offsets and X/Y/Z Axis Mirror Helper

For circumstance where your target mesh object is not at world 0,0,0 this tool has mirroring offset options. These offset values operate in world space, and represent the center around which hierarchies will be mirrored.
If you do not know the actual XYZ coordinates around which you want to mirror your hierarchies, use the X/Y/Z Axis Mirror Helpers. Clicking any of these buttons creates a simple plane to represent the central point of the corresponding axis
(fig.5). These can be scaled or translated but not rotated.
Moving the Mirror Helper planes will update the Mirroring Center Offset values automatically and visa-versa, so that the planes will always represent the center point of hierarchy mirroring for their respective axes.
If you are accessing the tool
without the UI, you can create the Mirror Helpers using the appropriate shelf buttons or toolbar menu items.

Snap To Center X/Y/Z and Falloff To Center

fig7
fig.7

If you are mirroring hierarchies but you want a control directly at the center point of any given axis, you can check the Snap To Center checkbox for that axis. If a Snap To Center checkbox is ticked for an axis, any hierarchy that is projected within the distance in Falloff To Center from the projection point to the center point will snap to the center and NOT be mirrored (fig.7). The Falloff To Center value is in Maya units.

Control Options

Control Shape dropdown and <<< button

fig8
fig.8

You can change the shape of newly projected controls by selecting a shape with the Control Shape dropdown menu. Note that currently this tool doesn’t provide a way to change the shape of controls that have already been projected. The default shapes provided with this version of the tool are:

  • disk (surface) (fig.8a)

  • circle (curve) (fig.8b)

  • sphere (surface) (fig.8c)

  • sphere (curve) (fig.8d)

  • square (curve) (fig.8e)

  • cube (curve) (fig.8f)

    fig9
    fig.9

You can also add your own custom control shapes. Select your new custom control shape and click the <<< button. In the dialog box that appears (fig.9), enter a name for the new shape (by default this will be the name of the control shape’s transform node).
If you want the new shape to be accessible in future Maya sessions, click “Save Shape”. The shape will then always appear in the Control Shape dropdown menu. If you only want to access the new shape during the current Maya session, click “Use Shape w/o Saving”.
If a control shape with that name already exists in the dropdown menu, you will have the option to override the previous shape or rename your new custom shape.
The shape will appear in the Control Shape dropdown menu for the remainder of this Maya session, but will not appear next time you open Maya.

fig10
fig.10

When creating custom control shapes, keep in mind that the original positive Y of the control shape will be facing away from the target mesh when projected. For example, if your custom control shape is an arrow pointing directly upward (fig.10a), the arrow will be pointing away from the target object, directly following its normals, when projected (fig.10b).
For best results, your new shape should be one maya unit in radius (i.e. takes up four squares of the grid). You should also delete history, ensure that the shape’s center is at world 0,0,0, and freeze transforms before clicking <<<.

Control Size

Control Size affects the size of the control shape and the radius of the joint, if a joint is created. Control Size is 0.5 maya units (i.e. Control Size 1 creates a control that is 2 maya units wide), although custom control shapes may vary. In the case of custom control shapes, the value of Control Size multiplies by the original size of the control (i.e. Control Size 1 is the original size, whereas Control Size 2 is double the original size).
To avoid controls with 0 size, the minimum Control Size is 0.01.

Control Color

The Control Color slider allows you to select the color of the control, and uses color index values. With nurbs curve controls, this changes the Color in Drawing Overrides. With nurbs surface controls, this will create a lambert material (or use the material created for previously projected controls) in the selected color.
For compatibility reasons, this version of the tool does not allow RGB values for control colors.

Hierarchy Options

Control System Parent Object

The radio buttons under Control System Parent Object determine the transform node under which all projected hierarchies will be parented. Options are World (all hierarchies are parented straight under the world, with no overall parent node), Existing Transform (to define the transform node to be used as a parent object, select it and then click <<<), and New Group (a new group is created, to which all hierarchies will be parented. The name of the new group can be determined in Naming Options).

Create Offset Group

These options alter the structure of the control hierarchy. The Create Offset Group checkbox will create a single offset group for each control hierarchy. I suggest leaving this option on at all times. This group will hold all of the transform information for the rest of the hierarchy, so that anything parented under it will by default have 0 values for their transforms. If this option is turned off, whichever transform node is top-most in each hierarchy will have non-zero transforms. The naming convention of this group can be determined in Naming Options.

Num SDK Groups

This will determine the number of groups in the hierarchy between the control shape and the offset group (or hierarchy parent transform if no offset is created).
These groups are for applying set-driven-key or other automated transforms to the control in such a way that will not interfere with the control transform values. The naming convention of the SDK groups can be determined in Naming Options.

Create Joint

If the Create Joint checkbox is checked, a free-floating joint is created and parented directly under the control transform node. In this version of the tool there are no separate hierarchy options for the joint itself – it will always be parented directly under the control. The name of the joint can be determined in Naming Options.

Naming Options

New Group Name

If New Group is selected under Control System Parent Object, this will determine the name of the new parent group which is created.
The full name of the new group will display exactly as you enter it here.

Offset Group Prefix / Suffix

There are two text fields here. The first is the prefix for the offset group, and the second is the suffix. Either field can be left blank, but if both are blank the result will be an offset and control with identical names.
The full name of the offset group will display as prefix+[Control Name]+suffix
.

SDK Group Suffix / Sequencer

There are two text fields here. The first is the suffix for SDK groups and will appear after the control name on every SDK group created. The second text field is for the SDK group sequencer. This field must be a single alphanumerical character, and represents the character present at the end of the name of the first SDK group created. Additional SDK groups will have the next character in sequence.
For example, if 3 SDK groups are created and the sequencer character is “A”, the first (lowest in the hierarchy) SDK group’s sequencer character will be A, the next group’s sequencer will be B, and the third will be C
.
The full name of the SDK group will display as [Control Name]+suffix+sequencer
.

Control Name and Joint Name

The Control Name field determines the name of the control itself. It also determines part of the Offset and SDK group names as indicated by [Control Name] in the above sections of this documentation.
The Joint Name field determines the name of the joint, if one is created.
The full names of the control and joint will display exactly as you enter them here.

Add Prefix When Mirroring Across X/Y/Z and Positive/Negative Prefix

The checkboxes for Add Prefix When Mirroring Across X/Y/Z determine whether a prefix will be added to every item in newly created control hierarchies when mirroring hierarchies across the related axis.
These prefixes are determined in the Positive/Negative Prefix text fields.
For example, if mirroring hierarchies across the X axis: If Add Prefix When Mirroring Across X is checked, the prefixes in Positive/Negative Prefix will be added to the beginning of every object in both the original and mirrored hierarchies. The hierarchy that is on the negative side of the X axis center will receive the Negative Prefix (by default “R_”), and the hierarchy that is on the positive side of the X axis center will receive the Positive Prefix (by default “L_”)
.

Tool Settings

At the top of the UI window, there is a Tool Settings menu. The options for this menu are detailed below.

Restore Default Settings

This option will reset all tool options to their defaults. Any changes you have made to the settings will be reverted and lost. Any new control shapes that you have added to the tool will still be in the Control Shape dropdown menu.
Note that restoring default settings will also turn on the Save Tool Settings Automatically option.

Save Tool Settings

This option saves any changes you have made to tool options. This means that the tool settings will remain the same in future Maya sessions.

Save Tool Settings Automatically

If this option is turned on, any changes you make to the tool settings will be automatically saved when you close the tool UI. If your last selected control shape was a new custom control shape that you did not save it for use in future Maya sessions, the default Control Shape option will be used.
Note that even if this option is turned off, your tool settings will not revert to the default settings until you start a new Maya session. To revert to default settings manually, select Restore Default Settings.
Note also that this setting does not automatically save itself. If you turn it off and then close the UI without saving settings manually, it will be turned on again the next time you open the UI.
This option is on by default.