How to pin cloth vertexes to a bone/armature?

So that’s the question. I’d like to have, let’s say, a moving flag. I’d like to have a flag whose pole I can wave around and have the flag itself be dragged along with the pole.

I tried to assign all the flag (the subivided plane with “cloth” applied) vertexes to a group and put it in the armature modifier for the flag, but didn’t work. When I try bake the plane just falls of as if pinned by nothing. I also tried to set some pinning along with the armature but nothing seems to happen. The farthest I could go was to move the armature in pose mode and have the flag follow doing weird and unnatural deformations as if colliding with something invisible.

Here are some screenshots for beginning and end of baked animation.

http://img112.imageshack.us/img112/6872/boneandclothvy1.th.jpg


http://img112.imageshack.us/img112/2381/nextstagexe8.th.jpg

Thanks in advance.

If only there were more documentation about it…

Make sure you have assigned your vertex group. Then in the Cloth sim setup, click the Pinning of cloth button, make sure your vertex group’s name is selected and then Bake. As long as the cloth has been parented to a bone or each a mesh flag pole the pinned verts will stay “connected” to the parent.

If it helps here is a simple pinned cloth setup parented to a single bone. the Bone has IPO curves that move it and twist it over the first 50 frames. If you bake the cloth you will see that the pinned verts stay with the cloth.

ClothPin.blend (137 KB)

Also make sure that the cloth modifier comes after (below) the armature modifier in the edit buttons of the flag.

Hello DichotomyMatt.

Thank you for the explanation and the blend file. I had a similar problem/doubt couple of weeks back.

Cheers,
Satishg.

Thanks for the info!
Now I’m wondering if I can have multiple bones and multiple pinning of cloth (with multiple vertex groups of course) and assign the different vertex groups to the bones.
Is that possible?

@dsp_418: I did a quick test on the blend I posted. Just extruded another bone from the one that is in the armature. Used weight painting to control which parts of the cloth should be effected by which bone, setup a simple pose and action, then baked the cloth. The Cloth will deform with the bones, using the single pinned vert group. The Bones are bending that group so the cloth will follow.

Great!
thanks a lot DichotomyMatt, very helpful!

Sorry for bump this thread again, but I’m still fiddling around with the armature idea and multiple bones on a cloth object.
I’ve set up a basic armature with 4 bones, each one has its own weight paint.
But in the Pinning of Cloth option of the cloth object I can use one group per time, no more.
How DichotomyMatt have you got it to work?

@dsp_418: There is only one pinned vert group. The pining keeps that vert group from being deformed by the cloth sim. Your armature bones however, can deform the pinned group. You do not need separate pinned vert groups.

Multiple vert groups for armature, but only one can be pinned.

http://members.chello.nl/j.kassenaar/blender/forum/clothpin.jpg

How?
I see only one vertgroup can be pinnend in cloth. But I need multiple vertgroups to connect to armature?

Can anyone explain how to use the new cloth with armatures? I cannot get this to work at all. I am trying to put clothes on an animated figure.

But whatever I do either (a) there is no cloth effect at all (if I pin at 100%) or the cloth flaps around randomly and jumps. Also there seems to be no collision avoidance.