5
$\begingroup$

I'd like to know how the Cloth Stiffness Scaling option works. It can be found in the Cloth Modifier's Physics Panel; however, the manual doesn't mention this feature at all. How does the Cloth Stiffness Scaling option work?

More specifically, I'd like to use cloth simulation to model a shirt with a stiffish collar. I tried weight painting the collar and setting stiffness scaling to use said vertex group; however, I didn't see any change in the simulation. Additionally, the simulation doesn't prevent the intersection of itself and the collision mesh. Are there any tricks to improving this result?

$\endgroup$
  • $\begingroup$ I never used stiffness scaling, but it looks like setting Bending Stiffness to much higher values (5-10k) give better results. $\endgroup$ – Denis Jun 7 '15 at 18:09
  • $\begingroup$ @Denis The Max bending stiffness in the stiffness scaling section? Or the setting in the cloth section? When I set the max bending stiffness to 5000 it just kinda goes crazy.. $\endgroup$ – gandalf3 Jun 7 '15 at 19:15
  • $\begingroup$ I tried that in stiffness scaling $\endgroup$ – Denis Jun 7 '15 at 19:18
  • $\begingroup$ Are you referring to the "Bending" or "Structural" parameter? Or another stiffness parameter? $\endgroup$ – Luis B Jun 22 '15 at 18:45
8
$\begingroup$

Cloth Stiffness Scaling

Q: How does Cloth Stiffness Scaling work?

A: Basically, you just (1) Create a Vector Group from the Plane, (2) Weight Paint each half of the Plane red/blue, (3) Then set the min&max values for Bending stiffness to 0.0001&1000.0. You can test it with a cloth falling over a collision sphere. The following post aims to elaborate on this explanation.


Feature Functionality

According to the Documentation for Blender 2.4, the Stiffness Scaling feature allows a vertex group to have a different bending/structural stiffness value for each vertex within the vertex group (as opposed to the same bending/structural stiffness value for each vertex). This requires working with "Vertex Groups" and "Weight Paint" features.

Blender 2.4 Docs: http://wiki.blender.org/index.php/Doc:2.4/Reference/Panels/Object/Physics/Cloth#Stiffness_Scaling


Same Stiffness Values

The usual way to apply (bending/structural) stiffness values to a vertex group (or a plane mesh), is to apply a "Cloth" Modifier to a Plane Mesh (hopefully, well subdivided) via the "Modifiers > Add Modifier" Panel. Once the Cloth Modifier is applied to the Plane Mesh, then you can set the "Structural" and "Bending" stiffness values via the "Physics > Cloth" Panel. For example, you can set "Bending" to 0.0001 to be very silky, or you can set "Bending" to 1000.00 to be very leathery. Now all of the vertices within the Plane Mesh will have the same stiffness values.


Different Stiffness Values

Now, let's say that we want each of the vertices (of the Plane Mesh) to have a different structural/bending stiffness value. In this example, we want the left half of the cloth to have 1000.0 "Bending" stiffness and the right half of the cloth to have 0.0001 "Bending" stiffness (aka, leathery on the left and silky on the right). To do this, we will need to work with the "Vertex Groups", "Weight Paint", and "Cloth Stiffness Scaling" features.

First, we want to group all of the vertices from the Plane Mesh into a Vertex Group. To do this, we "add a new vertex group to the active object" via the "Data > Vertex Groups" panel (in this case, the active object should be the Plane Mesh). Once the new Vertex Group is created, it should have a default name of "Group". Feel free to re-name it to anything you want -- I will rename it to "Cloth_Group_001". Now, we've created our Vertex Group! Great Job!

Vertex Groups Panel

Second, we need to Weight Paint the Vertex Group of the Plane Mesh (aka, "Cloth_Group_001"). Weight Paint controls can be accessed by changing "Object Mode" (or "Edit Mode") to "Weight Paint". Now, you will be controlling an interactive brush with a "Weight" between 0.000 to 1.000, a "Radius" between 1 to 200 pixels, and a "Strength" between 0.000 and 1.000. Paint the left half of the Plane Mesh to Red (aka, Weight=1.0), and paint the right half of the Plane Mesh to Blue (aka, Weight=0.0). ((I suggest using a Strength of 1.0, and choosing an Radius Size that is comfortable for you)). Now, you should see the left half colored Red and the right half colored Blue. You've just Weight Painted the vertices in your Vertex Group (of the Plane Mesh)! Great job!

Weight Paint Tool

Finally, we can go back to our "Physics > Cloth" and "Physics > Cloth Stiffness Scaling" panels. Using these Cloth panels, we are going to set the minimum value for "Stiffness Scaling" and we are going to set the maximum value for "Stiffness Scaling". We first need to enable "Cloth Stiffness Scaling" via "Physics > Cloth Stiffness Scaling" panel. Now that stiffness scaling is enabled, we want to set a minimum and maximum value for our "Bending" stiffness values for "Cloth_Group_001" (note: we can do the same thing for our "Structural" stiffness values, but this example will only demonstrate the min and max for "Bending" stiffness values). To set the maximum value for our "Bending" stiffness, we need to select "Cloth_Group_001" from the dropdown-menu under "Physics > Cloth Stiffness Scaling > Bending Stiffness:" and then set the max-value for the "Bending Stiffness" to be 1000.0 (you can set this to anything you want, we will use 1000.0 in this example). At this point, be sure that you did both: set the Vertex Group and set the Bending Stiffness "Max:". The last thing you need to do in this section is set the minimum value. To do this, we need go to the "Physics > Cloth" panel and set "Bending:" to 0.0001 (this will serve as the minimum bending value, whenever "Cloth Stiffness Scaling" is enabled -- which you already enabled earlier). You have now set the min and max values for the Vertex Group's Bending Stiffness (Remember that the Vertex Group of your Plane Mesh is re-named to "Cloth_Group_001" for this example). Great job!

Cloth & Cloth Stiffness Scaling panels

To conclude, let's try to understand what we just did. We basically set the Red-Painted vertices to 1000.0 and the Blue-Painted to 0.0001. This is because 1000.0 (maximum) maps to the "Weight"=1.0 from the "Weight Paint" earlier; similarly, 0.0001 (minimum) maps to the "Weight"=0.0. Note that anything that is painted between Red or Blue (e.g., Green/Yellow/Orange) has a Weight in between 0.0 and 1.0; this means that Green/Yellow/Orange will have a Bending Stiffness between 0.0001 (minimum) and 1000.0 (maximum). In our case, we should only have the left half of the vertices painted Red and the right half of the vertices painted Blue; this means that the left half of the vertices have a Bending Stiffness of 1000.0 and the right half of the vertices have a Bending Stiffness of 0.0001.

That's it! Now you have each vertex with a different stiffness value.

(Note: If you want to change the stiffness for every single vertex in your cloth, just use a different Weight value for each vertex while "Weight Painting".)


Testing

You can take my word that this works, but I'm sure you're eager to see it work for yourself. I would add a Sphere under the Cloth, and add a Collision Modifier to it. Have the Cloth (aka, Plane Mesh) above the Sphere so that when you begin Simulating/Animating it will fall under the force of Gravity and drape the Sphere. Remember to have "Cloth Collision" enabled via the "Physics > Cloth Collision" panel (optional: feel free to enable "Self Collision" as well).

Now, you can press the "Play Animation" button (towards the bottom of the Blender UI) and see the results of the Cloth falling over a Sphere and draping it. You will notice two (2) things:

  • The right half of the cloth will want to hug/engulf/fit the sphere, since the right half of the Vertex Group is silkier ("Bending"=0.0001).
  • The left half of the cloth will want to try to "spring" back into a planar shape and definitely NOT hug/engulf/fit the sphere as tightly as the other half. (Aka, the cloth will be very stiff in this half; "Bending"=1000.0).

(Note: I've tested Cloth Stiffness Scaling with Blender 2.74, and it works perfectly.)


Conclusion

In conclusion, you will have a very stiff left half (due to the RED paint) and an extremely low stiffness on the right half (due to the BLUE paint).

Weight Painting for Cloth Stiffness

Does this make sense? Any questions, comments, or feedback are welcome.


References

This link explains one user's struggle and eventual understanding of the Stiffness Scaling feature: https://developer.blender.org/T39371 . Feel free to open the "ClothStiffness2.blend" file referenced in the link, so that you can see a Blender Scene similar to the one example referred to above.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Simulating the Collar of a Dress Shirt:

Assuming you have a dress shirt that you want to simulate with Blender's Cloth Modifier. I would simulate the shirt with the Cloth Modifier; however, the shirt collar I would treat differently. In fact, I would personally want the shirt collar to be so "stiff" that it does't have any wrinkles in it. So if you aren't using any wrinkles in the shirt collar, then the question is: does the shirt collar experience any "stretching" or "shearing"? I don't think it would. In this case, I just wouldn't use the Cloth Modifier at all for the dress shirt collar.

At most (for simulation), I would treat it as a Collision Object (but I don't think it's necessary). I would just vertex-pin the shirt collar to another part of the shirt -- or even simpler vertex-pin to somewhere on the humanoid model's neck area.

If you still want to simulate the shirt collar with the Cloth Modifier, then you are going to want to make the shirt collar "extremely stiff" for bending (you probably don't want wrinkles), and very stiff for stretching/shearing (assuming you aren't expecting too many stretching forces or shearing forces to act on the shirt). That said, if you want to use high stiffness values, then your simulation will probably explode (aka, "goes crazy") -- unless you increase the number "Simulation Steps per Frame" to an extremely high number. Increasing your Simulation "Steps" Per Frame will result in an extremely long simulation time -- it will slow down your simulation time from minutes to hours.

You can find more information about why you need to increase the "Steps", when you have high "Stiffness" here via Witkin & Baraff 1998. It talks about "how not to blow up": http://www.cs.cmu.edu/~baraff/sigcourse/slidese.pdf


Cloth Stiffness Parameters:

The bending stiffness is based on the Ko & Choi 2002 Wrinkling Cloth paper: http://graphics.snu.ac.kr/~kjchoi/publication/cloth.pdf

The structural stiffness refers to the stretching and shearing deformations. The parameter is based on the Provot Cloth paper: https://graphics.stanford.edu/courses/cs468-02-winter/Papers/Rigidcloth.pdf

More information on the Blender Cloth Implementation and Parameters can be found here: On what Cloth Simulation Model is Blender Cloth Physics Based?

| improve this answer | |
$\endgroup$
  • $\begingroup$ This is interesting information, but I don't see how it answers the question.. $\endgroup$ – gandalf3 Jun 22 '15 at 19:11
  • $\begingroup$ Very good point. I have added possible solutions now. $\endgroup$ – Luis B Jun 23 '15 at 16:14
  • $\begingroup$ Does this additional information/suggestions help? Any questions? Perhaps I didn't understand your original question. Any clarification/comments/questions are welcome. $\endgroup$ – Luis B Jun 23 '15 at 16:27
  • $\begingroup$ Well.. My question is that blender has a cloth stiffness scaling option which appears to be useful for doing just that (setting the stiffness of a vertex group). However it doesn't appear to be doing anything. $\endgroup$ – gandalf3 Jun 23 '15 at 17:29
  • 1
    $\begingroup$ No, just the stiffness scaling option. the only mention I can find of it is in the 2.4x docs, but it's still here in 2.7. It looks like it allows one to set a different amount of bending stiffness for an arbitrary group of vertices, but this doesn't seem to be the case. I can't see any indication of what is going on (even after examining the example file given as a response to this bug report). Does it let you do the opposite? (limit the amount of bending stiffness for a vertex group?) $\endgroup$ – gandalf3 Jun 23 '15 at 22:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.