anBuoy

Nodes
Optimization
       buoyHandle
       buoyWire
       buoyCluster
       buoyDeformer


Introduction

anBuoy is the name of a custom Autodesk Maya plugin that deforms geometry by pulling a series of co-dependent handles by means of the Maya Move tool (DeformerWithMultipleHandles). 

Connected handles are called Wires while a set of loose handles is called a Cluster. In the image below there is one wire with 3 handles (red spheres) and one cluster of 2 handles (green spheres). Each handle has a 1-on-1 relationship with a pre-selected mesh vertex.

The wire deforms the geometry in a perpendicular direction away from the wire itself. The cluster deforms the geometry in a radial direction with respect to its handle.

All the handles feed into one deformer node which is agnostic to what ever type of modifier (Cluster/Wire) is being used. The design is such that each handle remains attached to the geometry's surface irrespective of the deformation inflicted upon by adjacent handles. 

https://youtu.be/tR5nuecfYiA

What you see - the Wire with the red spheres is pulled up first and at the same time their influences are being increased. Then the left green Cluster handle is 
pulled up while its influence is being increased. And finally the right green Cluster handle is pulled up but only just while its influence is increased quite significantly. 
Throughout this animation one can see that the spheres remain on the surface of the geometry no matter how much they deform each others region of influence.



  • This deformer provides riggers, character finalling as well as animators an intuitive and simple way to tweak geometry by means of multiple handle controls that remain on the surface of the geometry footNote 
  • Animators can add handles at will to achieve a pose that otherwise would have required a rigging tweak back in the rigging department i.e. it gives the animator the flexibility to tweak geometry on a per shot basis. 
  • Industry feedback has shown that the intuitive and modular nature of this tool helps to reduce production costs e.g. crew members reach their quotas more easily & there is a reduced need to send a rig back upstream for adjustments.
footNote: The standard Soft Deformer that comes with Maya does not have this capability. One could try to connect multiple standard Soft Deformers in series but then only the last handle in the chain would stay on the geometry surface while the ones earlier on in the deformation chain may float in space
   



This plugin contains a number of custom Maya nodes which together form a framework that allows the user to manipulate the geometry in any arbitrary way.

Hierarchy
  • The sample above shows 1 wire (represented by 3 red spheres) and 1 cluster (represented by 2 green spheres). 
  • The spheres are just for illustration purposes and don't play a role in the actual deformations. 
  • Each sphere is parented underneath a custom transform of type buoyHandle.
  • A cluster consists of a custom transform of type buoyCluster which is the parent of the cluster handles of type buoyHandle.
  • A wire consists of a custom transform of type buoyWire which is also the parent of the wire handles of type buoyHandle as well as the parent of 3 nurbsCurves (baseWire, cntlWire, twinWIre).
Node creation sequence
  • Create a buoyDeformer node and connect it with the geometry that needs to be deformed
  • Select the geometry and 'Create Cluster' from 'Cluster' menu. The selection goes into component mode. The user selects 1 or more vertices. Upon hitting the return key a buoyCluster node is being created and a number of buoyHandle nodes (1 for each vertex) are parented underneath the buoyCluster node.
  • Select the geometry and 'Create Wire' from 'Wire' menu. The selection goes into component mode. The user selects at least 3 vertices. Upon hitting the return key a buoyWire node is being created and a number of buoyHandle nodes (1 for each vertex) are parented underneath the buoyWire node. 


Optimization

Parallel Processing
This deformer lends itself for calculating the vertex deformation deltas in parallel i.e. the kernel is configured such that each thread calculates the deformation deltas of the vertices in its corresponding bin.  Hence the original vertex value gets updated while still within its thread. When all threads are finished, all vertices have been updated and the kernel returns the new vertex positions to the host code so that it can update the Maya geometry iterator. This parallel approach has been implemented on a NVidia Quadro GPU by utilizing the CUDA API.

Masking
Vertices with positions outside the deformation zone can be de-selected by means of a mask so that their deformation deltas will not be calculated during the deformation process. 


Attribute Editor

The images below show the attribute editor for the various nodes

buoyHandle AE panel



Deformation Attributes:

  • vtxIndex: the vertex index the handle is attached to
  • Influence: the size of the region that is being deformed by this handle
  • falloff: a parameter that influences the shape of the Handle's deformation
  • envelope: a value between 0 and 1 to dial in/out the Handle's deformation
Node Behaviour
The node state has an effect on the deformation
  • Normal: the handle's deformation will contribute to the overall deformation of the mesh
  • HasNoEffect: the handle will not participate in the deformation i.e. it is effectively a point constraint 


buoyWire AE panel


buoyWire

Wire Attributes

  • Degree: the degree of the Nurbs curves, applies to all three wires (base, cntl, twin)
  • Form: The type of Nurbs curve (Open, Closed, Periodic)
  • Envelope: Allows the user to dial in/out the deformation delta that is caused by this wire (in addition to the envelope of the corresponding Handles)

Map Attributes

Each Wire has both a Weight Map as well as a Selection Mask. The former weights each vertex deformation delta while the latter selects which vertices are subject to deformation.
  • Weights On:  tells whether the Wire's Weight Map should be active or not
  • Mask Ontells whether the Wire's Selection Map should be active or not
  • Lock Distances: tells whether to keep the distances in memory and on a node plug


buoyCluster AE panel


buoyCluster

Map Attributes


Each Cluster has both a Weight Map as well as a Selection Mask. The former weights each vertex deformation delta while the latter selects which vertices are subject to deformation.
  • Weights On:  tells whether the Cluster's Weight Map should be active or not
  • Mask Ontells whether the Cluster's Selection Map should be active or not


buoyDeformer AE panel


buoyDeformer

Deformer Attributes

  • Envelope: a parameter that allows the user to dial in/out the overall deformation deltas
  • Adjust Normals: will recalculate the Handle's orientation at the end of the deformation stage (MoveTool in objectMode will allow the user to pull Handle in perpendicular direction to surface)

GPU/CPU Attributes

  • Bin Size: the size of vertex packages that is fed to each GPU kernel
  • Processing: a pulldown option menu - 'CPU' will exclude the GPU, 'Auto' will use GPU if there is one 


Menu Items

Upon loading the plugin the main menu bar will show an extra item called 'BuoyDeformer'. This menu has several sub menus.

 
 

Cluster Menu

  • Create Cluster: will create a cluster interactively by allowing the user to select 1 or more vertices i.e. handles.
  • Weight Cluster: will invoke the Paint Attribute Tool to paint the Cluster's weights on the selected cluster.
  • Mask Clusterwill invoke the Paint Attribute Tool to paint the Cluster's mask  on the selected cluster. 
  • Add handle: will add a handle interactively by allowing the user to select a <cluster, vertex> pair.
  • Create Proxy: will add a proxy cluster to a piece of geometry so that it becomes under the influence of an already existing cluster else where. 

Wire Menu

  • Create Wirewill create a wire interactively by allowing the user to select 3 or more vertices i.e. handles.
  • Weight Wirewill invoke the Paint Attribute Tool to paint the Wire's weights on the selected wire.
  • Mask Wirewill invoke the Paint Attribute Tool to paint the Wire's mask on the selected wire.
  • Insert Handlewill insert a handle interactively by allowing the user to select <leftHandle, rightHandle, vertex> triple.
  • Create Proxy: will add a proxy wire to a piece of geometry so that it becomes under the influence of an already existing wire else where.
Show Menu
  • Clusters on Shape: will list the buoyCluster nodes that act on the selected shape
  • Wires on Shape: will list the buoyWIre nodes that act on the selected shape
  • Deformer on Shape: will list the buoyDeformer node that act on the given shape.
  • Shapes through Deformer: will list all the shapes that are being deformed by the selected buoyDeformer node.
  • Cluster by Proxy: will list the buoyCluster node that is represented by the selected proxy node.
  • Wire by Proxy: will list the buoyWire node that is represented by the selected proxy node. 


Commands

This plugin provides a number of custom commands which are derived from the MPxCommand class. 
  • buoyClusterCmd: to create, edit and query buoyCluster nodes
  • buoyWireCmd: to create, edit, query buoyWire nodes
  • buoyCmd: to query node configuration/connections



  • June 8th 2016      - Page creation
  • August 7th 2016 - New 'Node' section, modified 'Menu' section, modified AE panel for buoyHandle, new 'Page History' section
Comments