Create and edit nCloth constraints
 
 
 

See nDynamic Collisions and Creating an Exclude Collide Pairs constraint.

Creating an nCloth Transform constraint

You can create a Transform constraint to hold specific nCloth components in place or move them through XYZ space. For example, you can make a Transform constrained nCloth follow its animated passive object through its scene by parenting its Transform constraint locator to the passive object.

To create an nCloth Transform constraint

  1. In the scene view, select the nCloth object or nCloth components (vertices, edges, or faces) you want to constrain.

    If you select edges or faces, then all their vertices will be Transform constrained.

  2. In the nDynamics menu set, select nConstraint > Transform > .

    The Create Transform Constraint Options Box window appears.

  3. (Optional) Turn on Use Sets to add all the selected nCloth object’s components, or only the nCloth components you selected, to a dynamic constraint selection set.
  4. Click Create Constraint or Apply.

    The nCloth object or components you selected are now constrained to their current positions in XYZ space, and a Transform constraint locator is created for the selected nCloth object or components.

    The nCloth object or components you selected are also now connected to the nCloth’s Maya Nucleus solver through a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Transform constraint) and how it behaves. For example, you can create a Transform constraint with the following attribute settings:

    • Spring as the Constraint Method
    • All to First as the Component Relation
    • Component Order as the Connection Method

    See dynamicConstraintShape.

  5. (Optional) Parent, animate, or constrain the Transform constraint locator to another object for additional control over your nCloth’s movements. For example, you can animate the Transform constraint locator of a Transform constrained nCloth silk scarf to direct its movements as it falls through the air.

Creating an nCloth Component to Component constraint

You can create a Component to Component constraint to attach nCloth components (vertices, edges, or faces) to other nCloth or passive object components. For example, you can constrain the vertices from the top of an nCloth cape to the shoulders of a passive object character, so that the cape hangs from the characters shoulders and moves with the character.

To create an nCloth Component to Component constraint

  1. In the scene view, select the nCloth components (vertices, edges, or faces) you want to constrain. If you select edges or faces, then all their vertices will be constrained.
  2. Select the target components (vertices, edges, or faces) on the same nCloth object, a different nCloth object, a passive object, or a non-nCloth object to which you want to constrain the nCloth vertices. If you select edges or faces, then all their vertices will be constrained.
    NoteIf you selected target components on a non-nCloth object, that object will be made a passive object when the constraint is created.
  3. In the nDynamics menu set, select nConstraint > Component to Component > .

    The Create Component to Component Constraint Options Box window appears.

  4. (Optional) Turn on Use Sets to add the nCloth components and the target components you selected to a dynamic constraint selection set.
  5. Click Create Constraint or Apply.

    The nCloth components you selected are now constrained to the target vertices you selected, and they are now connected to the nCloth’s Maya Nucleus solver through a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Component to Component constraint) and how it behaves. For example, you can create a Component to Component constraint with the following attribute settings:

    • Spring as the Constraint Method
    • All to All as the Component Relation
    • Nearest Pairs as the Connection Method

    See dynamicConstraintShape.

Creating an nCloth Point to Surface constraint

You can create a Point to Surface constraint to attach nCloth components (vertices, edges, or faces) to a target surface (an nCloth surface, or a passive collision object). For example, you can use a Point to Surface constraint to hold the waistband of a pair of nCloth pants to the hips of a passive object character.

To create an nCloth Point to Surface constraint

  1. In the scene view, select the nCloth components (vertices, edges, or faces) you want to constrain.
  2. -select the target surface to which you want to constrain the nCloth components.

    The target surface can be a different nCloth object that is part of the same system, one of the nCloth’s passive objects, or a non-nCloth object.

    NoteIf you selected a target surface that is a non-nCloth object, the surface will be made a passive object when the constraint is created.
  3. In the nDynamics menu set, select nConstraint > Point to Surface > .

    The Create Point to Surface Constraint Options Box window appears.

  4. (Optional) Turn on Use Sets to add the nCloth components and target surface you selected to a dynamic constraint selection set.
  5. Click Create Constraint or Apply.

    The nCloth components you selected are now constrained to the target surface you selected, and they are now connected to the nCloth’s Maya Nucleus solver through a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Point to Surface constraint) and how it behaves. For example, you can create a Point to Surface constraint with the following attribute settings:

    • Spring as the Constraint Method
    • Object to Object as the Constraint Relation
    • All to First as the Component Relation
    • Component Order as the Connection Method
    • At Start as the Connection Update

    See dynamicConstraintShape.

Creating an nCloth Slide on Surface constraint

You can create a Slide on Surface constraint to attach nCloth components (vertices, edges, or faces) to a target surface (another nCloth surface, or a passive collision object), and allow the constrained nCloth components to move or slip along the surface to which it is constrained. You can use a Slide on Surface constraint instead of collisions, and in most cases it works faster than collisions. For example, you can Slide on Surface constrain all the vertices in an nCloth shirt to a character model instead of making the character a passive object.

Note
  • If you use a Slide on Surface constraint in the place of collisions for an nCloth object, then turn off Collide in the nCloth’s nClothShape Attribute Editor tab. Otherwise, both collisions and the constraint will be calculated.
  • If you use a Slide on Surface constraint in the place of collisions for an nCloth object, then you can not effectively use Collision Layers to control which members of your Maya Nucleus system can collide with the constrained nCloth object.

To create an nCloth Slide on Surface constraint

  1. In the scene view, select the nCloth components (vertices, edges, or faces) you want to constrain. If you select edges or faces, then all their vertices will be constrained.
  2. -select the target surface to which you want to constrain the nCloth components. The target surface can be a different nCloth object that is part of the same system, one of the nCloth’s passive objects, or a non-nCloth object.
    NoteIf you selected a target surface that is a non-nCloth object, the surface will be made a passive object when the constraint is created.
  3. In the nDynamics menu set, select nConstraint > Slide on Surface > .

    The Create Slide on Surface Constraint Options Box window appears.

  4. (Optional) Turn on Use Sets to add the nCloth components and the target surface you selected to a dynamic constraint selection set.
  5. Click Create Constraint or Apply.

    The nCloth components you selected are now constrained to the target surface you selected, and they are now connected to the nCloth’s Maya Nucleus solver through a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Slide on Surface constraint) and how it behaves. For example, you can create a Slide on Surface constraint with the following attribute settings:

    • Spring as the Constraint Method
    • Object to Object as the Constraint Relation
    • All to First as the Component Relation
    • Component Order as the Connection Method
    • Per Frame as the Connection Update
    • Turn on Local Collide properties

    See dynamicConstraintShape.

Creating a Weld Adjacent Borders constraint

You can create a Weld Adjacent Borders constraint to constrain nCloth border edges or vertices together in a non-springy manner. For example, you can use a Weld Adjacent Borders constraint to make separate nCloth meshes behave as if they are a single nCloth object. See also Weld Adjacent Borders constraint.

To create a Weld Adjacent Borders constraint

  1. Select the single nCloth object, two adjacent nCloth objects, or the border vertices on two adjacent nCloths that you want to constrain. You can select nCloth objects that have the same or different topologies, and the groups of vertices you select can vary in number.
    NoteThe nCloth objects or vertices that you want to constrain need to be either positioned close together in 3D space or located at the same XYZ positions in your scene. Otherwise the following may occur:
    • popping or jumping between the selected nCloths or vertices when the Weld Adjacent Borders constraint is created.
    • Weld Adjacent Borders constraint has no affect unless you increase the Max Distance value.
  2. Select nConstraint > Weld Adjacent Borders > .

    The Create Weld Adjacent Borders Constraint Options Box window appears.

  3. (Optional) Turn on Use Sets to add the selected nCloth’s border vertices to a dynamic constraint selection set.
  4. Click Create Constraint or Apply.

    If you selected a single nCloth object, its adjacent border edges are constrained using the Weld constraint method.

    If you selected two adjacent nCloth objects, the nearest border edges of the nCloths are constrained using the Weld constraint method. If the nCloths you selected do not have the same number of vertices at their borders, their points are constrained instead.

    If you selected vertices from two separate nCloths, the points are constrained using the Weld constraint method.

    The nCloth objects or border vertices you selected are also now connected to the nCloth’s Maya Nucleus solver through a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Weld constraint) and how it behaves. For example, you can create a Weld constraint with the following attribute settings:

    • Weld as the Constraint Method
    • Object to Object as the Constraint Relation
    • All to All as the Component Relation
    • Within Max Distance as the Connection Method
    • At Start as the Connection Update

    See dynamicConstraintShape.

Creating a Force Field constraint

You can create a Force Field constraint to push nCloth components or objects away from the center of the constraint, in a radial field with spherical volume bounds. For example, you can push out nCloth that gets stuck within the elbow joint of a character by placing a Force Field constraint on the joint. Conversely, you can use it to suck in or contain nCloth within the bounds of the constraint.

To create a Force Field constraint

  1. Select the nCloth or passive object you want to constrain.
  2. Select nConstraint > Force Field > .

    The Create Force Field Constraint Options Box window appears.

  3. (Optional) Turn on Use Sets to add the nCloth object to a dynamic constraint selection set.
  4. Click Create Constraint or Apply.

    The Force Field locator appears inside the mesh of the selected object, and the dynamicConstraint node appears in the Attribute Editor.

    The preset properties on the dynamicConstraint node determine the constraint's type (in this case, a Force Field constraint) and how it behaves. For example, you can create a Force Field constraint with the following attribute settings:

    • Spring as the Constraint Method
    • All to First as the Component Relation
    • Component Order as the Connection Method

    See dynamicConstraintShape.

  5. Adjust the location, size and rotation of the Force Field constraint using Maya’s Move, Scale, and Rotate tools.

    The location, size and rotation of the locator determines the size, shape and volume of the force field constraint.

  6. (Optional) Adjust the Force, Strength and Strength Dropoff attributes on the dynamicConstraint node to determine the power of the force field. Positive values cause the force field to push out, while negative values cause the force field to suck in nCloth.

Creating an Attract to Matching Mesh constraint

You can create an Attract to Matching Mesh constraint to attract the vertices of an nCloth object to the corresponding vertices of a mesh with matching topology. For example, use this constraint to create a specific end shape for a garment falling off of a character that must land in a specific shape, or orientation in the scene.

To create an Attract to Matching Mesh constraint

  1. Select the nCloth objects you want to constrain.
  2. Select nConstraint > Attract to Matching Mesh > .

    The Create Attract to Matching Mesh Constraint Options Box window appears.

  3. (Optional) Turn on Use Sets to add the nCloth object to a dynamic constraint selection set.
  4. Click Create Constraint or Apply.

    Constraint links between the nCloth object and the target nCloth mesh appear, and the dynamicConstraint node appears in the Attribute Editor.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, an Attract to Matching Mesh constraint) and how it behaves. For example, you can create a Attract to Matching Mesh constraint with the following attribute settings:

    • Spring as the Constraint Method
    • All to First as the Component Relation
    • Component Order as the Connection Method
    • At Start as the Connection Update

    See dynamicConstraintShape.

  5. (Optional) Adjust the Strength attribute on the dynamicConstraint node.

    The Strength attribute determines how closely your nCloth object resembles your target nCloth mesh.

Creating a Tearable Surface constraint

You can create a Tearable Surface constraint to make an nCloth object rip or shatter when it collides with passive objects or other nCloth objects. For example, you can use a Tearable Surface constraint to make a piece of nCloth silk tear when it catches on a pointy passive object.

  1. Select the nCloth object you want to rip, tear, or shatter.
  2. (Optional) If you want your nCloth to shatter rather than tear, set its Bend Resistance to a value greater than 0.2. See Bend Resistance.
  3. Select nConstraint > Tearable Surface > .

    The Create Tearable Surface Constraint Options Box window appears.

  4. (Optional) Turn on Use Sets to add the nCloth object to a dynamic constraint selection set.
  5. Click Create Constraint or Apply.

    The current nCloth is made tearable or shatterable by separating all of its faces, generating new edges and vertices, merging the nCloth’s vertices, softening the nCloth’s edges, and constraining the nCloth’s points (tear) or edges (shatter) together using the Weld constraint method. As a result, the topology of your nCloth’s output mesh will no longer match that of its input mesh.

    The nCloth object you selected is now also connected to a dynamicConstraint node.

    The preset properties on the dynamicConstraint node determine the constraint’s type (in this case, a Tearable Surface constraint) and how it behaves. For example, you can create a Tearable Surface constraint with the following attribute settings:

    • Weld as the Constraint Method
    • Object to Object as the Constraint Relation
    • All to All as the Component Relation
    • Within Max Distance as the Connection Method
    • At Start as the Connection Update

    See dynamicConstraintShape.

  6. To adjust how easily your nCloth tears or shatters, increase or decrease the Glue Strength of the Tearable Surface constraint. See Dynamic Constraint Attributes.
  7. (Optional) You can also direct where the tearing or shattering is to occur on your nCloth by painting a Glue Strength map.
    Note
    • If you want to add additional constraints to your tearable or shatterable nCloth, add them to its input mesh (nMeshShape).
    • If you want to paint any texture maps for your tearable or shatterable nCloth, paint them on its input mesh. Also, since making an nCloth tearable or shatterable changes its output mesh’s topology, do not use vertex maps with tearable or shatterable nCloth objects.

Creating a Disable Collisions constraint

You can create a Disable Collision constraint for nCloths, passive objects, or vertices to prevent them from colliding with all other nCloths, passive objects, or vertices. This constraint is useful when you want to improve the performance of your nCloth or you want to avoid collision geometry crossovers.

To create a Disable Collisions constraint

  1. Select the nCloth objects, passive objects, or vertices for which you want to disable collisions.
  2. Select nConstraint > Disable Collision.

    The nCloth objects, passive objects, or vertices you selected no longer collide with any other objects or components that share the same Maya Nucleus solver.

Creating an Exclude Collide Pairs constraint

You can create an Exclude Collide Pairs constraint for nCloths, passive objects, or vertices to prevent them from colliding with specific nCloths, passive objects, or vertices. This constraints is useful when you want to improve the performance of your nCloth or you want to avoid collision geometry crossovers.

To create an Exclude Collide Pairs constraint

  1. Select the pair of Nucleus objects or components for which you want to disable collisions. For example, you can select two nCloth objects, an nCloth and a passive object, or a group of vertices on an nCloth and another group of vertices on different nCloth or passive object.
  2. Select nConstraint > Exclude Collide Pairs.

    If you selected two nCloth objects, they no longer collide. If you selected an nCloth object and a passive object, they no longer collide. If you selected a group of vertices from one nCloth, and then another group of vertices from a different nCloth, then the vertices you selected no longer collide.

    See also nConstraint > Exclude Collide Pairs.

Editing nCloth constraint membership

You can add, remove, or replace the components that are used in your nCloth constraint by editing constraint membership. You cannot, however, add an object to an existing constraint by editing constraint membership.

To edit constraint membership, you can use the Replace Members, Add Members, and Remove Members options, or the nConstraint Membership Tool.

To see the members and links of a selected constraint

  1. In the Outliner, select the dynamicConstraint node of the constrained nCloth or passive object for which you want to edit dynamic constraint membership.
  2. Select nConstraint > Select Members.

    The component members and links of the selected constraint highlight in the scene view.

To edit nCloth constraint membership

  1. Using the component selection mode that is appropriate for the type of component you want to edit, select the constrained object’s components you want add, remove, or replace.

    For example, if you want to edit the membership of a Component to Component constraint that links vertices, you would use Vertex selection mode.

  2. If your constrained object has only one constaint , do one of the following:
    • If you want to add the selected components to the constraint, select nConstraint > Add Members.
    • If you want to removed the selected components from the constraint, select nConstraint > Remove Members.
    • If you want to replace all the current constraint members on the selected object with the selected components, select nConstraint > Replace Members.
      NoteIf a "Multiple constraints for selected items. Additionally select the constraint node to edit", message appears, it means that your object has more than one constraint. See step 3.
  3. If your constrained object has two or more constraints, you need to specify which contraint you want to edit. With your object's components still selected, do one of the following:
    • In the scene view, -click the constraint you want to edit.
    • In the Outliner, -click the select the dynamicConstraint node of the constraint you want to edit.

    You can now edit the selected constraint’s membership by selecting nConstraint > Add Members, nConstraint > Remove Members, or nConstraint > Replace Members.

To use the nConstraint Membership Tool to edit dynamic constraint membership

  1. In the Outliner, select the dynamicConstraint node of the constrained nCloth or passive object for which you want to edit dynamic constraint membership.
  2. In the Attribute Editor, select the tab for the specific dynamic constraint (dynamicConstraint) you want to edit the membership for and click Select.
  3. In the nDynamics menu set, select nConstraint > nConstraint Membership Tool.
  4. Do one of the following:
    • Select the constrained vertices with which you want to replace the current members of the selected dynamic constraint.
    • -click the vertices you want to add to the selected dynamic constraint.
    • -click the vertices you want to remove from the selected dynamic constraint.
  5. Press to complete the replace, add, or remove dynamic constraint members operation.

Paint constraint property maps

Note
  • Painted constraint weights have no effect on Transform constraints or nCloth to passive object constraints. This is because Weight on constraint links is like relative mass, and passive objects do not have a mass. Also, passive objects always fully push nCloth when constrained.
  • When you paint nCloth constraint properties, you are painting property values on the nConstraint node, not on the dynamicConstraintShape node.

To create nCloth constraint vertex maps

  1. Select the nCloth object you want to paint nCloth constraint vertex properties for.
  2. -select the constraint your want to paint vertex properties for, to include it in the paint operation.
  3. Select nConstraint > Paint properties by Vertex Map > [nCloth constraint property].

    The Paint nComponent Attribute Tool becomes the current tool, and its settings appear in the Tool Settings panel. This tool is a modified version of the Paint Attributes Tool. See Artisan Tool Settings.

  4. Set the Paint nComponent Attributes Tool settings as desired.
  5. Paint the vertex properties as desired:
    • Strength determines the power of the constraint links between the selected surface’s constraint members and other components within the selected dynamic constraint.
    • Glue Strength determines how resistant the selected surface’s constraint member links are from breaking.
    • Weight determines how much influence the selected surface’s constraint members have on the other components constrained to them. Since Weight is like mass for a constraint, components with a constraint weight of zero are pushed, but do not push back.

    The painted vertex properties are automatically saved to the selected nCloth’s vertices.

To create nCloth constraint texture maps

  1. Select the nCloth object for which you want to paint an nCloth constraint texture map.
  2. Select nConstraint > Paint properties by Texture Map > [nCloth constraint property].

    The 3D Paint Tool becomes the current tool, and its settings appear in the Tool Settings panel. This tool is a modified version of the 3D Paint Tool. See 3D Paint Tool.

  3. Set the 3D Paint Tool’s settings as desired.
  4. Paint the texture map properties as desired:
    • Strength determines the power of the constraint links between the selected surface’s constraint members and other components within the selected dynamic constraint.
    • Glue Strength determines how resistant the selected surface’s constraint member links are from breaking.
    • Weight determines how much influence the selected surface’s constraint members have on the other components constrained to them. Since Weight is like mass for a constraint, components with a constraint weight of zero are pushed, but do not push back.
  5. In the Tool Settings, click Save Textures in the File Textures section.

    The painted nCloth constraint texture map is saved as a file texture to the \maya\projects\default\3dPaintTextures directory by default.

To convert an nCloth constraint vertex map to a texture map

  1. Select the nCloth object that has the vertex constraint property values you would like to convert to a texture map.
  2. Select nConstraint > Convert Vertex to Texture Map > [nCloth constraint property].

    The selected constraint property’s values are saved to disk as a texture map (file texture) and the property’s values on the nCloth’s vertices are not removed.

To convert an nCloth constraint texture map to a vertex map

  1. Select the nCloth object that has the constraint property texture map you would like to convert to per-vertex property values.
  2. Select nConstraint > Convert Texture to Vertex Map > [nCloth constraint property].

    The selected constraint property’s texture map (file texture) is converted to per-vertex property values, those values are then stored on the selected nCloth’s vertices, and the texture map is not deleted from disk.