6
$\begingroup$

I'm trying to figure out what techniques there are for controlling/manipulating/deforming a cloth during cloth simulation. Specifically, I'm trying to mimic the effect of a woman "hitching up" her skirt before kneeling down (otherwise, her heel gets caught on the bottom hem):

Cloth sim with heel getting caught

I'm sure this sort of thing must be done a lot in practice. I just can't figure out how.

Here's are the possibilities I can think of for doing this:

  1. Pinning - Pinned vertices will stay in place. Apparently they can be weighted, and they can be moved with shape keys (although I haven't actually tried either). But to do the "hitching up", I need to turn the effect on and off via keyframes. And I'm already using pinning to hold the cloth at the waist, so I'd need to turn it on and off for only some vertices in the pin group.
  2. Armature - From what I can see, armatures (with weighted vertex groups) don't have any effect on the cloth during simulation.
  3. Collision objects - I tried having a small object move the skirt from the inside; this almost worked, but it quickly ripped through the cloth.
  4. Forces - The cloth is obviously affected by gravity. According to one tutorial, it's also affected by wind and turbulence. From my testing, it is not affect by a general force effector. Regardless, I can't figure out a way to use forces for what I want.
  5. Sewing springs - there might be a way to use these, although I'm already using them for something else, and there can only be one sewing spring vertex group.

Is there some clever use of the above that I'm not seeing, or is the answer something completely different?

$\endgroup$

2 Answers 2

8
$\begingroup$

Use a hook modifier with pinned vertices.

First, add the vertices you want to use to move the clot up to the same group as your other pinned verts (the ones that hold the cloth at the waist).

Now you need to add a hook object like an Empty in the region you want the cloth to move.

To your cloth add a hook modifier. Select the hook empty and the pinned vertex group. Set the radius to something small so it doesnt interfere with the sim until you need it to. Make sure the hook is above the cloth modifier in the stack.

Let the sim run.

Once it gets to the point where you need to manipulate the cloth, move the empty and the vertex group will be "pulled" alongside the empty.

enter image description here

$\endgroup$
5
  • $\begingroup$ Thanks @AdamTM, I'd forgotten about hooks. One question though: it looks like the hooked vertices will be pinned to the hook throughout the sim. I can keyframe the hook strength to 0, but then they'll just be statically pinned. Is there a way to return them to simulator control, so they fall freely when she "lets go"? $\endgroup$
    – Jabberwock
    Commented Jul 5, 2016 at 14:42
  • $\begingroup$ Did you try to keyframe the radius and change the fallof to sharp? $\endgroup$
    – AdamTM
    Commented Jul 6, 2016 at 8:08
  • $\begingroup$ no I didn't. I'm back to work now, so I won't be able to try it until tomorrow. But do you think this will have a different effect than setting the strength to 0? It seems like I need a way to change the vertex group, or at least the weights. From what I can see, there's no way to do either one. $\endgroup$
    – Jabberwock
    Commented Jul 6, 2016 at 16:35
  • $\begingroup$ I would think that when the hook leaves the influence radius it will stop exerting control over the vertices. But i guess it would make no difference since those verts will stay pinned. So i guess it would be best to split the animation into scenes and make another scene that picks the sim up from when you dont need the verts to be pinned to the hook. $\endgroup$
    – AdamTM
    Commented Jul 7, 2016 at 8:11
  • $\begingroup$ OK, thanks. It's not quite as good of a solution as I was hoping for, but it looks like it's as close as I'll get. $\endgroup$
    – Jabberwock
    Commented Jul 7, 2016 at 18:57
3
$\begingroup$

Addendum

The only problem with the accepted answer is that the hooked vertices stay pinned, as discussed in the comments. Even if the hook modifier is turned off, they won't return to "simulator control". The answerer suggests dividing the animation into separate scenes.

Here's another way around it, although it requires manual intervention; if I could find a way to do this with drivers or some-such, it would solve the whole problem.

This assumes that a "hook" has been added as described in the answer. It also assumes that the hook is active at the start of simulation and turned off later.

  1. Create vertex groups on the cloth, called (for example) unhooked and hooked1. unhooked contains all of the statically-pinned vertices. hooked1 contains those in unhooked, plus the vertices that will be pulled by the hook.
  2. In the Physics panel, enable Pinning. Initially set the pinning vertex group to hooked1.
  3. Starting at frame 1, play the animation to the point where the hook should be removed (keyframing the strength of the hook modifier to 0 in the few frames beforehand makes it look smoother).
  4. Set the pinning vertex group to unhooked. Note that this makes the cache out of date.
  5. Here's the main trick: click on "Current Cache to Bake", then "Update All to Frame", then "Free All Bakes". This restores the cache.
  6. Continue playback. The cloth sim should continue with the new vertex group.

Note that this is easily (albeit tediously) extendable to multiple hooks.

$\endgroup$
3
  • $\begingroup$ Hi @Jabberwock were you able to get this working by coding in Python? Or did you end up figuring out something completely different? $\endgroup$ Commented Jun 8, 2020 at 11:59
  • $\begingroup$ No, I didn't extend it past what I wrote above. I used it for a little proof-of-concept video, but I haven't done much with animation since then (yet). Lots of ideas, but no time to flesh them out. $\endgroup$
    – Jabberwock
    Commented Jun 9, 2020 at 23:18
  • $\begingroup$ Ah, that makes sense. Kinda wish there was a solution :) I wish there was a way of doing it in python. $\endgroup$ Commented Jun 15, 2020 at 20:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .