Wind: getting the end frame to mimic the start frame

Hi, I’m trying to animate a model for a game (Glest, in case you’re curious), and the animation needs to loop because it will be played continuously. The part of the model that I’m animating is a flag, so I’m using a cloth modifier and a wind field to make it flap around. The problem I have is that, since I need it to loop, I need the start and end frames to be identical or very close to it. Is there a way to change the strength of the wind so it dies down at the end and the cloth returns to the original shape, or some other way to achieve what I want?

I also have a limited number of frames to work with, in case that matters, and I’m using Blender 2.49b.

I assume you can’t export the Blender physics to your game, so you’ll have to be using some form of “translation” to make the flag animation work in your game. Many flag animations, especially the looping type, use a form of vertex keyframe animation, commonly called morph targets, or, in Blender, shape keys (or RVKs – relative vertex keys – for the really old-time Blender users.)

In the Export menu, you can export a selected object’s animation as an MDD file. Use File>Export>Vertex Keyframe Animation (.mdd). You can then import the MDD data as shape keys on a duplicate of your cloth mesh but with the cloth modifier disabled or removed. Use File>Import>Load MDD to mesh RVK.

With the Cloth animation set up as shape keys, you can then duplicate your starting shape key as a final key, and manually build a transition from the last frame of the cloth sim to the final key (which matches the first key) by creating a series of intermediate shape keys.

To keep things manageable, you can probably use the frame-step option in the Import process to limit the number of active keyframes you’ll have to deal with. Creating the intermediate “synthetic” keys will take some careful choices of the number of steps it’ll take, and probably some tweaking with the Sculpt tools, but I think you should be able to get a good loop this way. Getting the loop to a certain frame count will take pre-planning, and once your loop is finalized, you can decide which keys work best and edit them into the proper sequence length.