Create and Edit nParticle Constraints

 
 
 

You can select an nParticle object and apply constraints to initial state particles and particles emitted into the scene after initial state.

See Constraining Nucleus objects.

Creating an nParticle Transform Constraint

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

To create an nParticle Transform constraint

  1. In the scene view, select the nParticle object you want to constrain.

    If you select the nParticle object, all of the nParticle object’s particles will be Transform constrained. To constrain selected nParticles, use the Component menu.

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

    The Create Transform Constraint Options Box appears.

  3. Click Create Constraint or Apply.

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

    The nParticle object you selected are also now connected to the object’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.

  4. (Optional) Parent, animate, or constrain the Transform constraint locator to another object for additional control over your nParticle object’s movements. For example, you can animate the Transform constraint locator of a Transform-constrained nParticle cloud to direct its movements as it drifts through the air.

Creating an nParticle Component to Component constraint

You can create a Component to Component constraint to attach nParticle objects to other nParticle objects or to nCloth or passive object components. For example, you can constrain nParticles to the vertices of a character’s nCloth shirt, so that the nParticles cling to the shirt as it moves with the character.

To create an nParticle Component to Component constraint

  1. In the scene view, select the nParticle object you want to constrain.
  2. Select the target nParticle object or the target components (vertices, edges, or faces) on the nCloth object, passive object, or non-nCloth object to which you want to constrain the nParticle object. If you select edges or faces, all their vertices will be constrained.
  3. Note

    If you select target components on a non-nCloth object, that object will be made a passive object when the constraint is created.

  4. In the nDynamics menu set, select nConstraint > Component to Component> .

    The Create Component to Component Constraint Options Box appears.

  5. (Optional) Turn on Use Sets to add the target object’s components you selected to a dynamic constraint selection set.
  6. Click Create Constraint or Apply.

    The nParticle object is now constrained to the other target nParticle object or to the target vertices of the nCloth or passive objects you selected, and they are now connected to the nParticle object’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 nParticle Point to Surface constraint

You can create a Point to Surface constraint to attach an nParticle object to a target surface (an nCloth surface or a passive collision object). For example, you can use a Point to Surface constraint to hold water nParticles on the surface of an nCloth umbrella.

To create an nParticle Point to Surface constraint

  1. In the scene view, select the nParticle object you want to constrain.
  2. -select the target surface to which you want to constrain the nParticle object.

    The target surface can be an nCloth or passive object that is part of the same Nucleus system as the nParticle object, or it can be a non-Nucleus object. You cannot use other nParticle objects as target surfaces for a Point to Surface constraint.

    Note

    If you select a target surface that is a non-Nucleus 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 appears.

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

    The nParticle object is now constrained to the target surface you selected, and both they are connected to the nParticle object’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.

    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 nParticle Slide on Surface constraint

You can create a Slide on Surface constraint to attach an nParticle object to a target surface (an nCloth surface, or a passive collision object), and allow the constrained nParticles 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 a liquid nParticle object to the outside of a passive object bucket, so that the particles drip down the edges of bucket.

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

To create an nParticle Slide on Surface constraint

  1. In the scene view, select the nParticle object you want to constrain.
  2. -select the target surface to which you want to constrain the nParticle object.

    The target surface can be an nCloth or passive collision object that is part of the same Nucleus system as the nParticle object, or a non-Nucleus object. You cannot use other nParticle objects as target surfaces for a Point to Surface constraint.

    Note

    If you select a target surface that is a non-Nucleus 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 appears.

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

    The nParticle object is now constrained to the target surface, and both are connected to the nParticle object’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 Force Field Constraint

You can create a Force Field constraint to push nParticle objects away from the center of the constraint in a radial field with spherical volume bounds.

Note

Force Field constraints are not related to the force fields generated by Nucleus objects.

To create a Force Field constraint

  1. Select the nParticle object you want to constrain.
  2. In the nDynamics menu set, select nConstraint > Force Field> .

    The Create Force Field Constraint Options Box appears.

  3. Click Create Constraint or Apply.

    The Force Field locator appears at the center of the selected nParticle 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.

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

    The location, size and rotation of the locator determines the size, shape, and volume of the Force Field constraint.

  5. (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 or repel, while negative values cause the force field to attract nParticles.

Creating a Disable Collision constraint

You can create a Disable Collision constraint for an nParticle object to prevent it from colliding with all other Nucleus objects, or Nucleus object vertices.

To create a Disable Collision constraint

  1. Select the nParticle objects for which you want to disable collisions.
  2. Select nConstraint > Disable Collision.

    The nParticle objects 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 nParticle objects to prevent them from colliding with specific nParticle, nCloth, passive objects, or Nucleus object vertices.

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 nParticle objects, an nParticle object and an nCloth or a passive object, or an nParticle object and a group of vertices on an nCloth or passive object.

  2. Select nConstraint > Exclude Collide Pairs.

    If you select two nParticle objects, they no longer collide. If you selected an nParticle object and an nCloth or passive object, they no longer collide. If you selected an nParticle object and a group of vertices from an nCloth or passive object, the vertices you selected no longer collide.

To edit nParticle constraint membership

  1. Select the constraint whose membership you would like to edit.
  2. Select nConstraint > Select Members.

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

  3. Select the object whose constraint membership you want to edit.
  4. Switch to a component selection mode appropriate for the type of component you want to add, remove, or replace for your constraint.

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

  5. Select the components whose membership you want to edit.
  6. Do one of the following:

To use the nConstraint Membership Tool to edit dynamic constraint membership

  1. Select the constrained nParticle, 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) whose membership you want to edit, and then click Select.
  3. In the nDynamics menu set, select nConstraint > nConstraint Membership Tool.
  4. Do one of the following:
    • Select the constrained object or vertices you want to replace the current members of the selected dynamic constraint.
    • -click the object or vertices you want to add to the selected dynamic constraint.
    • -click the object or vertices you want to remove from the selected dynamic constraint.
  5. Press to complete the replace, add, or remove dynamic constraint members operation.