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
membrane node kMembrane kBase
kNamedObject
kDependencyNode
kMembrane

Related nodes

nCloth, nucleus

Attributes (51)

The following quick index only shows top-level attributes (too many attributes to show them all): bendAngleDropoff, bendAngleScale, bendResistance, collide, collideMesh, compressionResistance, drag, enable, friction, gravity, gravityDirection (3), inputMatrix, inputMesh, lift, outputMesh, pressure, pressureMethod, pushOut, pushOutRadius, restLengthScale, restShapeMesh, rigidity, selfCollide, selfCollideWidthScale, selfCollisionFlag, shearResistance, spaceScale, stepSize, steps, stretchResistance, subSteps, tangentialDrag, thickness, thicknessPerVertex, turbulence, turbulenceFrequency, turbulenceOffset (3), turbulencePerVertex, turbulenceTime, weightPerVertex, windDirection (3), windSpeed

Long name (short name) Type Default Flags
inputMesh (imsh) mesh NULL outputinputconnectablestorable
Input Geometry for membrane. This should be connected from the local/object-space version of the geometry. Valid inputs are polygons.
inputMatrix (ix) matrix NULL outputinputconnectablestorablehidden
Input transformation matrix for world space coords. Default NULL value translates to the identity matrix in normal circumstances.
collideMesh (cmsh) mesh NULL outputinputconnectablestorable
Input collision Geometry for membrane. Valid inputs are polygons.
restShapeMesh (rsmh) mesh NULL outputinputconnectablestorable
RestPosition Geometr(y/ies). This is the shape that the membrane tries to achieves. It may be animated over time, but should have the exact same topology as the inputMesh.
outputMesh (omsh) mesh NULL outputinputconnectable
The output mesh with the membrane deformation applied.
enable (enb) bool 1 outputinputconnectablestorablekeyable
Turning enable off allows one to disable the simulation such the output will be the same as the input mesh.
gravity (grty) float 9.8 outputinputconnectablestorablekeyable
Defines the gravity affecting this nucleus
gravityDirection (grdi) float3 outputinputconnectablestorablekeyable
Defines the gravity direction affecting this nBase system
gravityDirectionX (grdx) float 0.0 outputinputconnectablestorablekeyable
Defines the x component of the gravity direction.
gravityDirectionY (grdy) float -1.0 outputinputconnectablestorablekeyable
Defines the y component of the gravity direction.
gravityDirectionZ (grdz) float 0.0 outputinputconnectablestorablekeyable
Defines the z component of the gravity direction.
windSpeed (wisp) float 0.0 outputinputconnectablestorablekeyable
Defines the wind speed affecting this nBase system
windDirection (widi) float3 outputinputconnectablestorablekeyable
Defines the wind direction affecting this nBase system
windDirectionX (widx) float 1.0 outputinputconnectablestorablekeyable
Defines the x component of the wind direction.
windDirectionY (widy) float 0.0 outputinputconnectablestorablekeyable
Defines the y component of the wind direction.
windDirectionZ (widz) float 0.0 outputinputconnectablestorablekeyable
Defines the z component of the wind direction.
turbulence (trb) float 0.0 outputinputconnectablestorablekeyable
The intensity of a force simulating a turbulent wind that can evolves over time.
turbulenceTime (trt) float 0.0 outputinputconnectablestorablekeyable
Keyframe this attribute to simulate the turbulence flow changing over time.
turbulenceFrequency (tf) float 1.0 outputinputconnectablestorablekeyable
This controls how many repeats of the turbulence function fit inside the bounding volume of the volumeAxis force. Low values create a very smooth turbulence.
turbulenceOffset (to) float3 outputinputconnectablestorable
This can be used to translate the turbulence within the volume. Animating it can simulate blowing turbulent wind.
turbulenceOffsetX (tox) float 0.0 outputinputconnectablestorablekeyable
translation in X of turbulence function.
turbulenceOffsetY (toy) float 0.0 outputinputconnectablestorablekeyable
translation in Y of turbulence function.
turbulenceOffsetZ (toz) float 0.0 outputinputconnectablestorablekeyable
translation in Z of turbulence function.
lift (lft) float 0.0 outputinputconnectablestorablekeyable
Defines the lift from the air acting on the membrane
drag (drg) float 0.05 outputinputconnectablestorablekeyable
Defines the drag from the air acting on the membrane
tangentialDrag (tdrg) float 0.3 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.
steps (stps) integer 1 outputinputconnectablestorablekeyable
Number of base solve steps.
subSteps (sstp) integer 3 outputinputconnectablestorablekeyable
Number of subSteps for each solve step.
stepSize (stsz) float 1.0 outputinputconnectablestorablekeyable
This controls the size of a step, which in the dynamic version of the solver would be similar to the amount of time the simulation runs. The solve will get slower in linear proportion to this value.
spaceScale (spsc) float 1.0 outputinputconnectablestorablekeyable
This adjusts the scale of the forces acting on the object to compensate for the scale of the scene. The turbulence noise frequency and amplitude are also scaled by this. For the effect to the be the same if you scaled the object to a larger size make the space scale lower by the same factor.
thickness (thss) float 0.05 outputinputconnectablestorablekeyable
Defines the collision thickness of the input and collision meshes
friction (fron) float 0.1 outputinputconnectablestorablekeyable
Defines the collision friction
selfCollisionFlag (scfl) enum 2 outputinputconnectablestorablekeyable
Controls the type(s) of collisions that are processed.
restLengthScale (rlsc) float 1.0 outputinputconnectablestorablekeyable
This can control expansion and shrinking of the mesh
collide (cold) bool 1 outputinputconnectablestorablekeyable
Tell the solver if this object participates in collisions
selfCollide (scld) bool 0 outputinputconnectablestorablekeyable
Tell the solver if this object collides with its own geometry
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.
pushOut (pou) float 0.0 outputinputconnectablestorablekeyable
A force to push out to the nearest point on the collide object surface. This can be useful when dealing with objects that are in collision before deformation. At a force value of 1 it pushes objects completely out in one substep. Lower values will take more steps but may be smoother. The push amount takes into account the collide width values. Points further from the surface than the pushOutRadius value will be ignored. If the value of pushOut is positive then the push is towards the positive normal side of the surface. Negative values push to the opposite of the normal side of the surface.
pushOutRadius (por) float 2.0 outputinputconnectablestorablekeyable
This defines the max distance from the collide object surface that pushOut will affect. Beyond this distance the mesh will not be affected by the push out.
stretchResistance (stch) float 10.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.
bendResistance (bnd) float 0.0 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.
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.
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 mesh.
bendAngleScale (basc) float 1.0 outputinputconnectablestorablekeyable
Defines the amount by which the rest state of the bend angle is scaled.
rigidity (rity) float 0.0 outputinputconnectablestorablekeyable
Defines how inclined the mesh is to be a rigid body
pressure (pres) float 0.0 outputinputconnectablestorablekeyable
This defines a force applied along the surface normal direction.
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.
weightPerVertex (wepv) doubleArray empty outputinputconnectablestorable
This is the per vertex amount the membrane has an effect.
thicknessPerVertex (thpv) doubleArray empty outputinputconnectablestorable
This is a per vertex multiplier of the collision thickness.
turbulencePerVertex (tupv) doubleArray empty outputinputconnectablestorable
This is a per vertex multiplier of the turbulence.