Cloth FX: Create Cloth

The Create Cloth command is a one-step solution to setting up and cloth simulation. It will add all the necessary objects and change the parameters as required.

To use it, select an object (which must be a polygon object or an object which, if made editable would become a polygon object) in the object manager. Then select 'Create Cloth' from the X-Particles->Dynamic objects->xpClothFx menu. If the original object is a Plane (for example) then after the command finishes the object manager would look like this:

If no object is selected, or the selected object cannot be used for cloth (such as a null object or a spline) this command will create a new Plane object and create the cloth on that.

You can see that the following objects have been created:

  • an xpClothDeformer as a child object of the Plane (just as with any Cinema 4D deformer)
  • an xpClothTag attached to the deformer
  • an xpConstraints object
  • an xpGravity modifier (optional, but this makes the cloth fall when the animation is played - see below)
  • a particle emitter
  • and an xpClothModifier

In the emitter, the following changes are made:

  • the emission shape is set to Object, with the Plane as the source object
  • emission is from the object's points
  • 'One Particle Per Source Element' is turned on
  • the emission type is 'Shot'
  • particle speed is set to zero

You should not change any of these settings unless/until you know what you are doing!

Note that there are two additional Cloth FX objects - the xpClothSurface object and the xpClothPin tag - which are not used in this basic setup.

How X-Particles Cloth FX works

The cloth simulation is driven by particles emitted from the object to be treated as cloth (the Plane in the above example). The cloth modifier works in a similar way to the ordinary Particle Deformer in that, if the particles move, the object vertices move with them.

To ensure that the cloth behaves correctly each particle is linked to its neighbours. These links are known as 'constraints' and the Cloth Tag has options for adding additional constraints if desired.

The particles initially have no speed but the gravity modifier gives them speed on the negative Y-axis, so the cloth appears to 'fall'. You can remove that modifier if you wish and/or add another modifier which influences particle movement, such as Wind or Turbulence.

From then on the 'cloth' object is completely controlled by the particles. Most of the control over the cloth is given by the xpClothTag; in fact, the deformer and modifier have no parameters you can change.

This means you can use other components of X-Particles to add to the simulation. Other modifiers, questions and actions, and collisions will all work, though not all will produce desirable results.

The Cloth Deformer

The Create Cloth command added a Cloth Deformer to the Plane object and a Cloth Tag to the deformer. If the original Plane object had first been made editable, and then the Create Cloth command used, the deformer would not have been added and the Cloth Tag would have been added directly to the polygon object.

The reason for adding the deformer is because the Plane object is procedural. You can change the number of segments during the animation and the Cloth Deformer will handle this correctly, keeping everything procedural. This can't be done with an editable object, so the deformer is not required (but can be added manually if you want to use its falloff capabilities, for example).

The Constraints Object

A problem with any cloth system is that when animated the cloth may interpenetrate. In Cloth FX, the cloth is controlled by the particles emitted from the object. The system makes use of the fast particle-to-particle collision engine in the Constraints object to prevent interpenetration. You can see that these collisions have been enabled in the Constraints object. Turning them off may speed up the simulation a little but risks the cloth penetrating itself.

Collisions

To have your cloth collide with another object, simply add an X-Particles Collider tag to the object to collide with. That's all you need to do. You may want to add features such as friction to prevent the cloth sliding over the object. See the emitter's Extended Data tab (Physical Data quicktab) for details on how to add and change friction.