Your Ad Here

nCloth collisions

Collisions are the interactions that occur between nCloth objects and other objects (nCloths or passive objects) in your scene, or between an nCloth and itself (called a Self Collision). When objects collide or self-collide, there is an exchange or transformation of energy that affects how the cloth 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 nCloth properties affect the quality of your nCloth collisions. For example, on the nClothShape node, Thickness determines the distance between an nCloth and its collision volume. On the nucleus node, Max Collision Iterations determines the maximum number of times per substep the Maya Nucleus solver will try to resolve your nCloth and passive object collisions. The Push Out, Trapped Check, and Crossover Push nClothShape attributes also try to improve 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 you want it to interact with. Passive objects can interact with nCloth, 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 collisions to take place between a passive object and an nCloth object, the Collide attribute must be turned on in the surface 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 Quality Settings 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 nConstraints > Disable Collision and nConstraints > 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.

Self Collisions

Self collisions are necessary for animated nCloth to simulate the interactions of cloth when it comes into contact with itself. For example, when a 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 self collisions to take place, the Self Collide attribute must be turned on in the Surface Properties section of the nClothShape 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 Quality Settings section of the nClothShape tab. You can also increase and decrease the quality of your nCloth’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 nCloth collisions. The greater the number of iterations, the more accurate your nCloth collisions and the slower your simulation. You can clamp the number of iterations the Maya Nucleus solver can perform for nCloth collisions and self collisions by setting the Max Collision Iterations attribute on the nucleus node or the Max Self Collide attribute on the nClothShape node.

You can also improve the accuracy of your nCloth collisions by increasing the number of substeps the Maya Nucleus solver is using. Substeps determine the number of times the Maya Nucleus solves your nCloth, and thus calculates your nCloth’s collisions, per frame. 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.

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 Attribute Editor tab, you can specify in which collision layer an nCloth resides. nCloth objects on the same collision layer collide normally. However, when nCloth objects are on different layers, the nCloths on lower value layers will have priority over nCloths on higher value layers. So 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.

You can set the Collision Layer Range to specify how close two nCloth 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 nCloth collision layers, see To set collision layers.

Note
Passive objects in collision layers only collide with nCloth objects that are in the same collision layer, or in layers of higher value.

 

Return to Autodesk Index


Your Ad Here