Cloth Configure Object
dynamics node
Attaches the appropriate data for Cloth Objects to an object.
See also: Cloth Object, Cloth Physical Parameters, , Cloth/Volume Collider 5 more , Cloth/Cloth Collider, Cloth Visualization, Cloth Solver, Empty Object, Triangulate 2D
The Cloth Configure Object DOP takes a simulation object and attaches the data which is needed for it to be used as a cloth object.
This DOP is very similar to the Cloth Object DOP, except it allows you to explicitly control the creation of the object using another DOP, such as the Empty Object DOP. This can be used for more advanced instancing or creating objects every 10 frames.
Force Model
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 usually doesn’t compress easily: if you push on a piece of cloth, it will tend to buckle instead of compressing. This can be simulated by setting the Maximum Compression to zero.
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. |
| fexternal | Point | Vector | External force applied to each point. |
| noclothvolume | Primitive | Integer | Disable cloth/volume collisions for certain primitives. |
| noclothcloth | Primitive | Integer | Disable cloth/cloth and self-collisions for certain |
| 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
|
SOP Path |
The path to a SOP (or an Object, in which case the display SOP is used) which will be the geometry for this object. The cloth solver only works with triangles, so the geometry is converted to polygons and triangulated. The solver works best when the triangles are well-shaped: roughly the same area, and not too long or skinny. Usually, it is best to do the triangulation yourself, and to use the Triangulate2D SOP to get well-shaped triangles. |
|
Use Deforming Geometry |
Causes the geometry for the object to be pulled from the chosen SOP at each timestep. The positions of the points will be used to set the initial cloth state, but will be simulated after that. However, attributes from the animated geometry will be used. |
|
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
|
Density |
The mass of a cloth object is its area times its density. |
|
Thickness |
The thickness of the cloth object defines how close to pieces of cloth must be before they are considered “touching.” |
|
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. |
Force Model
|
Model |
There are two different general “behaviors” for the cloth internal forces.
|
||||
|
Strength |
The stretch/shear/bend strength parameters define how strongly the cloth resists stretching/shearing/bending. For stretching, this affects only the spring phase. |
||||
|
Damping |
The stretch/shear/bend damping parameters define how much the cloth resists oscillation due to the stretch/shear/bend forces. The shear damping has no effect if the Model is set to Optimal. |
||||
|
Biphasic |
If enabled, the cloth simulator will use biphasic springs to resist compression and stretching. Biphasic springs prevent the cloth from exceeding the stretch limit. If disabled, the cloth simulator will only use springs, and there will be no limit to the amount the cloth can compress or stretch. When disabled, the stretch and shear strength parameters will usually need to be higher. |
||||
|
Maximum Compression |
The maximum compression defines when the hard phase of a biphasic spring kicks in. It is expressed as a fraction of the rest length, a value between 0 and 1. Typically, cloth does not compress at all, but instead buckles and bends. This is enforced by setting this parameter to zero. |
||||
|
Maximum Stretch |
The maximum stretch defines when the hard phase of a biphasic spring kicks in. It is expressed as a fraction of the rest length, a value between 0 and 1. Typically cloth does not stretch much beyond a limit of about 10%, which is why the default is 0.1. |
||||
|
Inflate |
The inflate parameter changes the rest length of the springs used to stretch and compress the cloth. It can be used for various elastic effects, such as inflating the cloth like a balloon (if set greater than one) or deflating like shrinkwrap (if set to a value between zero and one). Typically, it’s best to animate this, starting at one and smoothly raising/lowering the value. Large instantaneous changes to this value may disrupt the simulation. |
||||
|
Rest Shape |
The cloth will try to bend to reach its rest shape.
|
||||
|
Curl |
The curl parameter forces the cloth to curl relative to its rest state. Unlike the Inflate parameter, it is safe to change this instantaneously. |
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're 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. |
|
Tolerance |
This parameter is used to define how close two pieces of cloth can come to contacting. Two pieces of cloth that are closer than the Thickness will push each other apart. The distance between them is allowed to be smaller than Thickness; when this happens, the cloth surface is somewhat compressed. This parameter determines how much compression is allowed, as a fraction of the Thickness. For example, if this is set to 0.01, then the cloth surface can be compressed to 1% of the Thickness, but never any further. |
|
Self Collisions |
If enabled, the cloth object will be prevented from touching or passing through itself. This can make the simulation much slower. |
|
Tolerance |
This parameter is used to define how close two pieces of cloth can come to contacting. Two pieces of cloth that are closer than the Thickness will push each other apart. The distance between them is allowed to be smaller than Thickness; when this happens, the cloth surface is somewhat compressed. This parameter determines how much compression is allowed, as a fraction of the Thickness. For example, if this is set to 0.01, then the cloth surface can be compressed to 1% of the Thickness, but never any further. |
Visualization
|
Energy Scale |
Energies are drawn by mapping the energy to a brightness. If the cloth energy is greater than this value, it will be drawn with maximum brightness; use a larger scale if this happens. If the cloth energy is much smaller than this value, everything will be drawn in black; use a smaller scale to fix this. |
||||||
|
Force Scale |
This is used to define the scale of the force lines drawn in the viewport. Use a small value if the lines are too long and distracting, and a large value if you can’t see any lines. |
||||||
|
External Force |
Turn this on to see external forces applied by DOPs Force nodes (such as the Fan Force DOP) or by the |
||||||
|
External Color |
Use this parameter to choose the color for external forces in the viewport. |
||||||
|
Stretch Energy |
Turn this on to see the stretch energy stored in the cloth, due to the spring phase of the stretch resistance. Regions of the cloth that are highly stretched or compressed will have a lot of energy. |
||||||
|
Stretch Force |
Turn this on to see the force that resists stretching and compression, due to the spring phase of the stretch resistance. |
||||||
|
Show Stretch |
Use this to examine the independent effects of the stretch force and stretch damping force.
|
||||||
|
Stretch Color |
Use this parameter to choose the color for stretch energy and force in the viewport. |
||||||
|
Stretch Biphasic Force |
Turn this on to see the force that resists stretching and compression, due to the hard phase of the stretch resistance. |
||||||
|
Stretch Biphasic Color |
Use this parameter to choose the color for the stretch biphasic force in the viewport. |
||||||
|
Shear Energy |
Turn this on to see the shear energy stored in the cloth. Regions of the cloth that are highly sheared will have a lot of energy. |
||||||
|
Shear Force |
Turn this on to see the force that resists shearing. |
||||||
|
Show Shear |
Use this to examine the independent effects of the shear force and shear damping force.
|
||||||
|
Shear Color |
Use this parameter to choose the color for shear energy and force in the viewport. |
||||||
|
Bend Energy |
Turn this on to see the bend energy stored in the cloth. Regions of the cloth that are highly bent will have a lot of energy. |
||||||
|
Bend Force |
Turn this on to see the force that resists bending. |
||||||
|
Show Bend |
Use this to examine the independent effects of the bend force and bend damping force.
|
||||||
|
Bend Color |
Use this parameter to choose the color for bend energy and force in the viewport. |
||||||
|
Collision Force |
Turn this on to see the force preventing collisions in the viewport. This includes cloth/volume collisions, cloth/cloth collisions and self-collisions. |
||||||
|
Collision Color |
Use this parameter to choose the color for collision forces in the viewport. |
||||||
|
Friction Force |
Turn this on to see the friction force in the viewport. |
||||||
|
Friction Color |
Use this parameter to choose the color for friction forces in the viewport. |
||||||
|
Constraint Force |
Turn this on to see the force required to meet constraints in the viewport. |
||||||
|
Constraint Color |
Use this parameter to choose the color for constraint forces in the viewport. |
||||||
|
Impacts |
Turn this on to see impacts in the viewport. The impacts may appear in strange locations: they are shown at the position where a collision would have happened. |
||||||
|
Impacts Scale |
This is used to define the scale of the lines drawn in the viewport to show impacts. Use a small value if the lines are too long and distracting, and a large value if you can not see the lines. |
||||||
|
Impacts Color |
Use this parameter to choose the color for impacts in the viewport. |
||||||
|
Show Substep Impacts |
Use this to show all impacts during a DOPs step. The cloth solver takes many substeps per DOPs step. If this is cleared, only the impacts for the current substep are shown. |
Inputs
|
First |
The simulation objects to turn into cloth objects by attaching the appropriate data. |
Outputs
|
First |
The simulation objects which were passed into this node are output with the data required for them to be considered cloth Objects attached. |
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 |