When you need to use the exact shape of an object for a collision with the cloth, you can use polygon mesh objects as the collision objects. For example, you will need the actual shape of a body for a shirt colliding with a character's arms, armpits, and upper body. Polygon mesh collision objects allow for an accurate collision, but they take longer to calculate than bounding shapes (see Creating Collisions with Bounding Shape Objects).
The polygon mesh collision objects can be stationary or animated. They can also have animated deformations applied to them, including lattices, shape animation, envelopes, waves — any deform operator. The current shape of the deform-animated collision object is updated at each frame of the simulation. This slows down the simulation, but makes the collision more accurate.
See Tips for Successful Collisions with Polygon Mesh Objects and The Collision Envelope below for information.
To have cloth collide with polygon mesh objects:
Create a Syflex ICE cloth or curve simulation - see Creating Syflex ICE Simulations.
Choose the Particles Collision Syflex Add Collide Mesh command from the ICE Tree toolbar.
Then pick one or more polygon mesh objects to use as the collision mesh.
This updates the Syflex ICE tree by adding the Syflex Collide Mesh node and a Get Data node for each collision object.
In the ICE Tree view, drag the Collisions Syflex Collide Mesh compound from the Task > Syflex tab in the preset manager and plug it into a Forces port on the Syflex Cloth or Syflex Curve node.
Then drag the name of each polygon mesh collision object from an explorer into the ICE tree to create a Get Data node for it.
Plug each collision object's Value output into a Geometry port on the Syflex Collide Mesh node.Set the parameters in the Syflex Collide Mesh property editor.
For more information on the Envelope parameters, see The Collision Envelope below.
Groups allow you to easily add collision objects to, or delete collision objects from, the group while keeping the same Get Data node plugged into the ICE tree. However, if you change members of the group after plugging in the group's Get Data node, you need to update the simulation.
The simulation of a cloth is often driven by its collisions with a character's body. Computing these collisions with the whole cloth geometry can be extremely time consuming, so instead a collision envelope is used.
The collision envelope consists of an external envelope that is outside of the collision object, and an internal envelope that is inside the collision object. Whenever a cloth vertex enters the volume defined by these two envelopes, the vertex is repelled to be outside of the volume. You can think of it rather like a "push" operator. By making the envelope bigger, the cloth is pushed further away from the collision object, to a point where there are no more visible intersectionss.
The collision object's envelope is a distance based on the Softimage units that you're using (such as one Softimage unit = 10 cm). The difference between the external and the internal envelope should be as small as possible: the smaller the envelope, the faster the computation.
The inner envelope's value is often the inverse of the outer envelope' positive value, but the inner envelope's value can also be positive. If you're using a character's body as the collision object, start out with an external envelope of 1 cm, and an internal envelope of -1 cm, then fine-tune as you need.
If the movement of the cloth or the collision object is too fast, collisions might not be detected quickly enough, and some cloth vertices might penetrate the collision object. In this case, decrease the internal envelope value (such as from -0.1 to -0.2) so that there's more distance between it and the external envelope.
If the collider is visible through the cloth in some places (as in the picture below on the left), increase the external envelope value (as in the picture below on the right).
Here are some tips to help you create successful collisions for Syflex cloth and curve simulations:
Collisions don't work well with very thin collision objects. Grids are generally not a good idea to use: it's better to use a flattened cube that has some thickness, such as for creating a ground plane or table.
Having a higher resolution on the collision object than on the Syflex cloth object results in a faster simulation than if the cloth has a higher resolution. The size of the collision object's polygons should be at least 2 times smaller than the cloth's polygons.
Avoid sharp angles on the collision object. Bevelling these angles will give better results.
To stop the cloth from sliding off the collision object, you may need to adjust the Friction value in the Syflex Collide Mesh node and the Stiffness value in the Syflex Cloth or Syflex Curve node.
For best results, you should set up the cloth simulation so that its geometry don't interpenetrate the collision objects before the first frame of the simulation. Slight interpenetration might be fine, but more significant amounts can cause instability as Syflex tries to resolve the interpenetration.
Sometimes the animation of the character is not perfect. For example, the arm might penetrate the body at the armpits (or envelopes from both sides might intersect). In these cases, Syflex does not know how you want to solve the cloth simulation. Depending on the situation, Syflex will use only one collision (such as with the body), or will average both collisions (body and arm). If this causes problems in the animation, the best solution is, of course, to clean up the animation of the character. If this is not possible, try separating the body into two parts (the body and the arm) and compute 2 collisions (overlapping one polygon). You should also slightly decrease the internal envelope value (such as from -0.1 to -0.2) so that there's more distance between it and the external envelope.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License