Cloth Configure Object
dynamics node
Attaches the appropriate data for Cloth Objects to an object.
See also: Cloth Object, Cloth Physical Parameters, , Cloth Solver
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.
Material Properties
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 more two adjacent polygons are bent, relative to the rest state, the stronger are the forces that try to push the cloth back. |
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.
The “Bend Model” determines how the amount of bending between adjacent polygons is translated into internal cloth forces. The “Weak” bend model bases the bend forces on springs. This bend model is the most appropriate choice for simulating cloth fabric materials. The “Strong” bend model generates forces based on the angle between adjacent polygons. This model is more suitable for modeling rubber balls, or semi-rigid objects. Generally, the “Strong” bend model will allow the cloth to regain its original shape. This is not always the case for the “Weak” bend model.
To make the cloth appear rigid part way through the simulation, animate the Stiffness and Damping parameters. Make sure the Support Changing Coefficients option is turned on.
Along with elastic deformation, it is also possible to simulate plastic deformation of cloth. For this you will need to switch on “Enable Plastic Deformation” on the cloth solver. 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.
If the “Enable Tearing” option on the cloth solver is activated, then the cloth solver will look at the “Tear Thresholds” for stretch, shear, and bend to determine which polygons will be torn apart at each frame. For example, if the stretch threshold is set at a value of 0.1, then the cloth solver will try to tear any cloth edges that have been stretched more than 10% compared with the rest length. The shear and bend thresholds work analogously.
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.
Cloth-External Collisions
Collision Geometry Representation
Cloth can collide with and respond to external, non-cloth objects. When it performs collision detection, the cloth solver will look only at the points, polylines, and closed polygons that exist in the geometry of these external objects. All other types of primitives are ignored as far as collisions are concerned. The cloth solver does not use SDFs when it collides with external, non-cloth objects. To achieve a reliable interaction with animated objects, the cloth solver linearly interpolates the positions of the cloth points and the points in the external object’s geometry.
It is not neccessary or efficient to triangulate any geometry before feeding it to the cloth solver. The solver treats all geometry as if it is triangulated.
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. |
| pintoanimation | Point | Float | Animates each point that has value > 0.5 |
| Name | Class | Type | Description |
|---|---|---|---|
| stretchstiffness | Point | Float |
Multiplier for stretchstiffness parameter on cloth object. |
| stretchdamping | Point | Float |
Multiplier for stretchdamping parameter on cloth object. |
| stretchelasticlimit | Point | Float |
Multiplier for stretchelasticlimit 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. |
| shearelasticlimit | Point | Float |
Multiplier for shearelasticlimit 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. |
| bendelasticlimit | Point | Float |
Multiplier for bendelasticlimit 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. This geometry does not have to be triangulated; the cloth solver works directly on any mix of n-sided polygons. Non-planar polygons are handled robustly. For example, the solver can work directly on quad grids. Triangulating your geometry is not recommended; it may result in slower simulations and it will introduce a triangulation bias in your simulation results. The solver works best when the polygons are well-shaped: roughly the same area, and not too long or skinny. |
|
Rest Geometry |
This determines the initial rest positions for the cloth points. The initial rest state is based on these positions. If “Enable Plastic Deformation” is not set on the solver, then the cloth will always try to regain the shape specified by the “Rest Geometry”. However, if plastic deformation is enabled, then the “Rest Geometry” determines the rest state only at the cloth object’s creation time; plastic deformation may change the rest state over time. |
|
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 |
When this is enabled, then the masses of the cloth points are computed using the “Surface Density” parameter. In this case, the mass of each polygon is computed by multiplying the polygon’s surface area with the “Surface Density”. The polygon masses are then distributed over the polygon vertices. If “Compute Mass” is disabled, then the masses of the cloth points are assigned such that the total mass of the object equals the “Mass”. |
|
Surface Density |
This specifies the mass per square meter. This parameter is used only when “Compute Mass” is enabled. |
|
Mass |
This specifies the total mass for the cloth object. This parameter is used when “Compute Mass” is disabled. |
|
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. |
Material properties
|
Stiffness |
The stiffness parameters determine how strongly the cloth resists deviations of stretch, shear, and bend. |
|
Damping |
The damping coefficients determine how fast the cloth loses energy due to deviations of stretch, shear, and bend over time. The higher the damping coefficients, the less the cloth oscillates and the quicker it will come to rest. Typically, the damping coefficient should be at most a few percent of the corresponding stiffness coefficient; this is usually sufficient to make the cloth come to rest quickly. |
|
Plastic Flow Threshold |
The plastic flow threshold is the relative threshold above which plastic deformation will start to happen. There are separate thresholds for stretch, shear, and bend. For example, if the “Plastic Flow Threshold” for “Stretch” is set to 0.01, then any edge that is stretched more than 1 percent of its original length won’t regain it’s original length; the rest length of that edge will adjust itself to the current length over time. This parameter will have an effect only when “Enable Plastic Deformation” is enabled on the cloth solver. |
|
Plastic Flow Rate |
This normalized parameter determines how quickly the cloth adjusts its rest state to its current state. This is specified separately for stretch, shear, and bend. This parameter will have an effect only when “Enable Plastic Deformation” is enabled on the cloth solver. |
|
Plastic Hardening |
This normalized parameter determines how much the cloth hardens or softens when plastic deformation happens to it. It is controlled separately for stretch, shear, and bend. A negative value results in a softening of the cloth material, making it more easy to deform, a positive value results in a hardening of the cloth material, making it harder to deform. This parameter will have an effect only when “Enable Plastic Deformation” is enabled on the cloth solver. |
|
Tear Threshold |
This parameter determines the relative threshold above which the cloth starts to tear. For example a “Tear Threshold” of 0.1 for stretch, will allow parts of the cloth that are stretched more than 10% to tear. The tearthreshold works similarly for shear and bend. This parameter will have an effect only when “Enable Tearing” is enabled on the cloth solver. |
Collisions
|
Cloth-External Collisions |
If enabled, then polygons in the cloth object will collide with polygons of non-cloth objects in the simulation (e.g., Static Objects, RBD Objects, or the Ground Plane). Only polygons in the non-cloth objects will be considered for collisions; other types of primitives (e.g. spheres) will be ignored. |
|
Cloth-Cloth Collisions |
When enabled, polygons of this cloth object will collide with polygons on other cloth objects. |
|
Self Collisions |
If enabled, polygons that belong on the same cloth object will collide with eachother. This prevents cloth from penetrating itself. |
|
Cloth Thickness |
The cloth thickness parameter creates an imaginary film around the cloth object. This film consists of all points that have a distance of at most “Cloth Thickness” to some cloth polygon. The cloth solver tries to ensure that the films for the cloth objects don’t penetrate each other or pass through each other. For example, when two cloth objects collide, one with a thickness of 0.01 and one with a thickness of 0.02, then the solver will try to separate polygons of these objects by a distance of 0.03. When a cloth object collides with a non-cloth object, then only the cloth object will have a film applied to it (the polygons in the non-cloth object will be treated as having thickness zero). The “Cloth Thickness” parameter is one of the few cloth parameters that is scale dependent. You will want to adjust this parameter when you change the scale or amount of detail of your geometry. It is recommended to use a thickness that is significantly smaller than the smallest edge in your geometry. Typically, the thickness should be around 1% percent of your average edge length. To avoid problems with cloth self collisions, you should keep the polygons in your geometry fairly even-sized. Avoid polygons that have very small edges, compared to the average size of the polygons in your cloth geometry. |
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 |
|
| SimpleSwitch |
Switch Solver dynamics node |
|
| ParticlesAndCloth |
Particle Fluid Solver dynamics node |
|
| SphereClothCollision |
Cloth Solver dynamics node |
|
| ClothSpringsBalls |
Cloth Solver dynamics node |
|
| StitchedClothPatches |
Cloth Solver dynamics node |
|
| PinnedClothWind |
Cloth Solver dynamics node |
|
| ClothAttachedDynamic |
Cloth Solver dynamics node |
|
| AnimatedClothPatch |
Cloth Solver dynamics node |
|
| SimpleFan |
Fan Force dynamics node |