nDynamic Collisions
 
 
 

Collisions are the interactions that occur between Nucleus objects (nCloth, nParticle, or passive objects) in your scene. nCloth and nParticle objects can also collide with themselves, which are called self collisions. When Nucleus objects collide or self-collide, there is an exchange or transformation of energy that affects how the object behaves. For example, if a moving passive object ball impacted an nCloth pillow, the force and impact of the ball would cause deformations in the pillow.

Certain Nucleus object properties affect the strength and quality of your nDynamic collisions. For example, Collide Strength lets you adjust the amount of force generated by colliding Nucleus objects as well as exclude selected vertices of nCloth and passive collision objects from colliding. On the nClothShape node, Thickness determines the distance between an nCloth and its collision volume. On the nParticleShape node, Self Collide Width Scale determines the collision distance between particles that are emitted from the same nParticle object. On the nucleus node, Max Collision Iterations determines the maximum number of times per simulation step the Maya Nucleus solver will try to resolve your Nucleus object collisions. The Push Out, Trapped Check, and Crossover Push nClothShape attributes also try to improve nCloth collisions by resolving interpenetration.

Related topics

Collisions with passive objects

You can create a passive object from any polygon mesh in your scene, and assign it to the same Maya Nucleus solver as the nCloth and nParticle you want it to interact with. Passive objects can interact with other Nucleus objects, but internal Maya Nucleus solver properties and external forces have no effect on them. When you create a passive object, a passive object handle appears on the mesh in the scene view, and the nRigidShape tab appears in the Attribute Editor. You can use the passive object handle to quickly select a passive object’s nRigidShape node, which then becomes the current tab selection in the Attribute Editor.

Passive objects can help you create the realistic behavior of cloth objects coming into contact with non-cloth objects. For example, if you have a character wearing an nCloth shirt, you can make the character’s body a passive object. Then during animation, when the character bends its arm at the elbow, the nCloth would behave as though it has come into contact with the character’s arm. For nParticles, passive objects provide a surface that deflect emitted particles, such as scattering sparks or splashing liquids. Modeled passive objects with concave regions can be filled with a volume of nParticles.

For collisions to take place between a passive object and other Nucleus objects, the Collide attribute must be turned on in the Collisions properties of their respective nodes. In addition, you can set which of your nCloth and passive object’s components (Vertex, Edge, or Face) collide with the Collision Flag drop-down list in the Collisions sections of their respective nodes.

For additional control over your passive object collisions, you can include and exclude components from collisions with the Disable Collision or Exclude Collision Pairs constraints. See nConstraint > Disable Collision and nConstraint > Exclude Collide Pairs. You can also resolve passive object interpenetration with the Push Out, Trapped Check, and Crossover Push nClothShape or nRigidShape attributes.

For more information on collision creation, see Create and edit nCloth collisions and Set nParticle collision properties.

Collisions between nCloth and nParticles

You can create collisions and interactions between nCloth and nParticle objects if the objects are assigned to the same Maya Nucleus solver. Nucleus objects assigned to the same solver are affected by the solver properties in similar ways. For example, wind forces generated by the solver will cause the nCloth and nParticle objects to be animated in same direction as the wind force. However, depending on the object's individual attributes, such as Mass and Lift, these objects will react differently, and therefore, affects how nCloth and nParticle objects collide with each other.

For collisions to take place between nParticle and nCloth objects, the Collide attribute must be turned on for their respective nodes. In addition, for nCloth, you can set which of your nCloth object's components (Vertex, Edge, or Face) collide with the nParticles by setting the Collision Flag drop-down list in the Collisions section.

By default all nParticle, nCloth and passive collision objects that belong to the same Nucleus solver collide with each other. If you do not want all the Nucleus objects in your scene to collide, you can assign them to different Nucleus solvers before or after you create the object. You can also use the Disable Collision or Exclude Collision Pairs to keep Nucleus objects from colliding with each other. See Disable Collision and Exclude Collision Pairs constraints.

Self Collisions

For nCloth, self collisions occur between the nCloth objects’s components, such as its vertices or faces. Self collisions are necessary for animated nCloth to simulate the interactions of cloth when it comes into contact with itself. For example, when an nCloth curtain panel is being pushed open along a curtain rod, it begins to sway and pleat against itself, causing the cloth to deform. You can also imagine how a flag might fold in on itself when the wind dies down, or how the full skirt on a dancer collides when the dancer changes direction.

For nParticles, self collisions occur between the individual particles that belong to same nParticle object. Like collisions between nParticles and other Nucleus objects, self collisions involve an exchange or transfer of energy. nParticle self collisions can be used to approximate interactions between rigid objects. For example you can instance geometry with nParticles and have the geometry collided with each other.

For self collisions to take place, the Self Collide attribute must be turned on in the Collisions section of the nClothShape or nParticle Attribute Editor tab. In addition, you can set which of your nCloth’s components (Vertex, VertexEdge, VertexFace, Full Surface) participate in its self collisions with the Self Collision Flag drop-down list in the Collisions section of the nClothShape tab. You can also increase and decrease the quality of your nCloth and nParticle object’s self collisions with the Max Self Collide Iterations and Self Collide Width Scale attributes.

Collisions and the nucleus node

The Maya Nucleus solver goes through a number of iterations to work out the proper behavior of your Nucleus object collisions. The greater the number of iterations, the more accurate your object collisions and the slower your simulation. You can clamp the number of iterations the Maya Nucleus solver can perform for Nucleus object collisions and self collisions by setting the Max Collision Iterations attribute on the nucleus node or the Max Self Collide attribute on the nClothShape and nParticleShape nodes.

You can also improve the accuracy of your Nucleus object collisions by increasing the number of substeps the Maya Nucleus solver is using. Substeps determine the number of times the Maya Nucleus solves your simulation, and thus calculates your object’s collisions, per frame. Adjusting Substeps allows you to control how the simulation time is broken up into calculation segments. Multiple solver iterations can occur per substep, per frame. Substeps are most useful with fast-moving objects with quick collisions, which might be missed if only calculated once per frame. You can set the number of substeps that your Maya Nucleus solver is using with the Substeps attribute in the Solver Attributes section of the nucleus Attribute Editor tab.

For more information on these attributes, see Solver Attributes and Quality Settings.

Collide Strength

You can use the Collide Strength attribute to specify the amount of force generated when Nucleus objects collide with each other. Collide Strength lets you to control whether nCloth, nParticle, and passive objects fully or partially collide with each other. At the default value of 1, the objects fully collide, values between 0 and 1 dampen the full collision. A Collide Strength value of 0 has the same effect as disabling the object's collisions.

Using the Paint nCloth Attributes Tool, you can paint Collide Strength values on nCloth and passive collision objects on a per-vertex basis. Painting Collide Strength values lets you disable or dampen the force of collisions for selected vertices without needing to create Disable Collision constraints.

NoteWhen you paint areas of nCloth that you don't want to collide (Collide Strength: 0), select either the Solid brush , or the Square brush for painting. This ensures that the painted areas are totally black, meaning painted with a Collide Strength value of 0. Using the Gaussian brush or Soft brush does not paint the surface totally black. Areas that are not totally black have a Collide Strength value greater than 0 and will still collide.

See Collide Strength.

nParticles includes a Collide Strength Scale ramp that lets you map Collide Strength on a per-particle basis. Using the internal per-particle ramp, you can map Collide Strength to properties such as Radius, Mass, or Age. This lets you create effects where the strength of nParticle collisions is based on the individual nParticle's size, mass, or age. See Collide Strength Scale and nParticle internal ramps and per-particle attributes.

Collision layers

You can use collision layers to organize collisions between multiple objects that share the same Maya Nucleus solver. With the Collision Layer attribute in the nClothShape and nParticleShape Attribute Editor tab, you can specify in which collision layer an nCloth or nParticle object resides. nCloth and nParticle objects on the same collision layer collide normally. However, when Nucleus objects are on different layers, the objects on lower value layers will have priority over objects on higher value layers.

For example, an nCloth object on collision layer 0.0 will push an nCloth object on collision layer 1.0, which in turn will push the nCloth object on collision layer 2.0. This collision priority occurs in the range set by the Collision Layer Range attribute in the nucleus Attribute Editor tab.6

You can set the Collision Layer Range to specify how close two Nucleus objects must be in order for them to collide. If the differential between the Collision Layer values for the two objects is less than the Collision Layer Range, the objects can collide. For example, if object A has a Collision Layer value of 2 and object B has a Collision Layer value of 5, then the differential between their Collision Layer values is 3. Therefore, they can only collide when the Collision Layer Range value is less than 3.

For more information on using collision layers, see Setting collision layers.

NoteNucleus objects only collide with other Nucleus objects that are in the same collision layer, or in layers of higher value.