Cloth Object
dynamics node
Creates a Cloth Object from SOP Geometry.
See also: Cloth Configure Object, Cloth Physical Parameters, Cloth Material, Cloth Solver
The Cloth Object DOP creates a Cloth Object inside the DOP simulation. It creates a new object and attaches the subdata required for it to be a properly conforming Cloth Object.
Using Cloth Object
-
Select the object to make into a cloth object.
-
Click the
Cloth Object tool from the Cloth tab.
Elastic and Plastic Deformation
Cloth’s movement is governed by internal forces. These forces are derived from stretch, shear and bend energies:
|
Stretch |
The stretch energy depends on the deviation of a cloth edge’s length from the rest length; The higher the stretchstiffness parameter is set for a cloth object, the stronger the internal force resulting from stretch energies will be. |
|
Shear |
The shear energy depends on the deformation of a cloth polygon compared to its rest state. The higher the shearstiffness parameter, the stronger are the forces that try to restore the cloth polygons to their original shapes. |
|
Bend |
The farther the angle between adjacent polygons at an edge deviates from the rest angle, the stronger are the forces that try to move the cloth back towards the orignal bend angle. |
The stiffness parameters (stretchstiffness, shearstiffness, and bendstiffness) control the strengths of the forces that counteract cloth deformations. The stretch stiffness determines the magnitude of the forces that aim to restore the cloth’s edges to their rest lengths. The shearstiffness determines how strongly the cloth will counteract changes in the shape of the cloth polygons. The bendstiffness controls the strength of the internal forces that try to bend the cloth back to its rest angles. The corresponding damping parameters (stretchdamping, sheardamping, and benddamping) control how fast these forces will reduce in magnitude, bringing the cloth to a stable state.
Stiffness and damping parameters can be used to control the elastic behavior of cloth. If only these parameters are specified, then the rest state of the cloth will remain the same over time, and the cloth’s internal forces will be based on the deviations of stretch, shear, and bend from their corresponding rest states.
Along with elastic deformation, it is also possible to simulate plastic deformation of cloth. Plastic deformations allow permanent changes to the cloth shape. Plastic deformation is controlled by the elastic limit parameters (stretchelasticlimit, shearelasticlimit, and bendelasticlimit), and the plastic hardening parameters (stretchplastic, shearelasticlimit, and bendelasticlimit). For example, if a cloth edge is stretched more than a fraction of stretchelasticlimit of its original length, then the rest state for the edge will be changed, and the cloth won’t try to regain its original rest state for that edge. The plastic hardening parameters control how the stiffness and damping coefficients for stretch, shear, and bend forces will be affected by plastic deformation. A plastic hardening between 0 and 1 will weaken the cloth (decreasing stiffness and damping), whereas a plastic hardening greater than 1 will strengthen the cloth (increasing stiffness and damping). A hardening of 1 will keep the stiffness unchanged.
Cloth/Volume Collisions
Volume Representation
The solid object is represented as a volume, using parameters from any Volume DOP present on the Geometry data. This is different from RBD Objects, which also include a surface representation of the solid object, involving its points and/or edges.
You should be careful to ensure that the volume representation is adequate for the solid object. For example, if the Divisions are insufficient, some parts of the volume’s surface may poke through the cloth.
It is difficult to represent some surfaces using a volume representation. In particular, thin cracks are hard to represent. If you need to represent thin cracks, it can be useful to separate the two sides of the crack into separate solid object.
For example, if you have a human character whose arm is by her side, there will be a thin crack between the arm and the torso. Instead of treating the entire body as a single object with a very high number of Divisions, you may get better results by treating the torso as one object and the arm as a separate object.
Cloth Representation
The cloth object is represented using its points. This is sufficient to prevent the cloth from sinking deep into the volume, but it may still allow small parts of the volume to poke through the cloth. There are two ways to fix this.
-
Collide the cloth against a slightly enlarged volume. Use a positive value for the Volume Offset parameter to enlarge the volume.
-
Simulate the cloth using very small polygons. This can be effective, but quite slow.
Cloth/Cloth Collisions and Self Collisions
Houdini does its best to ensure that two pieces of cloth never pass through each other, or that a single piece of cloth never passes through itself. It requires that the initial position of the cloth object(s) be collision-free.
Cloth-cloth and cloth-self collisions are detected between cloth points and cloth polygons. Houdini uses swept collision detection. This ensures that collisions are not missed when parts of the cloth move fast.
Visualization
Visualization requires the Cloth Solver to create energy and/or force information on the cloth geometry during solving. This is enabled using the various Create Attributes parameters on the Cloth Solver DOP. Visualization settings on this DOP can then be used to inspect the cloth behavior after simulation is complete.
Attributes
You can create attributes on the cloth object’s geometry to influence its behavior. Most of these attributes allow fine-tuning of the cloth by scaling (multiplying) default values set in this node.
| Name | Class | Type | Description |
|---|---|---|---|
| v | Point | Vector | Initial velocity of each point. |
| Name | Class | Type | Description |
|---|---|---|---|
| stretchstiffness | Point | Float |
Multiplier for stretchstiffness parameter on cloth object. |
| stretchdamping | Point | Float |
Multiplier for stretchdamping parameter on cloth object. |
| stretchplasticflowthreshold | Point | Float |
Multiplier for stretchplasticflowthreshold parameter on cloth object. |
| stretchplasticflowrate | Point | Float |
Multiplier for stretchplasticflowrate parameter on cloth object. |
| stretchplastichardening | Point | Float |
Multiplier for stretchplastichardening parameter on cloth object. |
| shearstiffness | Point | Float |
Multiplier for shearstiffness parameter on cloth object. |
| sheardamping | Point | Float |
Multiplier for sheardamping parameter on cloth object. |
| shearplasticflowthreshold | Point | Float |
Multiplier for shearplasticflowthreshold parameter on cloth object. |
| shearplasticflowrate | Point | Float |
Multiplier for shearplasticflowrate parameter on cloth object. |
| shearplastichardening | Point | Float |
Multiplier for shearplastichardening parameter on cloth object. |
| bendstiffness | Point | Float |
Multiplier for bendstiffness parameter on cloth object. |
| benddamping | Point | Float |
Multiplier for benddamping parameter on cloth object. |
| bendplasticflowthreshold | Point | Float |
Multiplier for bendplasticflowthreshold parameter on cloth object. |
| bendplasticflowrate | Point | Float |
Multiplier for bendplasticflowrate parameter on cloth object. |
| bendplastichardening | Point | Float |
Multiplier for dendplastichardening parameter on cloth object. |
Parameters
|
Creation Frame Specifies Simulation Frame |
Determines if the creation frame refers to global Houdini frames ( |
|
Creation Frame |
The frame number on which the object will be created. The object is created only when the current frame number is equal to this parameter value. This means the DOP Network must evaluate a timestep at the specified frame, or the object will not be created. For example, if this value is set to 3.5, the Timestep parameter of the DOP Network must be changed to |
|
Number of Objects |
Instead of making a single object, one can create a number of identical objects. You can set each object’s parameters individually by using the |
|
Object Name |
The name for the created object. This is the name that shows up in the details view and is used to reference this particular object externally. Note
While it is possible to have many objects with the same name, this complicates writing references, so it is recommended to use something like |
|
Solve On Creation Frame |
For the newly created objects, this parameter controls whether or not the solver for that object should solve for the object on the timestep in which it was created. Usually this parameter will be turned on if this node is creating objects in the middle of a simulation rather than creating objects for the initial state of the simulation. |
|
SOP Path |
The path to a SOP (or an Object, in which case the display SOP is used) which will be the rest geometry for this object. The cloth solver works directly with the polygons in the SOP (the cloth solver won’t apply any triangulations). |
|
Initial Pose |
This is a path to a SOP that has the initial positions for all the cloth points. This SOP should have the same connectivity structure as the Causes the geometry for the object to be pulled from the chosen SOP at each timestep. |
|
Use Object Transform |
The transform of the object containing the chosen SOP is applied to the geometry. |
Initial State
|
Position |
Initial position in world space of the object. |
|
Rotation |
Initial orientation of the object. This is in RX/RY/RZ format. |
|
Pivot |
Local space position around which rotation is applied. |
Physical
|
Compute Mass |
If this toggle is enabled, then the mass for the cloth points is calculated using the density. Otherwise, the total mass for the object equals the mass parameter. |
|
Density |
The mass of a cloth object is its surface area times its density. |
|
Density |
The total mass for the cloth object. |
|
Friction |
The coefficient of friction of the object. A value of 0 means the object is frictionless. This governs how much the tangential velocity is affected by collisions. |
|
Dynamic Friction Scale |
An object sliding may have a lower friction coefficient than an object at rest. This is the scale factor that relates the two. It is not a friction coefficient, but a scale between zero and one. A value of one means that dynamic friction is equal to static friction. A scale of zero means that as soon as static friction is overcome the object acts without friction. |
Material
|
Stiffness |
The stretch/shear/bend stiffness parameters define how strongly the cloth initially resists stretching/shearing/bending. The actual values of the cloth stiffness coefficients may change over time as a result of plastic deformation. |
|
Damping |
The higher the damping, the quicker cloth energy dissipates as a result of resisting stretch/shear/bend. The damping parameter determines how quick the internal forces that oppose stretch/shear/bend diminish over time. The actual values of the cloth damping coefficients may change over time as a result of plastic deformation. |
|
Plastic Flow Threshold |
This threshold, which is normalized between 0 and 1, determines the point at which stretch/shear/bend deformation will start to have permanent affect. If the threshold is exceeded, then the rest state will adapt to the current state. |
|
Plastic Flow Rate |
This threshold, which is normalized between 0 and 1, determines how fast the rest state for stretch/shear/bend will adjust itself towards the current state. The higher the plasticflowrate, the quicker the cloth will adapt itself permanently. |
|
Plastic Hardening |
This determines how the stretch/shear/bend stiffness and damping are affected when the elastic limit is exceeded. A negative value will make the cloth softer, decreasing the stiffness and damping parameters over time. A positive value will make the cloth harder, increasing the stiffness and damping parameters over time. |
Collisions
|
Cloth/Volume Collisions |
If enabled, the cloth object will be prevented from touching or passing through any affectors that have a Volume collider label (e.g., RBD Objects or the ground plane). |
|
Volume Offset |
This parameter allows you to collide the cloth against an expanded or reduced version of the solid object. A positive value will make the solid object act larger than it actually is. For example, the default setting of 0.01m (1cm) will expand the volume by 1cm outwards in every direction. A negative value will make the solid object act smaller than it actually is. This setting is equivalent to changing the Offset parameter of the Volume DOP attached to the solid object, except that it only affects interactions between this piece of cloth and the solid object. If you are seeing little parts of the volume poking through the triangles of the cloth (due to the surface representation of the cloth), this parameter can be quite useful. To fix these, set the parameter to the length of a typical edge of the cloth. |
|
Cloth/Cloth Collisions |
If enabled, the cloth object will be prevented from touching or passing through any other cloth objects that affect it. This can make the simulation much slower. |
|
Self Collisions |
If enabled, the cloth object will be prevented from touching or passing through itself. This can make the simulation much slower. |
Outputs
|
First |
The cloth object created by this node is sent through the single output. |
Local variables
|
ST |
This value is the simulation time for which the node is being evaluated. This value may not be equal to the current Houdini time represented by the variable T, depending on the settings of the DOP Network Offset Time and Time Scale parameters. This value is guaranteed to have a value of zero at the start of a simulation, so when testing for the first timestep of a simulation, it is best to use a test like |
|
SF |
This value is the simulation frame (or more accurately, the simulation time step number) for which the node is being evaluated. This value may not be equal to the current Houdini frame number represented by the variable F, depending on the settings of the DOP Network parameters. Instead, this value is equal to the simulation time (ST) divided by the simulation timestep size (TIMESTEP). |
|
TIMESTEP |
This value is the size of a simulation timestep. This value is useful to scale values that are expressed in units per second, but are applied on each timestep. |
|
SFPS |
This value is the inverse of the TIMESTEP value. It is the number of timesteps per second of simulation time. |
|
SNOBJ |
This is the number of objects in the simulation. For nodes that create objects such as the Empty Object node, this value will increase for each object that is evaluated. A good way to guarantee unique object names is to use an expression like |
|
NOBJ |
This value is the number of objects that will be evaluated by the current node during this timestep. This value will often be different from SNOBJ, as many nodes do not process all the objects in a simulation. This value may return 0 if the node does not process each object sequentially (such as the Group DOP). |
|
OBJ |
This value is the index of the specific object being processed by the node. This value will always run from zero to NOBJ-1 in a given timestep. This value does not identify the current object within the simulation like OBJID or OBJNAME, just the object’s position in the current order of processing. This value is useful for generating a random number for each object, or simply splitting the objects into two or more groups to be processed in different ways. This value will be -1 if the node does not process objects sequentially (such as the Group DOP). |
|
OBJID |
This is the unique object identifier for the object being processed. Every object is assigned an integer value that is unique among all objects in the simulation for all time. Even if an object is deleted, its identifier is never reused. The object identifier can always be used to uniquely identify a given object. This makes this variable very useful in situations where each object needs to be treated differently. It can be used to produce a unique random number for each object, for example. This value is also the best way to look up information on an object using the dopfield expression function. This value will be -1 if the node does not process objects sequentially (such as the Group DOP). |
|
ALLOBJIDS |
This string contains a space separated list of the unique object identifiers for every object being processed by the current node. |
|
ALLOBJNAMES |
This string contains a space separated list of the names of every object being processed by the current node. |
|
OBJCT |
This value is the simulation time (see variable ST) at which the current object was created. Therefore, to check if an object was created on the current timestep, the expression |
|
OBJCF |
This value is the simulation frame (see variable SF) at which the current object was created. This value is equivalent to using the dopsttoframe expression on the OBJCT variable. This value will be zero if the node does not process objects sequentially (such as the Group DOP). |
|
OBJNAME |
This is a string value containing the name of the object being processed. Object names are not guaranteed to be unique within a simulation. However, if you name your objects carefully so that they are unique, the object name can be a much easier way to identify an object than the unique object identifier, OBJID. The object name can also be used to treat a number of similar objects (with the same name) as a virtual group. If there are 20 objects named “myobject”, specifying |
|
DOPNET |
This is a string value containing the full path of the current DOP Network. This value is most useful in DOP subnet digital assets where you want to know the path to the DOP Network that contains the node. |
Most dynamics nodes have local variables with the same names as the node’s parameters. For example, in a Position node, you could write the expression:
$positionx + 0.1
…to make the object move 0.1 units along the X axis at each timestep.
Usages in other examples
| Example name | Example for | |
|---|---|---|
| ClothSeam |
Cloth Create Seam surface node |
|
| AnimatedClothPatch |
Cloth Solver dynamics node |
|
| StitchedClothPatches |
Cloth Solver dynamics node |
|
| ClothAttachedDynamic |
Cloth Solver dynamics node |
|
| PinnedClothWind |
Cloth Solver dynamics node |
|
| ClothSpringsBalls |
Cloth Solver dynamics node |
|
| SimpleSwitch |
Switch Solver dynamics node |
|
| SimpleFan |
Fan Force dynamics node |