Dynamics III – 2.2 In other words

For practical use getting a proper feeling for the effects of the cloth parameters is more important than a deep scientific understanding. Therefore, a similar story as above in different words, and some extra notes.

Fold Resistance handles the forces in the plane / parallel to the cloth that push the fibers out of the cloth-plane. Forces perpendicular to the cloth don’t make folds, but bends. Effectively, increasing Fold Resistance makes the cloth thicker and more elastic. I just make order-of-magnitude steps through the range (0.5 – 5 – 50 – 500) to see meaningful effects.

Shear or/and Stretch Resistance handle the pulling forces in the plane / parallel to the cloth. Increasing them make the cloth thicker and less elastic. Stretch works in the horizontal / vertical directions as if I’m pulling the fibers in the weave, Shear works in a diagonal way, all referring to the weave of course. Again, I make order-of-magnitude steps to experience the effects.

Elasticity does not mean stretch but means: bouncing and wobbling during the simulation. I need some to position the clothes better, but if it’s too much the result needs a lot of frames to stabilize. Stretch damping reduces elasticity, but at serious values (0.1 and up) only. I can change it to correct for the elasticity-effects of changing Fold/Shear/Stretch resistance.

Increasing mesh density (vertices per cm2) makes thinner cloth with higher elasticity. So when I mark the edges or shirts and dresses with high-vertex-density areas, the cloth will behave exactly the other way around as I intended.

Cloth density, measured as grams per cm2 (whatever you Poser unit settings are!) does affect Fold/Shear/Stretch behavior. In the result, doubling density doubles the stretching (relative elongation), as does halving the Stretch Resistance.
Cloth density however does have serious impact on the elastic behavior of the cloth during the calculations, as if I’m attaching extra weights to a rubber band. Assign density 0,5 (100-fold the default) to a cloth with all defaults on the other parameters, preferably to a diagonal tris’ mesh structure (which is quite unstable by itself), and you’ll have a chord bungee-jumping all on its own weight only, not even close to coming to a rest at frame 10,000. Absolute fun for some animations, but a nightmare for decent clothing purposes.

I still have not found any effects of the cloth-self-friction parameter. Static friction not only affects the cloth at stand-still but at low speeds also and does not follow physics textbooks to the letter. The default 0.5 seems not too bad for cloth on skin, but smooth materials require very low settings (silk on a hard-plastic mannequin might do 0.01).

Dynamic friction is different from the physics textbooks but after all unit-conversions, the textbook values do well for parameter settings. The default silk on a polished table goes well with the default 0.1 but cloth on skin does about 0.7.
Friction is not affected by density, but friction tests require that the cloth is kept from deforming which demands higher values for fold/shear/stretch-resistance and stretch damping. Which are affected by cloth density. But that’s for tests.

Air damping is measured in grams per cm2 per second. Increasing it reduces the freedom to move wildly and fast through the scene. Very high values, like 0.1 and up, will make underwater effects. At the same time, when my cloth is waving and swinging around, air-damping is the only force that stops it from doing so. Hence, when I reduce this parameter too much, the result has a very hard time coming at rest which introduces the need for longer animations in the sim.

Cloth density has a direct inverse effect on this air damping: twice the density implies half the damping effect, as long as the movements are gravity driven. If the cloth moves are driven by the figure’s moves, density will have no effect. The figure has to work twice as hard to push the cloth forward, but that will happen unnoticed.

Higher air-damping will show more sensitivity to Wind Force. Wind Force amplitude 1 means that a cloth at default parameters will hang at 45 degrees, so the side force equals the down force from gravity. We’ll have more on that later.

Gravity in cloth room follows the laws of physics. The constant reads 9.8 * 100 / (30*30) = 1,089 cm/frame2 as from converting the Earth constant from m/s2 to cm and frames at 30 fps.
The gravity script in the Poser Script menu however is based on a different value and does not take additional effects like air damping into account. Therefore it should not be used in conjunction with cloth room results. I have not tested Poser Physics yet on this.

Dynamics III – 2.3 Values on the Net

While chapter Real World will discuss the parameter values that represent various clothing materials in life, I can imagine that you’d like an overview to get a head start.

The origin of most values was in www.poserfashion.net (before it got hacked, you can find the Original in Internet’s WayBackMachine), a website on 3D clothing that started even before Poser introduced the Cloth Room (see chapter Cloth sim in perspective on history, part IV). PhilC and SvdL extended the list, while also presenting a mechanism to create preset collections. Either through assigning mat’s (PhilC, free on his site www.philc.net) of though a scripted user interface (SvdL http://www.renderosity.com/mod/freestuff/details.php?item_id=38542).

In all cases marked (*), SvdL deviated from the poserfashion values, and added cloth types and a parameter. In all cases marked (**) PhilC deviated from SvdL. In all unmarked cases, they agreed. The Poser Default is added for reference.

.. Default Burlap Cotton Leather Rubber Silk Wool Denim* Gossamer* Heavy leather* Latex* Velvet
Fold res 5 150 15 50 20
40*,20**
2,5 40 15 / 20** 1 800
800/5**
600/50 215
Shear res 50 500 225 200 35 50 150 240 1 800 200 100
Stretch res 50 250 75 200 10 50 100 75 1 800
800/50**
1
1000**/1
50
Stretch damp 0.1 0.1 0.1
0.0*,0.1**
0.1
0.01*
0.1 0.1 0.1 0.1 0.1
0.01**
0.01 0.8 0.1
Cloth dens 0.005 0.01
0.009*
0.01
0.005*
0.05
0.005*
0.075
0.02*
0.005 0.01
0.005*
0.005 0.02 0.02 0.4 0.03
Cloth self fric 0 0.4 0 0.4 0.7 0.2 1.0 0.0 0.2 0.75 0.4 0.02
Static fric 0.5 0.6 0.5 0.5 0.6 0.3 0.8 0.5 0.3 0.5 0.5 0.6
Dyn fric 0.1 0.4
0.1*
0.1 0.3 0.3 0.1 0.6 0.1 0.1 0.3 0.3 0.2
Air damping 0.02 0.01 0.02 0.01
0.02*,0.01**
0.005 0.04 0.02 0.02 0.75 0.02 0.75 0.02
Scale*   100 50 50 50 100 100 50 100 100 100 50

Note that the Scale parameter is not supported by the Cloth Room dials, and that PhilC/SvdL sometimes discriminate between values in U and V direction (like Latex Fold Res = 600/50), which is not supported by the Cloth Room dials either.

On top of that, I’d like to note that some parameters are very hard to obtain for real life clothing (how do you measure the amount of folding and the fold resistance?) and that some parameters or combinations seem quite unrealistic to me (how can Gossamer and Heavy Leather have the same density while Gossamer has a 40-fold air damping?). Why does Gossamer has a Stretch Damping of 0.1 according to SvdL and 0.01 according to PhilC while they agree on all other parameters? Why are the Posernet values taken for granted while they were published before Cloth Room came to life? Why do all the density values deviate so much from my simple measurements (chapter Real World)?

Dynamics III – 2.4 Cloth Parameters – do it myself

Let me try to establish some reasonable Cloth Parameters myself. In doing so, I use the details presented in Sim Calcs in the Mesh, especially on the effects of thicker threads and more tightness in the weaves.

Cloth is not rock or metal, it has an organic background: silk, wool, cotton, skin (leather) or oil derivative (rubber). All those materials have a specific weight of about 1000 kg/m3 when crushed together, about the same as water. Perhaps some thick leathers or rubbers weight more, but we’re not making clothes from those materials.
As a result, a Cloth Density of 1 (gram/cm2) matches a piece of cloth of 1 cm thick, so this parameter can be interpreted as cloth thickness as well, in cm, when grasped firmly (note that wool and fleece include some air, squeeze that out first). A basic shirt has a thickness of 0.5mm = 0.05cm. A 3mm leather belt can be assigned 0.3. And so on.
The Density only has to be corrected for weave tightness, like in silk (quite tight) and in laces and loose weaves (holes in the wall). So a lace shawl from thicker cotton could do 0.1 (1mm for the cotton) * 20% (for the structure that makes 80% void) = 0.02.

Tight structures will not let the air flow through, so the tightness comes in again while Air Damping is proportional to Cloth Density too. Let’s set a normal structure’s tightness to 100% (shirt, jeans), so that’s 0.05 for the shirt with a thickness of 0.05cm. And we’ve seen 20% for lace, then I can assume 125% for flags (they’re made to catch wind), 150% for leather/rubber and 200% for fine silk. The higher the value, the more it will float on air.

From the behavior of Wind Force in Poser (see Real World), I can infer that Amplitude values below 100% can be applied linearly, and values over 100% should be applied squared. So for my cotton lace shawl, air damping should be 0.02 (density) * 20% = 0.004. For fine silk, thickness can be as low as 0.0025 cm * 200% tightness => 0.005 density, and 0.005 * (200%)2 => 0.020 air damping. Note that the silk values are the Poser default ones.

The Frictions are independent of cloth density, and Self-friction can be ignored (or just dreamed up, if that feels better). A reasonable value for a basic shirt rubbing over skin seems to be 0.7 for Dynamic and a bit more, say 0.8 for Static Friction. So the question shall be: are the clothes so tight around the body that they are rubbing indeed, or is there enough space to make the clothes hover over some air layer? When that’s the case, the friction values can be reduced to say 0.2 for Dynamic and 0.3 for Static. Note that the higher the friction, the less response we’ll get from the gravity pulling the cloth down, and draping it in place.

By just using a ruler, I found out that I needed to pull very hard to stretch a part of my shirt from neutral to extreme, which produced a 2-4% elongation. Poser tests showed a 1% elongation for a piece of cloth hanging under its own weight, for the default settings. Is my 70cm shirt really stretching 0.7 cm when I hang it out? Normal cloth is not that stretchy. Cotton fibers can be stretched up till 7% until they snap, which does not sound stretchy to me either.

After tenfolding the density from the default 0.005 to the 0.05 of the shirt, I should tenfold the Resistances as well to get similar results. But that would drive the Stretch and Shear Resistances to 500 which I’ve just found too low, and 1000 is the max value for those settings. They will certainly lock up the simulation. Tenfolding the Fold Resistance would make it 50, but I know that light silk is the default material, and silk is a very smooth folder compared to basic shirt fabric. So I make Fold Resistance 200.

Now I’ve got my values for my shirt, but I’ve also got the feeling that these values are too high to make the sim run properly. Luckily, I’ve found that parameters are proportional to density while keeping the behavior, so I’m free to reduce all parameters a tenfold, except the Frictions. I decide not to adjust for the mesh structure. So:

My Shirt

My Sweater

My Straitjacket

Transparency

Original

Adjusted

Original

Adjusted

Original

Adjusted

Original

Adjusted

Fold Res

200

20

20

20

500

25

0

1

Shear Res

1000

100

100

100

5000

250

0

5

Stretch Res

1000

100

100

100

5000

250

0

5

Stretch Damp

0.1

0.01

0.02

0.02

0.5

0.025

1

0.1

Cloth Density

0.05

0.005

0.06

0.06

0.15

0.0075

1

0.05

Self friction

0

0

0

0

0

0

0

0

Static friction

0.3

0.3

0.5

0.5

0.4

0.4

0

0

Dynamic fr

0.2

0.2

0.3

0.3

0.2

0.2

0

0

Air Damping

0.05

0.005

0.005

0.005

0.5

0.025

0

0.002

 

My (thick home knit) Sweater folds, shears and stretches extremely well, and when I let loose after some stretching, it wobbles a bit before it comes to a rest. So all these values are low, compared to My Shirt. Knits of course have a low Air Damping; wind can blow quite through it. The hairy wool threads make somewhat larger Friction values. Since the values are not extreme, I don’t see a real need for adjustment.

My Straitjacket (J) is made of thick (1.5mm), stiff cotton: no shear, no stretch and hard folding. Thanks to the very tight weave I doubt it will have large Friction, but air will hardly flow through which raises the Air Damping. The extreme Resistance values require an adjustment to make the sim run, so I altered the values a twenty-fold.

Transparent clothes

When cloth is absent and leaves a hole in the mesh, the cloth simulator can handle that. It just sees a new edge in the midst of the clothing, and seals with that accordingly. But in various cases, the whole mesh is presented to the cloth sim and leaving out parts is dealt with by using 100% transparency in the materials. Shortening dresses and pants, opening sides or back portions, it all can be handled that way.

For the cloth sim, this is not the biggest issue as I can select an area by material, assign it so its own dynamic group, and give it its own set of behavioral parameters. But… which ones?
Simply stated, as there is supposed to be no cloth, it should not resist anything. So I’ll tend to zero out Fold, Shear and Stretch Resistance, the Frictions and Air Damping. I’m reluctant to zero out Cloth Density as well. In the first place, it would not eliminate gravity. Second, it would generate incredible accelerations due to other forces, thanks to F = m*a (force = mass times acceleration). So actually I turn things the other way around and eliminate the effects of other forces by assigning density its highest value: 1. Stretch Damping I’m not sure of, the higher the value the faster it gets the energy out of the cloth, once it got in. Which is fine for the transparent area, but not for the edges of the non-transparent parts.

Sounds good, eh? But it won’t work out. The pitfall is in the remark “it would not eliminate gravity“. And this gravity will continue to pull the cloth vertices down, since cloth room does not take the surface texturing into account. It pulls the transparent vertices as it pulls the other ones.

Therefore I should raise Cloth Density and Stretch Damping considerably, and lower the Resistances a lot, but not to their extremes. I should just make a serious difference, tenfold or so, to the surrounding cloth. And I’d better assign Air Damping some value to dampen the swaying of the cloth, just to shorten the length of the simulation. Again, it should be lower than the surrounding cloth for a good effect, but I should not go to the extremes.

See the table. From the default values, I tenfolded (up) the Stretch damping and Density, and tenfolded (down) the Resistances and Air damping. This means that the all-important ratios between Density and things changed a hundredfold. Frictions could be zeroed out, no sweat.

On making the hole
In Pose Room I used the Group Editor to create a group in the object, and assign it a material “HoleMat”. In materials Room I assigned 100% transparency to HoleMat, and zeroed out the other channels. In Cloth Room, I created a new Dynamic group (panel 3. Cloth Groups), and assigned it the HoleMat in the definition (via [Edit Dynamic Group]).

Dynamics III – 3.0 Meshes and Sims

I found out that conquering Cloth Room is: taking another perspective. While Pose Room – conforming clothes included – is anything Virtual, Cloth Room is everything Reality. Well, sort of. But before I’ll guide you around in the deeper dungeons, some words of wisdom. My 2₵ that is.

It’s Cloth Room, not Clothes Room
Poser has come to life to present cheap and lasting models to the drawing, painting and sculpting artist. FireFly and Cloth Room were introduced in Poser 5 to add features onto that. No-one ever thought of making photoreal renders, and realistic cloth sim results according to that. The basic idea was to present a still image with believable folds when draping a sheet over a car or statue. The ability to do clothes instead of cloth is an extra, the ability to handle animations is an extra, and doing clothes in animation count double. But the requirements to take things one step further have come up recently since PC’s have got the ability to handle the loads of lasting sims and renders.

Smith Micro doesn’t own Poser for that many years; they’ve given us Poser 8, 9 and the Pro series. Cloth Room has not been the highest priority on their list, for various good reasons. But in Poser 9 / Pro 2012 I already see some minor changes coming up. Who knows where we will end. In the meantime, it’s cloth room. Not clothes room. We have to find our ways around that.

More details can be found in chapter Poser features in perspective.

Conforming Clothes are Relevant

Let’s not forget that. Cloth simulation is a tool, a means to get specific results. Prop-like clothes (e.g. hats) and tight or stiff wrinkle-less clothes (leather wear, medieval gowns) don’t benefit from the dynamic approach at all. Sometimes we can get the best of both worlds, and make clothes only partially dynamic. Only clothify the skirt-part of a dress. Or clothify the whole pants but put major areas in the constraint group.

Image from a Pretty3D product presentation.

Dynamics III – 3.1 Cloth(es) Room Morphs and Objects

Pose Room is everything about morph-dial and bone-driven mesh deformation without any link to reality. I can have a rope standing up and have Vicky walk right onto it towards the top. I can conform figure A to B, which means that they share the same morph and bone drivers, and that the B-ones are master. So I conform clothes to Vicky, pose Vicky, and take a shot. But I also could have clothes conform to Vicky conform to a skeleton, and pose the skeleton. Or, conform the skeleton to Vicky conform to clothes, and pose the clothes. It’s in the naming too. If a table has its legs named as a horse I can make it gallop just from your pose library. If the horse, or the table, has the legs named as Vicky I can make them wear jeans, and walk in them. If I really take care, I can have the table wear jeans and gallop at the same time, point and click.

I’m referring to this as people sometimes demand cloth room to recognize conforming clothes for further processing. Poser only recognizes bone-driven meshes and calls them figures, they can be posed. They can be morphed and transformed (moved, rotated, scaled) as well. Non-bone-driven meshes are props; they can be morphed and transformed but not posed. Scene elements without meshes, like cameras and lights, can be transformed but cannot be morphed nor posed. And for completeness: background, atmosphere and the Universe marker cannot be transformed either.

We recognize figures as clothes, beings, vehicles, buildings, and gnarly trees, whatever. Poser doesn’t. Skeleton conformed to Vicky conformed to Jeans. Is Vicky clothes? How can Poser know? Why should Cloth Room care?
Cloth Room does not do poses. Cloth Room is a Morph Generator. An absolute, dynamic morph generator to be precise.

A what?

A Morph generator

For the objects or object-parts that are announced “cloth” in a sim, the sim creates morph targets like the Morph Brush tool does. Applying the Morph tool to a mesh, either prop of figure, adds a Custom Morph dial to its parameters.

Applying a cloth sim to a mesh adds a Dynamics dial to its parameters.

By itself this dial ranges from -100,000 to +100,000 although only values between 0 (no morph) and 1 (full morph) can be considered useful. Via the dial settings (triangle at its right) I can adjust the settings, and also… Recalculate Dynamics. So when I’ve made changes to poses, animation, objects positions and the like I don’t have to visit Cloth Room.

Right panel for Morph:  Right panel for Dynamics:

A Dynamic morph generator

In the usual case, an object is a mesh and its morph target is a variation on that mesh. The mix of those is determined with a morph dial, which can be animated. The dial value is animated, not the morph target. It’s a static morph, the same at every frame in the animation.

A cloth sim creates a dynamic morph, where the morph target itself changes over frames. The cloth animates when I keep the Dynamics dial value intact. On top of that, I can animate the dial value too.

So for those who are accustomed to handling Poser morphs, Cloth Room can lose its shine and magic right here. If you can handle morphs, you can handle cloth sim results. You only have to realize that the shape of the morph target changes during the animation. I’ll make some additional notes on this later on.

An Absolute dynamic morph generator

In each regular mesh, the positions of all vertices are relative to the origin of that mesh. Vertex coordinates are local coordinates, so if the mesh itself transforms it changes the relationship between its origin and its parent (ultimately the Universe) but all vertices keep their local position. When clothes are conforming, the mesh that makes up the clothes relates to the figure it conformed to and so, when that figure moves, so does the clothes mesh. So do morphs loaded onto that figure, their vertex positions are all relative too, as the figure moves, so does the morph.

For sim results, this is a problem as all non-clothified objects in the scene can be collision objects. Girl wears a robe which drapes onto the ground while being seated. The result of the sim depends on the positions of all of these elements. Consider two girls in the scene, both wearing a wide dress which collide to the other dress while dancing in the animation. Which dress-morph should be relative to which girl? And the dress morph is relative to the ground as well, and so on.

Poser solves this the hard way, and puts you and me in charge. If a dress-figure is conformed to Girl 1, or when a dress-prop is parented to Girl 1, then the morph from the sim will follow Girl 1. If the dress is not conformed nor parented, it will follow the Universe marker in the scene or: it does follow nothing. Then all vertex positions in the morph are absolute. The point of course is that a dress can only be conformed or parented to one other object in the scene. And the other point is that each clothing item in the sim can be parented to a different object. Poser is not going to decide.

But the sim result is more absolute than that, it’s absolute in time as well. You will find out when you set the sim properties, and not only the End Frame but the First Frame as well. Say, I put 31 to 60 in there. Then the cloth sim will make a 30 frame result, considering all object positions… from frame 1 to 30, and then publishes the result into frames 31 to 60. So for my girl wearing a robe, all movements of the robe will follow her moves… with a second (30 frames) difference. Girl chased by her wardrobe, with this we can have fun. I’m not sure about its practical use yet.

Yes, I can make a sim from 1-30, one from 31-60, and so on. Or even re-use the same sim and alter the settings. The 31-60 sim will not touch the 1-30 frames, only eventual 31-60 frames will get overwritten. But any animation that the 31-60 sim relies on has to be transferred to frame 1-30 before, as that is the animation range that sims really use. And then I will find that the cloth details in the frame 30 from the first run do not match the frame 31 cloth details from the second run. It’s somewhat like splitting a 1-60 frame animation into 1-30 frame halves, handle both halves separately and then glue them together in a video editor.

Except of course when I can clearly split scenes, and I want an integral approach of changes in lighting, materials, render settings and the like. Then it can be handy to have all the parts in one. It has not been my way of work up till now.

Handling the Cloth Sim Morph

According to the Reference Manual, dynamic cloths are like props. When they were made out of props, they’ve remained props indeed. But when they were made of conforming elements, I might want to keep the embedded bone structure and conforming properties although the dynamic morphs overwrite any initial posing.

When I want to save to dynamic result as something separate, I’ve got two routes to choose from. In any case, I’ve got to move to the animation frame that presents the shape I want to fixate.

Save as a Prop
This takes “spawn as a prop” in the Group Editor. I’ve got to select a set of vertices / polygons from a clothing piece, and this set will be duplicated. This prop includes the original mesh info plus the morph info, but does not include any move, rotate or scale info applied as well. I’ve got to re-apply those to get the dynamic shape back.

For example, I wanted Android Andy to wear the Hooded Cloak, but after clothifying and simulating, the Fastener of the cloak came off. A typical example of non-welded portions of cloth when turning conforming clothes into dynamic. So I:

  • selected the Fastener (it’s a material / texture zone in the Chest group of the Cloak)
  • turned it into a prop,
  • parented the new prop to Andy’s chest (to make it move with Andy’s own animations)
  • added it to the collision objects in the sim,
  • put some vertices at the left and right top of the cloak / bottom of the hood into the constraint group to stich them to the Fastener,
  • hided the original Fastener by assigning it 100% transparency in the Material Room (it’s part of an object, so I can’t make it Invisible to Camera etc.)

and re-ran the sim. Actually this turned a cloth Fastener into a stiff metal one or alike, but that’s fine for the moment. I could give it an engraved metal look in Material Room as well. I felt no need to save the new prop in the Library or to export is as an OBJ file, but those features are available if I want them.

Note that I cannot put the Fastener in the Soft / Rigid Decorated group, as it actively affects the draping of the cloth while elements in those groups only can follow passively.

Save as a Morph
In my understanding – but I’m not very handy at this yet – I need to use the menu: Object > Spawn Morph Target to create a regular morph dial for body parts or props. The menu: Figure > Create Full Body Morph creates a single master dial in the Body of a figure to drive all the separate dials in the body parts. Now I’ve frozen the dynamic morph as a static one.

To save a morph, I can export the object with As Morph Target and Include Existing Groups checked. The former loses the scene transform (move, rotate, scale) info, the latter enables a match with the original object when being loaded as a morph target later.

Handling the Cloth Sim Object

Parameters for cloth objects are not dedicated to a specific sim, they belong to the objects themselves like zones for the Material Room and object groups for posing (Pose and Setup Room).

When the cloth is unclothified and re-used in any sim later, all settings and groups are still associated with it.

So when the cloth object is (re)saved in the Library it gets those settings and groups saved as well. The additional information is stored in the CR2/CRZ for conforming clothes (figures), in the PP2/PPZ for props. This implies that a figure mesh in OBJ is not changed, and does not need to be re-distributed when sharing cloth settings. After turning a set of clothes into dynamic, the resulting CR2/CRZ can be distributed without the essential OBJ. This might save us from copywriting issues.

Some notes:

  • a piece of cloth can be clothified in one sim only. Once present in Sim_1, it cannot be used as cloth in Sim_2. Hence, there is only one mechanism in the scene that creates the dynamic morph for that cloth, it cannot be overwritten by another sim in the collection.
  • Any object can be collision object in all sims (except in the sim where it’s a cloth object). So a piece of cloth in one sim can be collision object in another, see chapter Multi cloth sims.
  • The settings for the collision (body parts, offset, depth, friction) are specific for the sim/object combination. So a sim can have different settings for each collision object, but an object can have different settings in the various sims as well, simply because those sims handle different pieces of cloth.
  • As a consequence, resaving a collision object does not save the collision settings, as “the” settings don’t exist.

Dynamics III – 3.2 The list of sims

Each sim is one from the list, and that list includes Cloth sims as well as Hair sims, in the order they are created, whatever their names are. I’ve found no way to alter the order of sims on that list afterwards. As long as each sim is calculated separately this does not really matter, but the menu Animation > Recalculate Dynamics offers the opportunity to re-run all calculations in one go.

Then they are processed according to the list, the ones created first will run first, cloth and hair separate or mixed. As long as sim elements do not collide with each other, there is no issue. But when they do I must create the simulations “from the inside out” to follow the apparent order in their respective effects. For instance: if Vicky is wearing a dress, a coat, long hair and a veil then the sims have to be created (and run) in that order. Dress collides to Vicky, coat collides to dress (and Vicky), hair collides to coat and veil collides to hair and coat.

This implies that a more elaborated scene with multiple dynamic elements really does require some planning, even before starting the creation of the sims. It’s far easier to empty or to eliminate some sims from the list afterwards than inserting an extra sim between to existing ones. And as already stated: I’ve found no way yet to save and load sims from and to the list, or ways to manipulate the list itself otherwise.

Dynamics III – 3.3 Multi-cloth sims

When the scene requires multiple pieces of cloth(ing) to be simulated, the question arises: do I need separate sims or do I put multiple cloth elements in one sim? As in the image, the figure wearing pants (brown), shirt (red), jacket (brown) and cape (green) form the Which Hunter outfit. And we do need Dynamics to make the cape and jacket flapper while hunting, and to keep the shirt under the jacket and over the pants at the same time.

Well, if I put two cloth elements in different, successive sims, I create a sort of hierarchical relationship between two cloth elements. For instance the dress and the coat: if the dress is underneath the coat and the coat does not affect the movement of the dress and the dress might affect the movement of the coat, then the coat can be included in a later sim. Just the dress collides with Vicky and the coat collides with Vicky and the dress, and all is fine.
Unfortunately things work different: the dress does not affect the movement of the coat but the coat does affect (limits) the movement of the dress. Now I can try to collide the coat to Vicky first, and then maneuver the dress in between. I’m not very enthusiastic about that approach, but nevertheless.

Anyway, in some cases using multiple sims instead of just one can help me out. In The Sim List is was already noted that the order in which sims are created is relevant: it introduces some planning beforehand. Something to take into account in that planning as well is that each object can be clothified in one sim only. Once clothified in one sim, it can only be a collision object in others. It’s up to me to pick the right sim at the right place in the stack.

When two cloth elements affect each other, like two dancers wearing wide dresses which collide against each other, they should be in the same sim, and cloth-self-collision must be switched on (third checkbox in the sim settings). When one element affects the other but a hierarchical relationship is not handy (like in the coat-affects-dress example above), they can be in the same sim as well. And when two pieces of clothes do not affect each other at all but share the same set of collision objects, they can be in the same sim too but in two separate sims as well. The first way just reduces the amount of sims and the total calculation time. Even pieces of clothes that do not affect each other and do not share collision objects can be put in one sim, collision objects included. Some collisions will never happen, the sim does spend some time to find that out but not so much.

Example: say I’ve got a leather belt and a piece of cloth, that is supposed to be attached to it. Unfortunately, the 3D meshes are separate. I can make the belt dynamic, and it might quite well get stuck onto Vicky’s hips. But how do I attach the cloth to the belt?

Well, when belt and cloth are in separate sims the cloth can be set to collide against the belt, and the top vertices of the cloth can be put in a constrained group so it sticks with the belt. I create, or at least I run the cloth-sim after the belt sim, and all goes well. This works because the thin linen cloth does not affect the belt-movements while the belt movements do affect the cloth, so the hierarchical relationship holds.
Can I put the cloth and the belt in one sim together? No, because I cannot constrain one cloth element to another cloth element in the same sim. I can only constrain to collision objects, identified for that sim.
But I can put multiple inter-colliding pieces of cloth in one sim, constrain them all to one belt, and put the belt in another (earlier) sim.
Why is there an issue in the first place? Well, the cloth sims take the 3D meshes as they are, and do not care about parent / client relationships which are required for Inverse Kinetics movements, and do not care about conforming settings either. Pieces of cloth are kept together when there are edges between vertices of both pieces, which make them one 3D mesh. When the meshes lack such edges the cloth pieces are considered separate, and the cloth sim might make them fall apart.

Conforming meshes

The Reference Manual is pretty clear:

Objects being converted to cloth must have single-sided, connected (welded) polygons without caps. The exception is decorative objects such as buttons, belt buckles, etc., which should be separate (non-welded) objects. The decorations group favors accessories that are geometrically separated from the cloth mesh object.

Like in real life, buttons should not share vertices with the cloth but it’s handy when there is a little thread connecting the two. But the main point is: lots of clothing meshes are two-sided with caps, as well as non-welded. Various pieces in the same mesh are not stitched together, which make them fall apart during simulation.

As shown above, this is indeed an issue when no hierarchical relationships can be defined, and constraint grouping cannot be used to glue the elements together. In those cases, the 3D meshes should be reconsidered, perhaps pieces can be welded together in Poser, or one needs a separate piece of 3D software to do the job.
Consider two adjacent quad polys. Ideally, they should have read ABCD and DCEF, sharing the vertices C and D. But in the mesh, we’ve got ABCD and GHEF. In general, there are two variations:

  • G and H share positions with D and C, they are copied vertices. The solution is to un-copy them, that is: welding. Tools can do that.
  • They do not share positions, just the C/H and D/G edges are missing or: the poly DCHG is missing. Those polys have to be added to the mesh, in the proper subgroup. Or the geometry have to be altered by welding C/H and D/G manually. Some work, in any case.

Welding (always make a backup copy beforehand!) however might present new issues. Tools might weld vertices which shouldn’t, especially in double-sided clothing (the sim will fail quite quickly after that). And as welding alters the vertex-count, they might rise issues with the accompanying cr2/pp2 file – which actually should be adjusted to the welding result.

Dual sided clothes for instance present an outside and a lining which are stitched together (with a trim or edge, in the mesh with some kind of capping). This can result in self-poke-through, which especially becomes annoying when outside and lining show different materials. Some possible solutions:

  • Check Self collision and raise the amount of Steps per Frame in the sim settings, so the calculations can solve the issue. This helps to a limited extent.
  • Hide the lining, by assigning it a 100% transparency in Materials Room.
  • Select the lining and make it a Soft decorated group, perhaps the same can be done with the trim. Now all materials can be applied while the outside is the only portion of the mesh in a dynamics group, and dealt with by the sim calculations. Do ensure that the Collision Offset is large enough to fit the lining in between the cloth and the body, and we might need to give the outside a heavier impression since the presence of the lining stuff is not taken into account in the sim any more.

Dynamics III – 3.4 Mesh behavior in short

Actually, Poser performs simulation calculations upon a mechanical structure, which can be represented well by a “spring net”: a structure of small (steel) balls, connected by tension springs and torsion springs. More details on that in Sim Calcs in the Cloth Mesh and Crash Course on… Sims (part V). Those elements interact according to the basic laws of mechanics. Translated to Poser, the balls of the spring net take the interaction with the scene and the collision objects: density, air damping and the frictions. The springs take all cloth-internal interactions: folding, shearing and stretching.

At the start of a calculation, the mesh structures of the clothing elements are transformed into such spring nets. It’s a simple transformation, one-to-one without subdivision (*): each vertex in the mesh becomes a ball, each edge between vertices becomes a tension spring (handling stretching) and between all adjacent existing edges we’ll get torsion springs (handling folding and shearing). This implies that mesh structures with equivalent vertices will differ only in folding, shearing and stretching and not in the other factors. Let’s see how this works out.
(*) when there was subdivision, then the phenomena described in The Sim Engine would not occur. So there isn’t any.

Meshes structures come in sorts, I can’t possibly handle them all. For a particular one, I can ask myself: if this were a real world object build from balls and springs, how would it behave? In this chapter, I consider: Quads, Mono-tris (all diagonals in the same direction), Diamond-tris (or: X-tris, alternating diagonals horizontally and vertically), Fish-tris (or: ZigZag, alternating vertically, same horizontally or vice versa), and Hex’s.

In theory: research reports tell that regularity kills the sim, the more irregular the mesh, the better. Making irregular tri-structures is known as Delaunay triangulation. More on this in Cloth Simulation in Perspective (part IV).

In my observation, the most regular structures have the most artifacts in their behavior. But also:

  • Quads are the best representation of non-weaves like rubber, leather, fleece, etc.
  • Tris are a good representation of normal weaves (linen etc.): mono-tris are the worst, X-tris are the best
  • Hex’s are the best representation of loose knits, like home-made winter sweaters.

Let’s have a further, still undetailed, look into this and apply: horizontal and diagonal pulling, horizontal and diagonal pushing, and shearing, to all of those. Horizontal (or vertical), as in: according to the main edges. But first: what happens when I alter the mesh density?

Mesh density

Doubling the density of the 3D mesh implies: halving the length of the edges, and quadrupling the amount of edges, corners and vertices (doubling in two directions or dimensions, cloth is a surface). What does it matter?

Well, not that much. While I keep the parameters intact, I still get cloth with the same Cloth Density and so on. Stretching, shearing, all remains the same. Even the total amount of folding will not change, as the same Folding Resistance has to be catered for. Except that smaller polys will give me more but finer folds instead of less but larger folds. Bends of the cloth around a corner will be smoother, performed in more, smaller steps. And in the section on thread thickness and Cloth Density (Sim Calcs in the Cloth Mesh) we’ll see that altering the folding relative to the other effects suggests the use of thicker (increase) or thinner (decrease) threads in the weave. In the latter case, the cloth will appear thinner, smoother, silkier.
Note the words “suggests” and “appear”: the cloth behaves as if we’ve changed the parameters, without actually doing so.

2x2mtr cloth, at densities: 10mm, 20mm, 40mm, 80mm. No difference in shear and stretch. The finer the density, the finer the folds that can be made. The ones at the right are quite heavy.

Same cloth 2×2 mtr, quads, hanging at one corner. The left (black-white) one uses 1x1cm polys, shows smoother folds and believable crumbling at the floor. The middle one (red-blue) uses 2x2cm polys, the right one (green-yellow) uses 4x4cm polys. Large folds and artifact’ish crumbling at the floor.

Next image shows the wireframe (anti-aliased).

Note that Android Andy uses meshes of say a 1x1cm density, while Vicky4 comes at about 0.5×0.5 or so. Size does matter. In the fine details, in the final quality. Not in the rough end result.

Mesh structure

No theory, just look at the facts first.

Six different mesh structures, fixed (choreographed) upon the upper row of vertices, all with the same, default cloth parameters, after 30 frames of hanging on their own weight. This is mainly a test on stretching.
Five of them behave more or less the same, the green one at the right is by far more stretchy and elastic, and skews to the right.

The next figure shows the towels hanging at one corner only (after 120 frames), which makes this a test on shearing, although stretching has effects too. Towels 2 and 3 from the left stretch far more than the others, towel 5 shows larger folds and the stretchy green one does its stretching here as well.

Color Structure Vert stretch Diag stretch Ratio
Red-white Quad

1.3%

4.7%

3.4

Yellow-blue Mono-tri A

0.8%

17.8%

22

Blue-red Mono-tri B

0.8%

22.8%

28

Blue-blue X-tri

1.5%

3.6%

2.4

Yellow-pink Zigzag-tri

1.7%

10.7%

6.3

Green-green Hex

7.2%

12.2%

1.7

Mono-tri A ends the Diagonal Stretch with the diagonal edges downwards, Mono-tri B ends with the edge horizontally.

It’s easy to see that the two Mono-tris (nr 2 and 3 from the left), both with their diagonal edges in the same direction all over the cloth, stretches by far the most in the diagonal direction while they stretched the least of all vertically. This implies that during normal use the animation will tend to jiggle sideways (bottom-right, bottom-left, bottom-right, …) which hampers its use in animations, and will raise the need for longer simulations to get a stable result. It’s quite unnatural for cloth.

The green hex at the right stretches a lot as well, but it did so too in the vertical stretch. The ratio between those stretches, in the table with the lowest value 1.7, means that it stretches about equally in all directions. It’s just very flexible stuff. The Zigzag (yellow-pink, 2nd from the right) makes large folds so this kind of mesh introduces an extra fold resistance.

To some extend these issues can be repaired by altering the parameters. So I set shear (resistance) to 200 and stretch to 100 for both the Mono-tris, and I set fold to 2.5 and shear to 100 for the Zigzag. This equalized the results between the meshes:

Up till now, the quads (red-white) and the X-tris (blue-blue) both make the most normal cloth appearance to me. The hexes (green-green) do make a good cloth too, but a rather flexible kind: good folding, shearing and stretching with the same parameters as the other ones. To me this resembles the behavior of a loose home-knit woolen sweater like my mom made in the old days. The other mesh types can make a decent cloth as well but require higher shear, and either higher stretch (mono-tris) or lower fold (zigzag).

The next test is on fine folding, all the cloth pieces were dropped from hanging on one corner onto the floor. In the animation: each cloth went down during frame 240 to 480, this affected only the corner vertices in the choreographed groups.

These are quads:

Quads crumble, which gives irregular, sharp edges over the diagonals of the polys. More on this artifact in Mesh-behavior – crumbling.

These are mono-tris:

(diagonal downwards)

(diagonals sideways) – it produces more finer folds than its equivalent. Mono-tri cloth has a directional difference build in.

These are Diamond / X-tris:

This is very believable normal cloth behavior, again.

These are Fishbone / Zigzags:

It looks as if it cannot make sharp bends, the folds remain fattish although the fold resistance was halved already.

These are Hexes:

Extremely flexible stuff, the heap is considerably lower / flatter than the other heaps.

So:

  • Quads do fine for cloth but crumble and ridge when fine folds are formed. Increasing mesh density (vertices per cm2) and increasing the Fold Resistance can help us out. In the meantime the cloth stays somewhat elastic and wobbly. This makes quads best suited for non-woven cloth, like leather, rubber, fleece and the like.
    In addition: use Quads in high resolution (20mm) anyway because too low resolutions (80mm) tend to freeze up. The higher I make the Shear-resistance, the more it looks like leather. The higher I make the Fold-resistance, the more it looks like rubber. In order to turn it from a thicker kind of massive rubber to an elastic band, I have to turn down the stretch parameters.
  • Hexes are extremely flexible in all directions, which normally is not the case for woven and non-woven cloth. Hexes are great for loose knits, like the home made woolen sweaters.
  • That leaves tris for normal, woven cloth. The more irregular the better, the Delaunay triangulation (as applied in Marvelous Designer) definitely is a good idea. From the alternatives, X-tris are the best and show the most natural cloth behavior, especially for silks and satins. Zigzags shear easily and don’t make fine folds that well, which can be adjusted with the cloth parameters (double the Shear Resistance, half the Fold Resistance). Then they make decent linen (burlap, denim, …). Diagonal tris are overly shearing and appear like cheap, wet, elastic towels unless the parameters are adjusted as well (double the Stretch Resistance, quadruple the Shear).
    In addition: At low resolution at medium (50) Shear-resistance it does reasonable cotton or linen, I use Fold-resistance to vary from summer dress (0.5) to thin curtain (500).
    At high Shear-Resistance it might freeze up, at low Shear-Resistance it either makes a wet or an overly elastic impression. At high resolution I can do silk (very low Fold-Resistance), satin (low Fold-Resistance) to chamois-leather (high Fold-Resistance and high Shear-Resistance) but I have to avoid the low Shear-Resistance/high Fold-Resistance combi as the plague. It’s the most unstable thing I’ve ever seen.

Mesh density enables the cloth to make finer folds, like it’s thinner.
From the Marvelous Designer manual: set the Particle Distance to 20-40mm for prototyping and 5-10mm for presentation models. Makes sense. Note that Vicky has a 5mm resolution herself, so you’re always using low resolution cloth on high resolution collision surfaces.

Dynamics III – 3.5 The sim engine

When I run a simulation calculation, a few things happen that are worthwhile to be aware of. Each sim runs in a number of iterative steps, there are two or more of those steps for each frame in the animation. The animation – even if nothing moves or animates – generates the time for the cloth to drape properly, driven by gravity, some wind perhaps, and various frictions and forces within the cloth element, between the cloth elements, and between the cloth elements and the collision objects. The basic idea is that when the cloth is draped well at the start, and the figure gradually moves into a more elaborated pose, the cloth will follow and will drape to that pose accordingly.

The sim settings even offer a Drape-period, intended to have the collision figures change from the T-pose into their frame-1 pose. Or to give the cloth draping a head start, while the collision figures are not moving at all. The advantage of this is that a cloth-sim specific animation is added without disturbing the scene animation as such, the disadvantage is that the movements during the drape period cannot be affected. So arms can cross bodies or legs and ruin he sim instead of helping it forward. When the sim runs during my own animation, I can prevent issues like that by fine-tuning the animation itself before I run the sim calculations.

Hence in general I start with my figures in T-pose at frame 1, give them 1 sec to take a normal pose in normal clothes, or 2 sec for a complex pose far from the T-pose or when in tight, complex or heavy clothing, and maybe even 4 sec in the case of all together. The main issue is: can the pose – in the real world – by a normal, trained – life! – person be made in the period set for it while wearing those kind of clothes?

Okay, the calculations kick in and all parameters describing the physical reality combine with the sim algorithms to make a cloth mesh change shape and position: all its vertices are affected. This is the easy part, and cloth simulators can do it quite efficient. And from the Poser animation, the collision object movements are obtained as well. All this is done per simulation step, defined by: the number of steps per frame and 30 frames per second. So for 4 steps per frame and an animation of 60 frames, the calculation loops 4×60=240 times to cover 60/30=2 sec of animation.
After moving all vertices for that step, the next step is: collision detection.

Collision Offset

The collision object surface gets a virtual version, by offsetting it towards the cloth surface. Therefore the collision will take place at some distance between the two, which gives the cloth some thickness. There is no extra calculation required, the setting itself does not affect PC resource usage.

  • When the offset value is set (too) high, the result might become visually unattractive and artificial, and the cloth will hardly follow the contours or the body underneath. The Poser upper limit of 10cm hardly makes sense, but even say 2 cm is quite sufficient for emulating a thick overcoat. The default 1cm is meant for thick cloth over a car or statue (note: we’re in Cloth Room, not: Clothes Room). In practice, 0.5 is fine for sweaters and alike and 0.25 will do for lingerie and fine clothing.
  • When the value is set (too) low, the result might show poke-throughs in the render. One reason for that is that the sim does not take render settings into account, and does not take care for polygon smoothing or displacement mapping. And as the cloth and the underlying object will have different mesh densities, they will behave differently in that respect. Another reason is that the body parts perform some strong bends which cannot be supported by the elasticity of the cloth, it just cannot stretch that much. Or the cloth just misses the resolution, it does not have the polygons available in that area to make the bend. All this might be a reason to consider a higher offset value.
  • An issue occurs when a piece of cloth has to maneuver between two surfaces, like Vicky sitting on a chair with some skirt in between. The skirts needs the offset distance to Vicky’s thighs, and the offset distance to the seating of the chair, so when the distance between Vicky and the chair becomes about or less than twice the offset the sim does not know where to more the cloth vertices to. And “not knowing” usually imply: random results, and accidents waiting to happen. This issue might force you into reduced offset values, or might force you to alter the scene for instance by moving the chair a bit down and back, or by shrinking it a bit in one direction (say Y) while growing it in another (say: Z). But then you’ve got effects in the visual results.
  • A second issue comes with the concept. When a piece of cloth surround a body(part), then each cm offset will increase the circumference with about 6cm which will generate stretch forces within the cloth, except when the cloth itself has been widened beforehand. But that’s about 5% extra for a dress or sweater, 10% extra for the legs of pants, and 15-20% extra for sleeves.
    This is one of the issues when clothifying conforming clothes: they either do not support the extra widening, nor does Poser support the relaxed stretching in one direction while not stretching that easy in the other direction (otherwise, sleeves that widen easily will lengthen easily as well, which is not what we want). At least, not in a simple way.

Collision Depth

To find out for which vertices collision calculations have to be performed, a layer with the thickness defined by Collision Depth is imagined around one of the surfaces (cloth or collision object, does not matter, all movements and positions are relative anyway), and the vertices of the other surface are tested against it.

  • Simplified: about all vertices within that layer are taken for further investigation, and all other ones are not. Of course the actual method is a bit more elaborated, but this is the idea. The larger the Depth value the more vertices are investigated upon, and the calculation times will go up accordingly.
  • When the Depth is (too) high, the layer becomes too thick and the mechanism runs an increased risk on “false negatives”, vertices that should not be considered for further treatment but nevertheless gets some, with sometimes erroneous results. Hence a limitless expansion of the Depth does not resolve all issues. Though, despite the Poser maximum of 10cm for this parameter, I rarely use values over 4cm myself.
    Perhaps an even better rule is: start with the Offset value, and double this once or twice but not more.
  • When the Depth is (too) low, a vertex that approaches the other surface with a high velocity has a change to pass through unnoticed.
    See the figure: vertices A and B might pass through unnoticed, C is captured and D does not collide.
    For instance, in 1 second, with 30 frames a second, and 2 sim steps per frame, each step covers 1/60 of a second. So when Vicky and a skirt around her thighs come down towards a chair over a distance of 60 cm within that 1 second, then within the 1/60 of that sim step the vertices move 1 cm towards the colliding surface.
    Not that much you think, but when the Depth is just 0.5cm the vertex might be at one side of the capturing layer in say some step N, at the other side of that layer in the next step, and won’t be marked for investigation at all. From that moment on, the cloth has entered the inside of the body and it’s just a matter of time for the simulation to crash.
    This is where increasing the Steps per frame value becomes of help: it further limits the distance the vertex can travel, and increases the change of being captured by the Depth-trap considerably. For the example above: doubling the Steps from 2 to 4 reduces the time between steps to 1/120th of a second, reduces the distance travelled by that particular vertex to 0.5cm, and so when the vertex in outside the detection layer in step N, it just will be in in the next step but won’t pass through unnoticed. And the sim-crashing stops right there.
    Doubling the Steps Per Frame roughly doubles the calculation time for the whole sim. This makes it quite an unpopular – but quite effective – method.
  • An issue occurs when the cloth approaches two surfaces (at the same side) which are quite close together. For a thin object, this means that the collision warning method sees both sides of the object and gets really confused when the detection layer is too thick. As it seems to collide against both surfaces, the final result gets a random component and the vertex might end up at the wrong (back) side of the object.
    See the figure: vertex A is captured in the surface#2 handling, B will end up at the wrong side as being captured by the surface#1 handling, and C might go either way.
    Therefor I avoid depth values which are larger than (half) the distance between two of those nearby surfaces. This puts a maximum value to the practical use of Depth. The downside however is that I have to start ramping up the Steps per frame value earlier.
    Don’t underestimate this. The front and back side of finger surfaces are about 1 cm apart (a hand on chest makes the shirt go wild), chair seatings might be less than 1 cm thick (and the dress falls through), and if a coat collides with a shirt and a body, both are less than 0.5cm apart. Reduce the collision depth and increase the steps per frame, and take the increased calculation times for granted. Repairing crashing simulations take longer.

Notes on the Reference Manual

  • The Collision Offset parameter determines the distance between a cloth object and a collision object at which the collision detection calculations begin. Increasing this value can help avoid accidental collisions, especially during animations, because Poser requires a little time to calculate actual collisions. Increasing this value too high can consume extra computing resources.
  • The Collision Depth parameter specifies how close the cloth object must be to a collision object in order for a collision to take place. Increasing this value increases the distance at which the cloth and collision object will collide. This is useful when creating clothing, because the cloth will be kept away from the figure. Increasing this distance makes the cloth appear more static but avoids having body parts penetrate the cloth (such as a leg poking through a skirt).

The correct definitions are exactly the other way around. Offset determines the thickness between cloth and object, help reduce poke-through and can make the cloth look static, while Depth defines the collision handling process and can require more resources.

  • The Collision depth and Collision offset dials are limited to minimum 0.1cm and maximum 10cm.

Collision Depth has a minimum of 0.0 mm

  • Before adjusting these settings, be sure to enable the Object vertex against cloth polygon and Object polygon against cloth polygon options in the Simulator Settings dialog. You may also try reducing the Steps per frame value from its default of 0.2 to as little as 0.005.

It’s proper policy to check those options before increasing Steps per Frame. This parameters is limited to whole numbers from 2 to 33333.

  • The Collision Depth and Collision Offset dials emulate thickness by “extruding” the cloth inwards by the amount of Collision depth units and outward by the amount of Collision offset units. Thus, the cloth now has a “thickness” of collision offset + collision depth. Any specified collision object intersecting this volume will be treated as a collision.

Actually, offset and depth are parameters for the collision object (in a specific sim). The object is extruded towards the cloth with an amount Offset, and then this virtual surface gets an inward thickness Depth. All cloth vertices in and around this area are seen as collision candidates and prone to further evaluation.

Collision tests

Once the vertices are labeled for further testing, those further collision tests come in flavors:

  • The default one is called “cloth vertex against object polygon” and it works fine for cloth with high mesh densities against objects with a low(er) mesh density. This usually is the case when we throw a large cloth over a car or a statue, or a table cloth over a table.
  • The next one is called “object vertex against cloth polygon” and does the opposite, so that one works fine for high density body’s colliding with low(er) density clothes. For clothing, this is a normal situation. Most clothes I see passing by show vertices 2 to 5 cm apart, while Vicky’s body itself shows vertices only 0.5cm apart. In practice, this extra option hardly adds to the calculation times but hardly adds to the solution as well.
  • The serious one is called “object polygon against cloth polygon”, is more calculation intensive but far more effective as well. It also captures vertices that were about to escape by passing through the Depth layer, and therefore, with a bit of the previous option as well, is some alternative for increasing Depth and/or increasing Steps per frame.
    This is why I mentioned those options first in my “recipe” chapter (Quick Clues and Recipes, part II), and this is why the Poser Reference Manual states that when you consider increasing the Steps you’d should check these options first. They might just do the trick and are far less computational intensive.

The calculation pass

As said: each loop starts with a physics/ real world related pass through the vertices. Such a pass can be made in two ways:

  • The new position, velocity etc. for the vertices in pass N are derived from the previous pass N-1, but the new information within pass N is not used until the next pass N+1.
    This makes all vertices considered equal so let’s call this the “symmetric approach”, but there will be two full intermediate results (N-1 and N, N and N+1, …) which have to be stored and the simulation will converge gradually to its final state as a lot of the intermediate information is not used.
  • The new position etc. for a vertex in pass N is also derived from the new positions, velocities etc. of the already handled vertices in the same pass. Now only one intermediate result has to be stored and all available information is used so the sim converges faster to its final state. Of course, this is the way Poser does the job.
    But this way it matters in which order the sim calculates through the mesh, as vertices are not equal: one is first, others are later, hence: the “asymmetric approach”.
    Say, one vertex is pulled down, by gravity. Then the vertex next to it will also be pulled down, but will also be pulled in the direction of the first mentioned vertex. So forces start skewing a bit, and not all mesh structures are equally happy with those diagonal forces.
  • Who cares? Well, for cloth pieces falling on cars, or a lot of clothing following an animation sequence, the result will not be exactly as in real life but still quite believable. The “asymmetric approach” is quite handy for practical use, though scientific sims always want the best match to real life and take the symmetric route.
    But the effects become noticeable in simple straightforward cases, like draping a banner down.

For instance, the image shows what happens with a simple square cloth made of little quad polys just hanging down under its own weight. It skews to the bottom right, with some extra tension at the left side and more folds in the right half.

I’ll tell you: the sim loop starts at the bottom right, and then goes to the left and up. That is: against the UV coordinates, from high to low. Left or right is a choice, but bottom up makes sense as the usual driving force behind cloth sims is gravity, pulling down.

Something you can do about? Well, it mainly happens with rather low (10 or less) settings for Shear and Stretch Resistance. You can raise them, or dampen the effect by raising the Stretch Damping, or take it for granted when it does not hurt the final result too much. But at least; it’s the sim itself, it’s not you.

Sim details

This is a simple cube (images by Bagginsbill), and a simple four-vertex square piece of cloth. With no additional options checked, the cloth falls right through the cube. This can be expected, as “cloth vertex against object polygon” is the default setting, and no cloth vertex touches the cube surface while falling down.

This shows that the sim mechanism does not perform any additional subdivision within the cloth, it just works with the mesh information.

With “object vertex against cloth polygon” checked the cloth is stopped by the cube, with an artifact. Three corners seem to fall through a bit, and the fourth one does not. Why is that?

Well, each time first the position of a vertex is calculated from the forces, velocities and other physical aspects. Apparently, in this case, the vertex ended up just below the surface level of the cube. Then the collision detection kicks in. For the first cloth vertex down and three up, no cube corner passes the cloth polygon. Nor does this happen when the second and third cloth vertex come down. But when the forth cloth vertex comes down, all four cube corners pass the cloth poly. Collision detected! And that forth vertex is put back at the offset height above the surface.

Why is the image showing things a bit different then?
That is because the renderer is smoothing and slightly curving the surface, while the sim calculations do not. When I connect the lower left corner of the cloth and the upper right one b a straight line, the upper left cube corner will be underneath. The Poser preview hardly smoothes either. As a result, the renderer might show poke-through while the preview does not, or the other way around, while the sim thinks it’s doing fine given the options checked and the time and step sizes that the calculations was allowed to use.

Why aren’t the lower vertices falling down anymore? What makes this a stable solution?
So I tried again, different offset (5cm). The preview shows that this is about the minimum distance of the cloth above the surface, but above the surface only. Over the edges of the surface, the vertices are looking down at the ground. The sharp fold is smoothed out in the render. End 100 frames later, the solution is not that stable after all, and the cloth sails to the ground.



By just expanding the box I made the cloth fall right onto the surface. All issues were gone, and all four cloth vertices ended somewhat above the cube surface, at a distance dictated by the Collision Offset for the cube.

Now I was a bit curious to the cloth self-collision mechanism. Two simple four-vertex cloth pieces ended up on top of each other. One at the offset distance above the cube. The second a 7cm distance above the first, a distance that did not change whatever parameter I adjusted.

However, such a thing did not happen when I used two pieces of cloth with a high resolution of vertices (100×100 quads instead of one), it did not happen when a third piece of cloth was added to the sim, and also more elaborate setups did not show this hovering behavior any more.

In other words:
watch out for the overly simple pieces of cloth. A piece of 10,000 polys behaves different that a piece of one poly.

Dynamics III – 3.6 Sim calculations on the Cloth Mesh

After working a while in the Cloth Room, people feel that mesh structure and mesh density make a difference. The 3D mesh of the cloth element in the sim does affect the result, the dynamic behavior of the cloth and the calculations themselves. Some believe that the mesh in a way is translated to a mathematical simulation structure. Such a structure, in mechanical simulations, can be thought of as a “ball-and-spring network”. The balls take mass and some friction and damping, the springs take stretching and folding forces and the like, and some damping as well.

I’ll give the mere details of such sim structures in Crash Course on Physics… (part V), and present some summary in this chapter.

In the meantime people question: will the mesh be triangulated first, will it be subdivided first, or refined during the process when necessary? The answer, to my understanding, is: NO. The 3D mesh IS the structure. The vertices of the mesh become the balls, the edges become tension springs that resist elongation (so you’ve got to apply a pulling force), and between two adjacent or opposite edges we can find torsion springs that resist rotation (so you’ve got to apply torque). That’s about it. Period. Cloth has no equivalent for compression springs which resist shortening. I cannot shorten a cotton thread by pushing against its ends, can I?

So a coarse mesh with large polys, long edges, a few vertices will become a sim structure will long springs and large, heavy balls. And a fine mesh becomes a structure with many small balls and short springs. And tension springs are stiff, they cannot bend themselves, they can stretch only and shrink after being stretched first. Un-stretching is a better term better I think, they cannot really shrink but behave like fixed size rods when relaxed.

The connections between balls and springs are very flexible, but the springs around a ball are interconnected by torsion springs which limit the ball-and-spring poly in its deformations. I’ll discuss a load of examples further on, but the bottom-line for now is: if the edges lack in the 3D mesh, then the tension springs will lack in the sim structure, and the interconnecting torsion springs will be absent also. As a result, various mesh structures will behave different to various deforming forces.

Translated to Poser Cloth Room parameters, the balls take care of:

  • The dress’ weight, aka: mass, aka: Cloth Density and so the interaction with gravity
  • Air damping, aka the interaction with wind and atmosphere
  • Friction (Collision, Dynamic, Static and Self-), the interaction between cloth elements and the collision objects when not colliding but sliding along each other.

These parameters themselves will affect the behavior of the cloth, but for given parameters the mesh density and structure have no further impact. I’ll discuss these parameters in chapter Cloth parameters – sim side and Cloth parameters-real world. They make the cloth move, and might generate the forces for deformation, but do not determine the deformation of the cloth by themselves. These parameters, represented by the balls in the simulated mechanical network, represent the interaction of the cloth with its environment.

The springs cater for:

  • Fold, Shear and Stretch resistance
  • Stretch damping

These do determine the deformation of the cloth. The effect not only depends on the values of the behavioral parameters but also depends on the mesh density and structure. Given values will result in different effects for different meshes.

In addition:

  • Density and Air Damping are allocated evenly over the balls. Frictions are applied to those balls that make contact with the collision objects.
  • Shear and Fold Resistance are allocated evenly over the appropriate edge-pairs in the spring net. Quads, Hexes and X-tris have equal corners per vertex (quad:4, hex: 6, X: half has 4, half has 8 corners per vertex). Diagonal and Zigzag have 6 unequal corners per vertex: 2x 90° and 4×45°.
  • Stretch Resistance is allocated evenly over the edges, proportional to the edge length. So all springs stretch with the same percentage when the same force is applied. Mind that diagonal springs are longer than straight ones.

Forces in short

Stretching – means enlonging the tension spring by pulling. When it’s stretched, reducing the pulling force shortens the spring until it’s relaxed again and it won’t shorten any further. When I pull, the spring pulls back. As long as I pull harder than the spring, it keeps on elongating. When it’s got longer, it pulls harder until we pull equally hard (in opposite directions) and reach equilibrium. From natures laws, the forces applied are then proportional with (that is: a constant times) the relative elongation of the tension spring. Relative, so it does take a specific force to elongate the cloth x%. If the same force is applied to a longer spring it will stretch more in cm but an equal percentage. The constant involved is the Stretch-Resistance.

When I hang a weight onto a tension spring and let it go, it will jump a bit up and down (springs always come with vibrations), but this mechanism will lose its energy and the weight will come to a rest. This speed of energy loss is Stretch Damping, which stops the vibrations in due time.
In a mesh, stretching causes two adjacent polys to stick in the same plane.

Folding – happens when the stretching springs cannot shorten any more, hence: the cloth is relaxed. Now the tension springs start behaving like incompressible rods, and any pushing will force two adjacent polys to go out-of-plane. The cloth is folding. But the two opposite edges are connected by torsion springs, which resists any change of angle, with a force proportional to the angle of deformation. The constant involved is the Fold Resistance of the cloth.

In life, there are limits to folding and stretching cloth, as it may tear, the threads in the weave may snap, there is mainly resistance against folding at high speed but not when doing things slowly, and the folding springs might cause vibrations which require damping as well. Poser does not support all that.
But Poser does support the concept that Folding and Stretching are opposite phenomena. I cannot stretch and fold the cloth in the same direction (or better: opposite directions) at the same time. As hanging curtains show, I can stretch vertically (weight, gravity) and fold horizontally. For folding vertically, the gravity has to be countered first.

So I put my hands on a piece of cloth on the table, and move my hands in opposite directions, away from each other. That’s stretching. Moving them towards each other: that’s un-stretching first, then it becomes folding.

Shearing – happens when I fixate the cloth with one hand, and move it up or down with the other hand. A quad-poly will deform in a straightforward way: the angles between adjacent edges change though but all edges themselves keep their length. Note that this is the opposite of Stretching and Folding, where – for a quad poly – the angles between adjacent edges do not change but the edges change length (stretching) or not even that (folding). The counterforce by the cloth comes from torsion springs between the adjacent edges, they apply a force proportional to the angle of deformation. The constant involved is the Shear Resistance of the cloth.

In life, shear resistance in weaves is the result of the friction between adjacent threats in the cloth, depending on material, thread thickness and weave tightness. When this friction is high, you will have extra trouble bending and stretching the cloth as well, but it does not work the other way around: tablecloth does hardly stretch but shears well. And when cloth stretches easily one might expect easy shears too. This certainly holds for knits, but non-woven cloth like leather and rubber might be different. Shear for non-woven is something for the micro-fibers and molecules that make up the stuff.

Thicker threads
Let’s do some additional real life stuff: what happens when similar cloth gets made from threads which are twice as thick (diameter). For the thread itself, Weight per unit of length, Stretch Resistance and Shear Resistance will quadruple (2nd power) while Fold Resistance will octuple (3rd power (*)). But I will only need half of the amount of thread to make the same size of cloth, so finally cloth density, stretch- and shear resistance will double while fold-resistance will go fourfold: thicker stuff behaves much stiffer.

(*) folding a thread actually implies stretching the core and then make the bend. With a double-thick thread, the stretching itself goes against a four-fold cross-section and hence a fourfold stretching force, and against a doubled amount of stretching to make the same folding bend. That makes eight-fold. Also the bend itself faces a fourfold cross-section and a doubled amount of stretching. Doubling thickness makes eight-fold counterforces.

So, density, shear and stretch resistance behave the same when comparing A) one piece with double thick tread and B) two thin pieces of cloth put together. Relevant, as the latter occurs when I fold a piece of cloth at the edge and stitch things together to make a neat edge to a T-shirt or table-cloth or alike. Folding behaves different: two non-attached (!) thin layers have half the folding resistance of one thick layer. So my T-shirt edges might do something in between, when doubling cloth thickness I can go threefold here. How about the other parameters?

  • Air damping: thickening the thread will double the distance air has to travel around it, but we only need half the threads so cloth out of thicker threads will experience the same Air Damping. A double-layers piece of cloth on the contrary will experience double the Air Damping as the air has to flow through both pieces.
  • Stretch damping: any thread in a weave is made of many thin threads working in parallel. Doubling the thickness of a thread means a fourfold of thin threads in there, so I need four times the force to stretch the thread, and it loses energy four times as fast as each thin thread just continues its behavior. So as I need half the threads to make the same cloth, like stretch resistance, stretch damping will double when the cloth thickness doubles, whether it’s caused by thicker thread or by multiple cloth layers.
  • Friction: in Poser, the parameter values are determined by the materials the cloth and collision objects are made off, and size, thickness, density and the like are not included. So thicker threads or multiple layers do not affect these settings. In real life, weaving cloth with a thicker thread might give a rougher surface (more friction) with less contact to the object (less friction). Hence, no direct need for adjustments but do make some when you feel for it.

Weave tightness
Next to thread-thickness, weave-tightness is a cloth characteristic too. What happens when a loose weave is compared to a tight one, with say twice as many threads cramped in?

Again, the Frictions won’t change a bit. Density, stretch resistance, stretch damping, and fold resistance too will simply double for twice as many threads of the same thickness. Air damping sees twice the amount of threads too and will double. That is; double at least because a tight weave might block the air streams through the cloth far more. Will it go tenfold? More? Shear resistance will double at least too, twice the threads will experience twice the friction between them when shearing. But when the threads are really crushed together the threads will deform a bit, the contact surface between the threads increases, and the force that pushes those surfaces onto each other increases as well. Will it go tenfold? More?

Scaling
Let’s test the last way that can spoil our fun: if I take a cloth 1×1 m in size with 1×1 cm polys, and I scale it to 200%, and I compare it to another cloth 2×2 m in size with 2×2 cm polys (so: the meshes look exactly the same), will I get similar results?
Yes, I will. That saves the day, what I see is what I get.

Conclusion
When I want to consider thicker cloth (say: double), I can leave all Frictions as they are and raise all other parameters with the same relative amount (double also). This represents adding a second layer to the cloth.
When I want to represent single-layer cloth with a doubled thread, I raise the folding (till maximum fourfold) and reduce the Air Damping (till one-fold = no change) and alter the friction somewhat to my liking to represent a rougher cloth surface structure.
When I want to represent a single layer cloth with a doubled weave tightness, I raise the Air Damping and the Shear Resistance till whatever makes me feel comfortable.
When I want to represent a single layer cloth with a mixture of thicker threads and increased weave tightness, I just mix the two mentioned adjustments accordingly. For instance, I leave the Air Damping just at the doubled value (both methods sort of cancel out), and raise Folding and Shear Resistance.

Note that for non-weaves (rubber, fleece, leather, …) the concept of weave-tightness is rather meaningless. For those kinds of cloth materials, I just stick to the “thicker thread” idea when considering thicker cloth.

The other way around
Imagine, someone says: “these … are the parameters describing cloth material X”. Then do I need to know the thickness? First: no I don’t. Because we’ve seen that I can represent a thicker or thinner material by adjusting the density (that’s in grams per cm2) and all other parameters increase or decrease proportionally – except for the Frictions which don’t change at all.
Second: yes I do, so I can take it into account for additional fine tuning of the Folding, Shear Resistance and Air Damping adjustments as described above but also take it into account for adjusting the Collision Offset which emulates the cloth thickness in the final result.

Poser parameters

Up till now I discussed the phenomena Stretch, Shear and Fold as they are considered in math and physics theory. Great, we’ve got the idea now, haven’t we? But… is Poser really working that way?

No it is not. Like in real life, stretching, shearing and folding all come together in the result, I can’t have isolated effects (except for laboratory situations). So does Poser, and actually: it improves the believability of the sim outcomes.

Let’s refer to a previous example of the banner hanging down. At low parameter values it becomes visible that the result not only shows stretching but also some skewing (hence: shearing) and some folding too. And when I start playing with the parameter values, I find that altering the shearing resistance does effect the stretching of the cloth too, and altering the stretch resistance changes the shearing of the cloth.

In other words, the physical, real world behavior is determined by a mixture of the parameter settings. And the other way around, it will be hard to determine the proper parameter values by measuring real world values. Is all lost then?

No, some generic rules could be observed:

  • The total amount of stretching and shearing does not depend on the values for Fold Resistance or Stretch Damping. So, it’s only Stretch and Shear which hang together.
  • When the Stretch and/or Shear resistance is increased, the stretching will get reduced, in all cases and combinations.
  • While the Shear Resistance is smaller than the Stretch Resistance, the result is only determined by the Stretch Resistance. When the Shear Resistance gets increased above the Stretch Resistance the total stretching reduces further. Up till now I’ve not obtained any further understanding of the underlying mechanisms or principles.
  • The default is 50 – whatever it means, and noticeable differences in result require “order of magnitude” steps. Halving, doubling, tenfolding, like that. From 50 to 75 makes a difference, from 50 to 55 does not.
  • Within the range of normal values, that is: 5 .. 500 (tenfold up or down), each doubling of the Stretch Resistance about halves the amount of stretching (as long as it exceeds the Sheer Resistance). So when a value of 50 stretches the cloth 50mm, then a value of 100 will stretch the cloth about 25mm as expected from physics theory.