Cloth Simulation

I am trying to animate a cloth that is pinned and blowing in the wind, but I want it to blow away. I read that this can be accomplished with vertices weights but I could not find information on how to specifically accomplish this. Anyone have a clue?
Thanks, Collin

Couldn’t you just add a key frame where the cloth becomes unpinned? I have not tried it but I know there are very few parameters in Blender that cannot be key framed.

Alas, un pinning can not be keyframed for some reason.

Even though you can’t key frame pinning, what you can do, is use a frame_change event to re-write the value of the weight you initially assign to the pinning vertex group. This simple script sets the pinning weight to 1.0 when you rewind, the assigns it to 0.0 when frame #60 is reached.
cloth_pin
Here is the code, which is also in the .blend file.

import bpy

def reviewFrame(scene):
    current_frame = scene.frame_current
    print (current_frame)
    ob = bpy.data.objects.get("cloth")
    if ob != None:
        gi = ob.vertex_groups["pin"].index # get group index
        should_process = False
        if (current_frame==1): 
            weight_value = 1.0
            should_process = True
        if (current_frame==60): 
            weight_value = 0.0
            should_process = True
        if should_process:
            # Time to go behind Blender's back 
            # and boldly change data that can't be keyframed.
            for v in ob.data.vertices:
              for g in v.groups:
                if g.group == gi:
                    # Set non-keyframed pinning weight.
                    g.weight = weight value.
   
                       
###################################################
# Frame change intercept.
###################################################
def pre_frame_change(scene):
    reviewFrame(scene)
     
###################################################
# REGISTER code.
###################################################
def register ():
    bpy.app.handlers.frame_change_pre.append(pre_frame_change)

def unregister ():
    bpy.app.handlers.frame_change_pre.remove(pre_frame_change)

if __name__ == "__main__":
    register()

Open the file, play the timeline. Then run the script and play the timeline.
279_cloth_pinning.blend (106.2 KB)

Thank you. I will try to see if I can make it work. Thanks for taking the time to make this example and reply.

Collin