Cloth

An Cloth Behavior (beCloth) duplicates nCloth objects from the scene on Entity geometries, allowing to do cloth simulation on it. It can be used to dynamically simulation capes, flags or any other cloth geometry. Please follow the Cloth Simulation Tutorial to get an overview of the full process.
A Cloth Behavior in the Behavior Editor

Example of Entity having dynamic cloth simulation on the flag banners
Note that the cloth simulation rely on the Maya Nucleus solver, and thus can be pretty time consuming.

Creation

  • Behavior Editor / Behavior Library:
  • Golaem Menu: Crowd Behaviors / Behaviors / CrowdBeCloth Node
  • MEL command: glmCrowdBeClothCmd;

Configuration

A Cloth Behavior defines the following specific attributes. For common attributes see Behavior Common Attributes.

Cloth Attributes

In Cloth Geometry

List of meshes attached to a nCloth which will be simulated. All those meshes must be attached to a nCloth node and must be listed as Meshes in the Geometry Tab of the relative Character File

In Skinned Colliders

List of meshes attached to a nRigid which will be simulated. All those meshes must be attached to a nRigid node and must be listed as Meshes in the Geometry Tab of the relative Character File

Starting Duration Starting duration for the cloth simulation. During the starting duration, the "Input Mesh Attract" parameter of the simulated clothes goes from 1 to 0, allowing for a smooth cloth simulation start.
Stopping Duration Starting duration for the cloth simulation. During the stopping duration, the "Input Mesh Attract" parameter of the simulated clothes goes from 0 to 1, allowing for a smooth cloth simulation stop.
Freeze Cloth On Stop If checked, the cloth will keep the shape it has when the stop trigger is set true. To go back to the skinned version of the cloth, it will be needed to start again a cloth behavior and stop it without this option checked.
Frozen Cloth Bone When the Freeze Cloth On Stop option is checked, this allows to freeze the cloth relative to the given bone rather than in world space

Every objects linked in the "In Cloth Geometry" and "In Skinned Colliders" lists must have the same names in the Character File (.gcha), in the Geometry Tab of the Character Maker (beware of namespaces).

If a nCloth listed in the "In Cloth Geometry" list has constraint with a nRigid object, the nRigid object must be in the "In Skinned Colliders" list for the constraint to work.

Note that meshes can be filtered by the asset repartition ot the Entities Rendering Types. In such a case, the clothes will only be simulated on the entities that get the cloth objects.