# How can I use hooks for cloth simulation?

I have attempted to hook the corners of a square piece of cloth at the 4 corners so that they can be moved. Below, the images show the vertex groups. "v1" to "v4" corresponds to each of the corners (proportionally weight painted) which are hooked to 4 empties. "pin" corresponds to the 4 corner vertices alone which are pinned as a group. When sim is played, the 4 corner vertices deform disproportionately as in figure. What am I doing wrong? Also if I attempt to move one of the hooks while actually running the sim, then when the next loop plays the sim repeats itself irrespective of any hook motion.

1 ]2

• Oops sorry you're right, for some reason it doesn't seem to work if you hook a vertex group, my attempt was with one unique vertex by empty. Using bones seems to work better, see my edited answer Commented Sep 30, 2020 at 5:34
• @moonboots Hey man sorry, but I didn't understand what you meant by "one unique vertex by empty". Do you mean you just hooked a single corner-most vertex with each of the empties unlike how I've weight painted in the first image? Is the pinning (second image) right - by grouping into a single vertex group? Also I can't see any of the older comments. Also do you mean weight painting the vertices as of my 1st image and using bones rather than hooks will be the best solution? Thank you for your effort!
– jais
Commented Sep 30, 2020 at 13:55
• yes I failed with your method but there are 2 alternatives, I'm going to edit and undelete my answer Commented Sep 30, 2020 at 14:03

Ok I think Nathan has solved the problem. Here are 2 other methods:

First an alternative with empties:

• Select each corner vertex and hook it to an empty (CtrlH > Hook To New Object).
• Select the 4 corner vertices and create a group that will be the pin group of the cloth simulation:

• Don' forget to put the Cloth modifier at the bottom of the modifiers stack, under the 4 Hook. Keyframe the empties, play the animation, bake if necessary:

Or you can use bones:

• Create an armature made of 4 bones, parent the cloth object With Empty Groups, select the armature, shift select the cloth object, switch to Weight Paint mode, paint a small surface on each corner for each bone:

• Create a new vertex group for the cloth pin, assign it the 4 corners:

• Keyframe the bones in Pose mode, play the animation, bake it if necessary:

file:

• Hey! actually the case ain't so. Are you sure the vertex groups i did and the pinning are right as mentioned? Would you kindly care to share your file here?
– jais
Commented Sep 29, 2020 at 23:07

I had no problem making cloth physics work properly with 4 hooks on a plane in 2.90. Here are the steps I took:

1. Create a plane, subdivide it 3-fold in edit mode.
2. For each corner vert, ctrl-h -> hook to new object.
3. Create a vertex group named "pin", select all four corner verts, assign them to that group.
4. Change the falloff of all hooks to "no falloff" in modifiers tab. Create cloth physics. Set the pinning group to "pin". Make sure that the cloth modifier is the last (bottom) modifier on the modifier stack.

Using vertex groups instead, assigning all vertices to all hooks and creating vertex groups to limit their influence, I again have no problems, although in this case, the ctrl-h interface is the easiest way to make your hooks and there's nothing to gain from vertex groups.

The reason that the mesh fails to react to the hooks on the second loop, or reacts incorrectly, is because of the physics cache. Blender isn't smart enough to realize that moving the hooks invalidates the cache. You can reset the cache at any time by starting and cancelling a grab operation on the cloth object.

File below contains the version created with vertex groups.

• Hello Nathan, actually what you show is the same method as the one I show. The question is, how would you do with a plane that has more subdivisions and each of your groups counts more than 1 vertex? Because it's his current situation and I was wondering if it could be solved... Commented Oct 1, 2020 at 6:41
• It works fine, which is easily testable by putting levels of subdivision before the cloth modifier. Applying subdivision so that I can limit the pinning to the four corner verts also works fine, although there's no point in hooking vertices that aren't pinned. I believe that OP is just having cache and rest state issues (cloth determines rest pose from first frame.) Commented Oct 1, 2020 at 7:00
• @moonboots And to clarify, the file I link uses vertex groups to limit the hooks, rather than assignment-- all verts are assigned to the hooks, even though the method you show is, in my opinion, the better (easier) way to hook. Because you described issues with that method, and I don't see them. Ver. 2.90 btw. Commented Oct 1, 2020 at 7:07
• yes, but the question is, is it possible to hook groups of more than one vertex and make it work properly? It seems to work with bones (I mean each bone influences a group of vertices), doesn't seem to work with hooks Commented Oct 1, 2020 at 7:11
• @moonboots Yes. It works with hooks using vertex groups of more than one vertex. pasteall.org/blend/b36d64d9a8c643d09fe0219bdd83a919 Commented Oct 1, 2020 at 7:20