brSmoothWeights for Maya

1. Introduction

1.1 Overview

brSmoothWeights extends Maya’s native skin weight painting with an interactive brush that averages skin cluster weights across a mesh, along with a range of options to shape the smoothing to production requirements. It is aimed at character skinning, where large amounts of manual weight painting are normally required to achieve clean, deformation-ready weights.

The brush can be used directly on a selected, already-skinned mesh; there is no need to switch into a dedicated weight paint mode first. Almost every brush setting can be adjusted from the Tool Settings window while the tool is active, and the most commonly used settings (size and strength) can also be adjusted interactively while painting.

brTransferWeights complements the smoothing brush with a dedicated tool for moving weights between influences. For example when a joint was skinned by mistake, or when weights need to be consolidated from one influence onto another.

Feature overview on YouTube: brSmoothWeights

1.2 Key Features


2. Installation and Setup

brSmoothWeights installs as a multi-version Maya module. All supported versions of Maya are served from the same installation, using version-independent and version-specific script/plug-in locations under the Maya user preferences.

2.1 General Installation

  1. Extract the files from the downloaded archive.

    Make sure the downloaded archive is extracted before installing.

  2. Drag and drop the file dragDropInstaller.py from the folder of the extracted files into the main Maya window.

    The installer cannot perform correctly when dragged directly out of the archive into the Maya window.

  3. The installation window displays the End User License Agreement (EULA). Confirm the EULA to continue.

    The installation is cancelled if the EULA is declined.

  4. The installer displays the options for the installation paths. If there are no specific requirements the paths can be left unchanged.

    By default the files install to the modules folder at the top level of the user preferences. If an existing installation is found, its previous path is reused.
    - For a custom path see Custom Install.
    - To only create the module file see Create Module File.

  5. Press Install to perform the installation.

    The installation progress is shown at the bottom of the window and saved to the installation log file next to the installer.

  6. When finished, restart Maya.

    Installed files can only be found by Maya after a restart. If Maya is not restarted immediately, the installed files cannot be used until it is.

  7. The plug-in is available through its menu items.

2.2 Custom Install

In case user-defined paths are required, they can be set directly from the installation window.

Install Path
The path the module files are copied to. The default is the modules folder at the top level of the Maya user preferences, but any location can be chosen.

The default Maya preferences don’t contain a modules folder at the top level of the user preferences, even though it is part of the default module search paths of Maya.

Module Path
The path the module file ( .mod) is created in. The module file contains the path where the actual installed files can be found. This path needs to be a registered Maya modules path. If the chosen path is not part of MAYA_MODULE_PATH, the module will not be found and the tool won’t be available.

The registered Maya module paths can be queried with the MEL command:

getenv MAYA_MODULE_PATH

2.3 Create Module File

Creating a module file is only meant for user-defined installations. No files are copied during the process, and no files are created in a location where Maya would find them automatically.

  1. The module file contains the path defined by the Install Path field in the installer window.
  2. The module file itself is created in the same folder as the installer.
  3. Press Create .mod file only at the bottom of the installer window to create the file.

2.4 Manual Installation

In environments where the drag-and-drop installer cannot be used, a manual installation copies the module to the expected location and creates a module file that directs Maya to its contents.

Step 1: Copy the Module

  1. The module folder with all necessary files is found in the modules folder of the extracted archive:
    PATH_TO_EXTRACTED_FILES/PLUG_IN_NAME/modules
  2. Copy the contained folder to any location of choice.

Step 2: Create the Module File

For Maya to find the files copied in Step 1, a module file needs to be created that tells Maya where the plug-in’s contents are located. This file has the extension .mod and must be placed in one of the module path locations Maya processes on startup.

The registered Maya module paths can be queried with the MEL command

getenv MAYA_MODULE_PATH

  1. Find the template module file at PATH_TO_EXTRACTED_FILES/PLUG_IN_NAME/resources/module_template.mod.
  2. Rename the file to match the name of the module.
  3. Open the file in a text editor.

    The module file contains definitions for each platform and supported Maya version. Definitions that don’t match the current platform/version can safely be removed, though this is not required.

  4. Replace MODULE_NAME with the name of the module being created.
  5. Replace PATH_TO_MODULE_CONTENT with the path the module contents were copied to in Step 1.

    The path must end with the folder matching the module name, e.g. /USERNAME/Documents/maya/modules/PLUG_IN_NAME.

  6. Repeat steps 4–5 for each installed version of Maya.
  7. Save the file to one of the Maya module paths listed in MAYA_MODULE_PATH.

After restarting Maya, the plug-in should be available through its menu items. If it isn’t, the issue is usually path-related. Review the steps above and check again after restarting Maya.

2.5 Uninstall

To uninstall, run the installer again and choose Uninstall at the bottom of the installer window.

2.6 Troubleshooting

If the installation fails because of file permissions, existing files or folders, or similar reasons, try uninstalling the existing installation first and then installing again:

  1. Run the installer by dragging dragDropInstaller.py into the main Maya window.
  2. Confirm the EULA (if shown).
  3. Choose Uninstall at the bottom of the installer window.
  4. Drag the installer into the main Maya window again.
  5. Perform the installation.

No Plug-in Available If the plug-in is not available in Maya, it’s usually related to a wrong path setup. Check:

If the issue persists, contact us with the installation log and details about the issue at mail@braverabbit.com.


3. Tool Access

brSmoothWeights is added to Maya’s default Skin menu, in the Rigging menu set:

Each menu item has an option box that opens the tool and its Tool Settings window together.

3.1 Requirements

The selected mesh must have an active skin cluster with at least two influences for the tools to have any meaningful effect. There is no reason to smooth or transfer weights when only a single influence is bound.


4. Quick Start

4.1 Smooth Weights - Paint

  1. Select the skinned mesh.
  2. From the Skin menu choose Paint Smooth Weights Tool (use the option box to also open the Tool Settings window).
  3. Adjust Size, Strength, Volume, and the other brush properties from the Tool Settings window as needed. See Properties for the full list.
  4. LMB-drag on the mesh to smooth the skin cluster weights.
  5. MMB-drag left/right to adjust the brush size, or up/down to adjust the strength, while hovering over the mesh.
  6. Optional: Shift-drag to paint a selection that limits the smoothing to an area, Ctrl-drag to remove vertices from that selection, or Shift+Ctrl+LMB to clear it.
  7. Switch to another tool (e.g. press the hotkey for the Select tool) to leave the brush.

4.2 Smooth Weights - Flood

  1. Select the mesh, or the vertices to flood-smooth.
  2. Activate Paint Smooth Weights Tool and open its Tool Settings window (via the menu item’s option box, or the tool property window while the tool is active).
  3. Set Strength to the desired flood amount, then press the Flood button in the Tool Settings window.
  4. Flood can also be triggered from a script, shelf button, or hotkey without opening the UI. See Flooding from a Script , which also covers a crash pitfall to avoid when scripting it directly.

4.3 Transfer Weights

  1. Select the skinned mesh.
  2. From the Skin menu choose Paint Transfer Weights Tool and open its option box to show the Tool Settings window.
  3. In the Tool Settings, multi-select a source and a destination influence in the influence list.
  4. Use the direction button between the two influence fields to reverse the transfer direction if needed.
  5. Adjust Size and Strength, then LMB-drag on the mesh to transfer weights from the source influence(s) to the destination influence.
  6. Switch to another tool to leave the brush.

5. Smooth Weights

5.1 Smoothing Modes

5.1.1 Surface Smoothing

By default, Surface smoothing is active ( Volume off). This averages the weights of a vertex with the weights of its connected neighbouring vertices. It is the fast, predictable mode and the recommended default for most skinning work.

5.1.2 Volume Smoothing

With Volume enabled, smoothing is performed based on the proximity of other vertices instead of mesh connectivity. These vertices do not have to be connected, only the distance is taken into account. This helps Smooth Weights across several discontinuous shells, such as overlapping posed geometry.

Volume smoothing should be handled with care, as it can easily introduce weights in areas that shouldn’t be affected.

Volume smoothing is more performance-intensive than surface smoothing, since for every vertex inside the brush the mesh is searched for neighbouring vertices within the Range. Keeping Range as small as possible while still capturing the intended neighbours helps keep the tool responsive.

5.1.3 Keep Shells Together

By default, weights are smoothed across shell boundaries to maintain mesh integrity when deformed: the opposite vertex of a border point receives the same weight as its border sibling, using Tolerance to find that matching vertex. This helps keep mesh seams together during animation, at a small cost to raw smoothing performance. On high-resolution, single-shell meshes this can be disabled for extra speed.

5.1.4 Selection

brSmoothWeights has a built-in, painting-style selection mode that constrains or protects areas of the mesh without leaving the tool or switching to Component Mode:

The selection is used together with Affect Selected to either constrain smoothing to the selected area or to protect it from being smoothed.

5.2 Properties

All properties can be adjusted from the Tool Settings window while the tool is active, and most are also available as flags on the brSmoothWeightsContext command for scripting.

Property Flag Type Default Description
Size -size / -s double 5.0 The brush radius, in world units.
Strength -strength / -st double 0.25 The strength of the smoothing effect. A value of 1 defines a full averaging with neighbouring weights.
Curve -curve / -c int 2 The brush falloff curve: 0 None, 1 Linear, 2 Smooth, 3 Narrow. Vertices closer to the brush center are affected more.
Affect Selected -affectSelected / -as bool true Smooths only the selected vertices. When off, only unselected vertices are affected. See Selection .
Ignore Lock -ignoreLock / -il bool false Smooths the weights of influences even if they are locked.
Depth Start -depthStart / -ds int 1 The layer at which the brush starts to consider vertices, counting from the foremost visible surface (1). Set to 2 to only affect the backside of a non-overlapping mesh.
Depth -depth / -d int 1 How many overlapping mesh layers, starting at Depth Start, are considered for smoothing. Use 2 to affect the front and back side of the mesh with the same stroke, or 3+ for posed meshes with overlapping geometry (e.g. an arm crease opposite the elbow). A larger depth evaluates more vertices and can affect performance.
Keep Shells Together -keepShellsTogether / -kst bool true Extends smoothing across a shell boundary by finding an equivalent vertex on a neighbouring shell boundary, in surface mode. See Keep Shells Together .
Tolerance -tolerance / -to double 0.001 The maximum distance used to find an equivalent vertex on a neighbouring shell boundary in surface mode.
Volume -volume / -v bool false Enables volume-based smoothing. See Volume Smoothing .
Range -range / -r double 0.5 The fraction of Size within which neighbouring vertices are considered for smoothing in volume mode. Keep as small as possible for performance.
Oversampling -oversampling / -o int 1 The number of smoothing iterations per stroke evaluation. 1 performs a single pass.
Fraction Oversampling -fractionOversampling / -fo bool false When on, the strength of each oversampling pass is divided by the oversampling count, to avoid over-smoothing.
Undersampling -undersampling / -us int 2 Skips this many drag events between smoothing evaluations. Reduces the effective strength of continuous dragging, smooths out the visible brush update, and improves the distinction between horizontal and vertical drags when adjusting size/strength interactively.
Draw Brush -drawBrush / -db bool true Displays the brush circle while smoothing. See Known Issues for a display limitation.
Draw Range -drawRange / -dr bool true In volume mode, also draws a second circle representing the effective search range ( Size × Range).
Color R/G/B -colorR -colorG -colorB (-cr -cg -cb) double 0, 0, 0 The RGB color of the brush circle.
Line Width -lineWidth / -lw int 1 The line width of the brush circle.
Enter Tool Command -enterToolCommand / -etc string ”“ A MEL command executed when the tool becomes active. Advanced/scripting use.
Exit Tool Command -exitToolCommand / -xtc string ”“ A MEL command executed when the tool becomes inactive. Advanced/scripting use.
Message -message / -m int 2 Controls the in-viewport help message shown while the tool is active. 0 disables it.

Flood (-flood / -f, double) is not a persistent property, it’s an action that immediately applies a flood smooth at the given strength to the current selection (or the whole mesh, if only the mesh is selected). It’s available as the Flood button in the Tool Settings window, and as an edit-only flag on the context command for scripting. See Flooding from a Script .

5.3 Keymaps

The default keymaps, active while the tool is running and the mouse is hovering the mesh:

MMB-drag left/right : Brush size

MMB-drag up/down : Brush strength

Shift-drag : Select vertices Limits the area affected by smoothing/flooding to the selection.

Ctrl-drag : Deselect vertices Removes vertices from the current selection.

Shift+Ctrl+LMB : Clear selection

All other properties are set from the Tool Settings window rather than an interactive drag keymap.


6. Transfer Weights

6.1 Overview

brTransferWeights moves skin cluster weights from one or more source influences to a destination influence, either by painting or by flooding a selection. By default, transferred weights are added to the destination influence’s existing weights; Replace can be enabled to overwrite them instead. The transfer direction can be reversed at any time from the Tool Settings window.

Like Smooth Weights, the brush supports Volume mode: candidate vertices are searched within a spherical radius equal to the brush Size around the cursor, instead of following mesh connectivity. There is no separate range fraction for the transfer brush.

6.2 Properties

Property Flag Type Default Description
Size -size / -s double 5.0 The brush radius, in world units. In volume mode this is also the search radius for candidate vertices.
Strength -strength / -st double 0.2 The strength of the transfer effect.
Curve -curve / -c int 2 The brush falloff curve: 0 None, 1 Linear, 2 Smooth, 3 Narrow.
Source Influence -sourceInfluence / -si int (multi) -1 The index/indices of the source influence(s) in the influence list. -1 means unset.
Destination Influence -destinationInfluence / -di int (multi) -1 The index of the destination influence in the influence list. -1 means unset.
Replace -replace / -rep bool false Replaces the destination influence’s weights instead of adding to them.
Reverse -reverse / -rev bool false Reverses the transfer direction (source and destination are swapped).
Affect Selected (see Smooth Weights) bool true Behaves the same as for Smooth Weights.

Ignore Lock, Depth Start, Depth, Keep Shells Together, Tolerance, Volume, Undersampling, Draw Brush, Color R/G/B, Line Width, Enter/Exit Tool Command, Message behave the same as their Smooth Weights equivalents; see Smooth Weights Properties .

Flood (-flood / -f, double) applies the transfer to the current selection (or the whole mesh) at the given strength, the same way as for Smooth Weights. Both are available as the Flood button in the Tool Settings window and as a scriptable flag.

6.3 Keymaps

MMB-drag left/right : Brush size

MMB-drag up/down : Brush strength

Shift-drag : Select vertices

Ctrl-drag : Deselect vertices

Shift+Ctrl+LMB : Clear selection

All other properties, including source/destination influence, are set from the Tool Settings window.


7. Performance

Both tools were extensively optimised for large meshes. The following measurements were taken on a production character mesh with 69k vertices and 89 influences, at default settings:

Operation Before After Speedup
Flood smooth, volume mode, oversampling 1 15.3 s 0.43 s ~35×
Flood smooth, volume mode, oversampling 4 60.9 s 1.5 s ~40×
Flood smooth, surface mode, oversampling 4 2.0 s ~1.0 s ~2×
Interactive brush update (surface and volume) ~9–14 ms ~8–12 ms slight improvement

Volume mode benefits the most: with the default volume range, a production character mesh can easily have hundreds of neighbours per vertex to search on every smoothing pass, which are now processed more efficiently than before. And oversampling passes have become comparatively cheap through improved neighbour search for every pass.

These numbers were measured on one specific test rig and are provided as a representative order of magnitude, not a guarantee for every mesh/influence count.


8. Known Issues

Brush Display
The brush circle only displays while a mouse button is pressed. This is due to a missing Qt implementation in the current tool display and needs to be addressed in future versions.


9. Python and MEL Commands

brSmoothWeights and brTransferWeights are implemented as Maya context commands. Each tool is driven by two commands: a context command ( brSmoothWeightsContext / brTransferWeightsContext) that creates, edits, and queries the tool’s settings, and an internal tool command used automatically by Maya for undo/redo of brush strokes. The latter is not intended to be called directly.

The examples below use MEL, since context commands are typically driven that way from shelf buttons and menu items; the same flags are available from Python via maya.cmds, e.g. cmds.brSmoothWeightsContext(edit=True, flood=1.0).

9.1 Activating the Tools

Creating and activating a context is a two-step process: create an instance of the context, then make it the active tool with setToolTo. For convenience, both tools provide a wrapper command that does this in one call:

brSmoothWeightsToolCtx();
brTransferWeightsToolCtx();

Both return the name of the created context instance, which can also be queried with `currentCtx` while the tool is active.

9.2 brSmoothWeightsContext

brSmoothWeightsContext( [contextName] , -edit , -query , <flags> )

Creates, edits, or queries a Smooth Weights tool context. All properties listed in 5.2 Properties are available as flags, in both their short and long form. For example, to edit the active context’s size and strength:

brSmoothWeightsContext -edit -size 8 -strength 0.5 `currentCtx`;


To query the current volume range:

brSmoothWeightsContext -query -range `currentCtx`;

9.3 brTransferWeightsContext

brTransferWeightsContext( [contextName] , -edit , -query , <flags> )

Creates, edits, or queries a Transfer Weights tool context. All properties listed in 6.2 Properties are available as flags. For example, to set the source and destination influence and enable replace:

brTransferWeightsContext -edit -sourceInfluence 3 -destinationInfluence 7 -replace 1 `currentCtx`;

9.4 Flooding from a Script

Flood is also available as an edit-only flag on the context command, for triggering a flood smooth/transfer from a shelf button, hotkey, or script without opening the Tool Settings window. It performs the same action as the Flood button there.

Editing -flood directly, without first creating and activating an instance of the context in the current session (for example calling brSmoothWeightsContext -edit -flood 1.0 on its own, with no prior brSmoothWeightsToolCtx() call), is the classic way this goes wrong and can crash Maya. The Tool Settings button doesn’t hit this, since the context is already active by the time the button is clickable.

Always create and activate the context first, then flood, then switch back to the previous tool:

brSmoothWeightsToolCtx();
brSmoothWeightsContext -edit -flood 1.0 `currentCtx`;
setToolTo $gSelect;


The same pattern applies to brTransferWeightsContext :

brTransferWeightsToolCtx();
brTransferWeightsContext -edit -flood 1.0 `currentCtx`;
setToolTo $gSelect;


This is safe to bind to a shelf button or hotkey, and is the recommended way to flood-smooth or flood-transfer without manually painting.


Disclaimer

This documentation reflects the current state of brSmoothWeights and brTransferWeights for Maya. Functionality and features may evolve in future releases.