Miarmy Crowd Simulation Documentation (English)

Cloth Simulation

 


Cloth simulation


Notice: NVIDIA rewrote entire PhysX cloth system in PhysX 3.3, and the latest cloth will be simulated in an independent solver space and not join the rigid body collision. It's much faster than previous version (the more clothes the faster, at least 10 times faster and more).

Also we add the particles inertia and make all simulation realistic. And the attributes of cloth entirely simplified, user can control it more easier.

 

Creating Cloth

  1. Put your cloth geometry directly under the Geometry_<Agent Type> group
  2. Make sure your clothes do not contain tweak info
  3. Smooth Bind your cloth onto the "Original Agent"
  4. Select attach points, click Miarmy > Physics > Cloth Setup > Attach Cloth (Select Pin Points)



Step 1: put you cloth to Geometry_<Agent Type>



Step 2: Make sure you clear the tweak info on cloth mesh



Step 3: Attach points to bone shape box of Original Agent


Tip: if your geometry mesh has tweak info, but you don't want to change the topology (shape) of that mesh, you can simply "add a cluster deformer" to the mesh and then "delete history" from the mesh, the 2 steps will help you clear the tweak info on the mesh but will not modify the points position

Once your setup complete, and place your agents from placement node, the clothes will appear.

Cloth Attributes

There are several clothes attribute for uniformly control all clothes in Physics Global. And these attributes



Cloth attributes in Physics Global

  • Cloth Density: the mass for each particle on mesh
  • Stiffness Frequency: the stiffness precision
  • Stiff Damping: damping coefficient for stiffness of cloth
  • Bending Stiffness: stiffness for resisting shape bend

Cloth Collision on Bone

If we want to our cloth collide against with the bone, we need set the flag in original agents firstly.



Turn on collide cloth flag on bone shape


The cloth in PhysX 3 can only collide with capsule, so our system will create an approximate capsule based on the shape of cubic bone.
Each cubic bone has 3 dimensions which are X, Y and Z. Our system will choose the longest dimension for the capsule length and the second longest for the radius of this capsule. Just like the left example below. Then once we enable simulation, the cloth will collide against the bone, like the right picture below.



Approximate collision object from cubic bone

 

Cloth affected by Wind

Cloth can only affect by wind force field. The wind can be created in Miarmy > Knowledge Perception > Create Wind.



Cloth affected by wind


The wind will blow to the direction which its arrow pointing. And the magnitude will be the value between (magnitude + noise) and (magnitude – noise). In the following example, the wind magnitude result will range from 0 to 100. (50-50, 50+50)



The wind attributes

 

Basefount Technology