|On this page|
The cloth simulation can be influenced using soft constraints and air drag effects.
To affect how the cloth behaves to the surrounding air, use the Normal Drag and Tangent Drag parameters found on the Cloth Object. Both parameters require values above 0 to be considered. The velocity of the air that surrounds the cloth is controlled by the External Velocity Field and External Velocity Offset parameters. To create a simple wind effect, you can simply enter a velocity in the External Velocity Offset parameter. The External Velocity Field parameter allows you to make use of the
vel field that can be found any liquid or smoke objects that affect the cloth. For example, the cloth piece of the flag has a an External Velocity Offset of
-25 in the Z axis.
You can decrease the drag to give the cloth a heavier look.
Normal Drag determines how much the relative velocity of the cloth to the air affects the cloth in the direction of the face normal. Tangent Drag determines how much the components of the relative velocity in the tangent plane affects the cloth. Typically Normal Drag should be set to a much higher value than Tangent Drag.
You should not use the Wind Force DOP or any of the other forces in DOPs because they will generate inferior results compared with the Air Drag model.
You can use a target animation to mix simulation with animation in a natural-looking way. A target position at each frame can be provided the point attribute
targetP at each frame.
If you enable Import Target Geometry on the Cloth Object, then the solver will automatically copy the position
P and the velocity
v of a specified geometry node onto
The Target Stiffness and Target Damping parameters on the cloth object can be used to determine how strongly the target geometry influences the cloth position and velocity. The Target Stiffness parameter on the Cloth Object determines how strongly the positions in the simulation geometry will move towards the positions in the target geometry. The Target Damping parameter determines how strongly the solver will adapt the velocities in the simulation geometry to the velocities in the target geometry. Both the Target Stiffness and Target Damping result in forces that are taken into account by the cloth integrator.
If you want to animate target positions and velocities at each frame, then you need to set
targetv in a SOP solver that runs before the cloth solver.
To get good results with Target Damping, it is important that you have good velocities on the target geometry, in the form of a velocity point attribute
v. For this purpose, the Cloth Object tool will add a correctly configured Trail SOP in the Cloth Object’s geometry network so that reasonably accurate velocities are guaranteed. However, if your target geometry already has accurate instantaneous velocities, then this Trail SOP is not needed.
If you want some parts of the cloth to be affected by the target geometry more than others, you can locally adapt the Target Stiffness and Target Damping using the point attributes
targetdamping. The solver will multiply the per-object target stiffness and damping values with these multiplier point attributes when it determines the forces.
In addition to target stiffness and damping, which are a soft type of constraint, you can use hard constraints on the cloth simulation geometry, so that some points will exactly follow the trajectories of the target geometry. This can be achieved using the
pintoanimation point attribute. Setting
pintoanimation to 1 will make a point follow the target exactly. Setting it to 0 for a point, will make that point ignore the animated position and velocity.