Go to: Related nodes. Attributes.

The nCloth node applys dynamic motion to a deformable mesh. This can be used to simulate cloth behavior, as well as other deformable dynamic shapes, such as metal.

Node name Parents MFn type Compatible function sets
nCloth nBase kNCloth kBase
kNamedObject
kDependencyNode
kDagNode
kShape
kParticle
kNBase
kNCloth

Related nodes

field, spring, nBase, nRigid

Attributes (69)

Attribute quick index omitted (too many attributes to show them all).

Long name (short name) Type Default Flags
outputMesh (omsh) Generic n/a outputinputconnectable
Output Geometry for soft body.
restShapeMesh (rsmh) Generic n/a outputinputconnectablestorable
RestPosition Geometr(y/ies). This is the shape that the cloth tries to achieves. It may be animated over time, but should have the exact same topology as the inputMesh.
numSubdivisions (nsub) integer 2 outputinputconnectablestorable
Number of subdivisions for each input/output mesh pairing.
scalingRelation (srl) enum 0 outputinputconnectablestorable
This defines the way dynamic attributes such as bend, stretch and tension are defined relative to object scale and cv density. If Link is specified then stretch and bend are fixed values applied at each link. Thus if a mesh has more cvs it will appear to be more stretchy and bendable, even thought the amount of stretch and bend is the same on a per link basis. With Object Space the mesh will bend and stretch the same amount regardless of the resolution of the mesh. Note that this can result in significantly greater compute times for the high resolution mesh, as the individual links need to be stiffer, which requires more calculation( on top of having more links to compute ). World Space is similar to ObjectSpace, except that the stiffness of the mesh is now fixed in worldspace. Thus scaling a mesh up will make it appear to be a larger sheet made of the same material, which appears proportionately less stiff. For example a small piece of paper may bend little under gravity, but a large sheet would flop.
stretchResistance (stch) float 20.0 outputinputconnectablestorablekeyable
Defines the amount that the material will resist stretching when under tension. Large values generally require more computation, so they may result in longer simulation times. Note that the scalingRelation attribute affects how this value is defined. Also one may need to additionally make the both collision iterations on the solver and constraint strength values high to keep stretching low.
compressionResistance (comr) float 10.0 outputinputconnectablestorablekeyable
Defines the amount that the material will resist compression. Note that sometimes it is useful to have this value be lower than the Stretch Resistance, because the mesh resolution is only an approximation to a true surface, which could possibly fold within the length of a triangle. If one has a rest position for a cloth that is not flat and the compression and stretch resistance are both high then this can make cloth appear too stiff because the topology locks up. This problem is most noticable when the faces have relatively high angles relative to each other. Having a low compression resistance allows the material keep from locking up, yet still not appear to stretchy. Large values generally require more computation, so they may result in longer simulation times. Note that the scalingRelation attribute affects how this value is defined. Also stretch mapping scales both compression and stretch.
stretchMap (stmp) float 1.0 outputinputconnectablestorable
Stretch map for cloth/object
stretchPerVertex (spv) doubleArray empty outputinputconnectablestorable
Per-vertex stretch for cloth/object
bendSolver (bnsl) enum 1 outputinputconnectablestorable
This controls the solver method used when computing bend. The simple method has no history and defines the current bend angle each step based on the relative positions of points. This simple technique can have problems when the surface bends more than 180 degrees. This can happen during substeps even if the surface is self colliding and when it does the simple method will try to bend the surface the wrong way, which can lead to jittery motion and poor self collisions. The Flip Tracking method keeps a history of when the bend flip over 180 degrees to deal with this problem. With flip tracking one could have a surface can bend around its self several times like a spring and then unwind. However this can still have problems where the geometry looks unwound yet still the solver thinks it is wound up, which results in kinks in the surface, particularily after low quality collisions. Note that flip tracking was the default method used in versions prior to Maya2011. The high quality method is similar to flip tracking, however it only keeps a history of the flip during substeps. At the end of each simulation step it assumes that there is no flipping and that collisions have been properly resolved. This has the better quality of the Flip Tracking method without the kinking problem.
bendResistance (bnd) float 0.1 outputinputconnectablestorablekeyable
Defines the amount that the material will resist bending when under strain. Large values generally require more computation, so they may result in longer simulation times. Note that the scalingRelation attribute affects how this value is defined.
bendMap (bemp) float 0.0 outputinputconnectablestorable
Bend map for cloth/object
bendPerVertex (bdpv) doubleArray empty outputinputconnectablestorable
Per-vertex bend for cloth/object
bendAngleDropoff (bnad) float 0.0 outputinputconnectablestorablekeyable
Defines the way bend resistance changes with the angle. At higher values the bend will resist more at high angles then when the surface is nearly flat.
restitutionTension (retn) float 1000.0 outputinputconnectablestorablekeyable
How far can the links be stretched before they fail to go back to their rest length when there are no forces acting on the cloth. When the tension is greater than the defined value the defined rest length will increase until the tension is equal this value. For very low values the material will pull apart like taffy, yet still resist stretching under mild forces.
restitutionAngle (reae) angle (float) 360.0deg outputinputconnectablestorablekeyable
Defines how far we can bend across an edge before it will fail to go back to the rest angle when there are no forces acting on the cloth.
shearResistance (shr) float 0.0 outputinputconnectablestorablekeyable
Defines the shear resistance for each input/output mesh. Shear can be thought of as the bend in the plane of the cloth.
rigidity (rity) float 0.0 outputinputconnectablestorablekeyable
Defines how inclined the mesh is to be a rigid body
rigidityMap (rimp) float 0.0 outputinputconnectablestorable
Rigidity map for cloth/object
rigidityPerVertex (rpv) doubleArray empty outputinputconnectablestorable
Per-vertex rigidity for cloth/object
deformResistance (dety) float 0.0 outputinputconnectablestorablekeyable
Controls how much a mesh is attracted to its current state.
deformMap (demp) float 0.0 outputinputconnectablestorable
Deformability map for cloth/object
deformPerVertex (dfpv) doubleArray empty outputinputconnectablestorable
Per-vertex deformability for cloth/object
inputMeshAttract (imat) float 0.0 outputinputconnectablestorablekeyable
Defines how attacted the cloth is to the current position of the input mesh.
inputAttractMap (iamp) float 0.0 outputinputconnectablestorable
Input Mesh Attract map for cloth/object
inputAttractPerVertex (iapv) doubleArray empty outputinputconnectablestorable
Per-vertex input mesh attract for cloth/object
inputAttractDamp (iadm) float 0.5 outputinputconnectablestorablekeyable
Defines how springy the effect of Input Mesh Attract is. At a value of zero input mesh attract will behave like a spring connection from the input mesh to the output dynamic mesh. The cloth will tend to wiggle about the input mesh position. As the Input Attract Damp is increased to 1 the cloth mesh will still move to the input mesh position but not have the momentum to travel past it, so will no longer occillate about the input position.
restLengthScaleMap (rlmp) float 1.0 outputinputconnectablestorable
Rest Length Scale map for cloth/object
restLengthScalePerVertex (rlpv) doubleArray empty outputinputconnectablestorable
Per-vertex rest length scale for cloth/object
wrinkleMap (wkmp) float 0.0 outputinputconnectablestorable
displacement style mapping that affects rest shape
wrinklePerVertex (wpv) doubleArray empty outputinputconnectablestorable
Per-vertex wrinkle for cloth/object
wrinkleMapScale (wms) float 1.0 outputinputconnectablestorablekeyable
Defines the amount of wrinkle map displacement. Negative values push wrinkles in instead of out. The value may need to be large if the scene scale is large.
bendAngleScale (basc) float 1.0 outputinputconnectablestorablekeyable
Defines the amount by which the rest state of the bend angle is scaled.
sortLinks (stlk) bool 0 outputinputconnectablestorablekeyable
Turn on sorting of links. With a sequential evaluation order this bases the link order on distance to colliding and constrainted points, which can help reduce stretching without requiring high stretchResistance values.
evaluationOrder (evo) enum 0 outputinputconnectablestorable
This determines whether links are evaluated in a cumulative or an order independant fashion. The sequential mode has a bias based on the order the links are processed. By default this order will be the edge order on the input mesh. The sequential evaluation converges on a solution much faster than the parallel form, which means that it requires less computation to make cloth non-stretchy, or rigid. If one uses the parallel method then bend and stretch resistance values will need to be proportionately higher and simulation times will generally be longer. However there will be less bias in the stretching. Also the parallel method may multithread better, somewhat offsetting the computational overhead. The sequential method can be improved in some cases by using the sortLinks attribute, which changes the evaluation order to process links near colliding points and constraints first. This can result in lower required stretch values.
addCrossLinks (aclk) bool true outputinputconnectablestorablekeyable
For faces with more than 3 vertices this will create additional stretch and bends links such that each vertex is connected to each other vertex. If this is off then the links will exactly match the meshes list of edges. For a quad meshes having addCrossLinks off would allow the cloth to shear, unless the shear resistance attribute was used.
stretchDamp (sdmp) float 0.1 outputinputconnectablestorablekeyable
Defines how much the velocity due to stretch along the internal connections will be damped. Increasing this value will allow the cloth to stretch without bouncing.
minimalStretch (msso) bool 0 outputinputconnectablekeyablehidden
Use the new stretch solve to compute the stretch in one go
minimalBend (mbso) bool 0 outputinputconnectablekeyablehidden
Use the new stretch solve to compute the stretch in one go
minimalShear (mshs) bool 0 outputinputconnectablekeyablehidden
Use the new stretch solve to compute the stretch in one go
stretchHierarchyLevels (shlv) integer 0 outputinputconnectablehidden
Number of levels for hierarchical stretch solve
stretchHierarchyPercent (shpe) float 25.0 outputinputconnectablehidden
How much we reduce for each level of the hierarchical stretch solve
selfCollideWidthScale (scws) float 1.0 outputinputconnectablestorablekeyable
Allows the thickness of each input/output mesh to be scaled for self collision. This value is defined relative to the CollisionWidth, so if SelfCollideWidthScale is 1.0 then the width for self collision will be the same as the collision width. If it is 2.0 then it will be twice the collision width. It can often be useful to the make the self collision width greater than that for collision with other objects, especially when using vertex self collisions.
selfCollisionSoftness (scsf) float 0.0 outputinputconnectablestorablekeyablehidden
obsolete
selfCrossoverPush (scpu) float 0.0 outputinputconnectablestorablekeyable
This is a force applied along the contour where this object crosses its self. Because it only works at the point of crossover it may take several steps for the surface to pop out into a good state. If self collisions are enabled then one may wish to combine this with the selfTrappedCheck toggle because that will disable collisions for crossed over faces. It can also be used to clean up interpenetration at the start frame, although the collisions should be disabled when doing so. Lower values will take longer to resolve the self collision, but can create smoother results.
selfTrappedCheck (stpc) bool 0 outputinputconnectablestorablekeyable
This does a surface normal based pushout of objects colliding with this one. Trapped check works on faces that are still interpenetrating after the main collision computation. It assumes that the collisions will be on the positive normal side (or outside) of the surface. It is especially useful in cases where cloth can get caught between passive objects that interpenetrate (for example an elbow passing through a chest). Rather than get stuck on the wrong side this allows the cloth to push back to the correct side when the passive objects later separate. In this case one would enable trapped check on the elbow and chest, but not the cloth. If the colliding object was inside this one, then trapped check should only be enabled if the surface normals are also set to point inward.
pressureMethod (pmth) enum 0 outputinputconnectablestorable
The manual setting defines pressure as a simple user input value that can be keyframed. The volume tracking model computes the pressure based on the current volume of the cloth combined with inflow and outflow of air. Note that higher iterations on the air model will result in more incompressibility of the internal air.
pressure (pres) float 0.0 outputinputconnectablestorablekeyable
This defines a force applied along the surface normal direction when the Pressure Method is set to Manual.
startPressure (stpe) float 0.0 outputinputconnectablestorablekeyable
With the volume tracking pressure method this defines the relative air pressure inside the object at the startframe.
incompressibility (incm) float 5.0 outputinputconnectablestorablekeyable
When the volume tracking pressure model is used this defines how incompressible the internal volume of fluid is. This also will affect how much force is applied to the cloth when air is pumped in. In the case of a balloon higher values of incompressibility will overcome higher stretch resistance. Note that higher incompressibility may require more calculation time.
pressureDamping (prdg) float 0.0 outputinputconnectablestorablekeyable
Defines the air pressure damping
pumpRate (pure) float 0.0 outputinputconnectablestorablekeyable
Defines the rate at which air pressure is added to the object
airTightness (aits) float 1.0 outputinputconnectablestorablekeyable
Defines the rate at which air can escape from the object, or how permiable the surface is. This is in addition to any physical holes in the model, which can be be capped or not using the seal holes attributes.
sealHoles (shol) bool true outputinputconnectablestorablekeyable
When the volume tracking pressure method is used this determines if physical holes in the cloth model are treated as being capped or not. If holes are not sealed, then air can escape out them, which also has the effect of pushing the cloth. For example, this can simulate a rubber balloon that is suddenly released. It also allows for inflow based on motion of the cloth. The opening in a parachute will allow air to flow in as it falls down, causing sideways pressure that inflates it. Note that drag alone cannot achieve this sort of effect.
ignoreSolverGravity (igsg) bool 0 outputinputconnectablestorablekeyable
Turn off the effect of the gravity that is defined on the solver node.
ignoreSolverWind (igsw) bool 0 outputinputconnectablestorablekeyable
Turn off the effect of the wind that is defined on the solver node.
windSelfShadow (wssh) bool 0 outputinputconnectablestorablekeyable
Allow the object to shadow parts of itself from the wind.
lift (lft) float 0.05 outputinputconnectablestorablekeyable
Defines the lift affecting this nBase system
drag (drg) float 0.05 outputinputconnectablestorablekeyable
Defines the drag affecting this nBase system
tangentialDrag (tdrg) float 0.0 outputinputconnectablestorablekeyable
Defines the component of drag tangent to the surface. With a value of zero a flat plane will slice through air with no resistance and only have drag when moving along its normal axis. With a value of 1.0 the effect of drag will be equal in all directions.
solverDisplay (svds) enum 0 outputinputconnectablestorable
Interactive display of internal solver info.
stretchMapType (smt) enum 2 outputinputconnectablestorable
What type of stretch map to use: per-vertex, texture or none.
bendMapType (bdmt) enum 2 outputinputconnectablestorable
What type of bend map to use: per-vertex, texture or none.
rigidityMapType (rmt) enum 2 outputinputconnectablestorable
What type of rigidity map to use: per-vertex, texture or none.
deformMapType (dmmt) enum 2 outputinputconnectablestorable
What type of deform map to use: per-vertex, texture or none.
inputAttractMapType (iamt) enum 2 outputinputconnectablestorable
What type of inputAttract map to use: per-vertex, texture or none.
restLengthScaleMapType (rlmt) enum 2 outputinputconnectablestorable
What type of inputAttract map to use: per-vertex, texture or none.
wrinkleMapType (wmt) enum 2 outputinputconnectablestorable
What type of wrinkle map to use: per-vertex, texture or none.
cacheableAttributes (caat) enum 0 outputinputconnectablestorable
This specifies which dynamic attributes will be included the cache file when this node is cached.
cacheUsage (cu) enum 0 outputinputconnectablestorable
Controls the output of cache diagnostics