6
$\begingroup$

I'm simulating a cloth. How can I bake the cloth simulation into keyframed vertices or shape keyed vertices?

$\endgroup$
7
$\begingroup$

If you want a single frame, see Mutant Bob's answer. If you want the entire cache, select your cloth object and export it as an .mdd or .pc2. You can then bring this cache back in using the Mesh Cache modifier, or you can import it as a series of shapekeys (1 for each frame.)

$\endgroup$
  • 1
    $\begingroup$ File > Export > Lightwave Point Cache (.mdd.) If the option isn't there, enable the addon under preferences > addons. But it should be on by default. I'm not sure if that exporter does the selected object, or all visible objects. If you try to import it and you get a vertex count mismatch, it's probably the second. In that case, you can isolate it by putting that object on it's own layer and turning off the other layers. $\endgroup$ – Drudge Sep 14 '15 at 22:57
  • 1
    $\begingroup$ Select your object, then go to File -> Import -> Lightwave Point Cache (.mdd). If you don't see it there, go to User Prefs and enable it under Addons. To save as FBX, File -> Export FBX $\endgroup$ – Drudge Dec 9 '15 at 19:41
  • 1
    $\begingroup$ also, you can import .pc2 to shapekeys with this wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/… ("import as file" from user preferences > addons), you'll get a shapekey for every frame, already animated: edit as you like $\endgroup$ – m.ardito Dec 9 '15 at 20:06
  • 1
    $\begingroup$ @Maxim sorry to be late, that link was truncated pasting it, here it is working (hopefully) wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/… (I tried this and it worked) $\endgroup$ – m.ardito Dec 13 '15 at 18:59
  • 1
    $\begingroup$ @Maxim as I said above, you should "import as file" from user preferences > addons $\endgroup$ – m.ardito Dec 13 '15 at 20:31
5
$\begingroup$

If you look in the Modifiers section of the properties you will see an Apply button (you probably don't want that one) and an Apply as Shape Key button. That's the one you want.

After you have turned the cloth shape into a Shape Key, you will have to go to the mesh section and dial up the influence of the new Cloth shape key to 1.0 to change the cloth into the shape that you "baked".

$\endgroup$
0
$\begingroup$

There is an alternate way which seemed easier for me, as I only needed 2 shapes. (I tried some other methods first.) 1. Simulate your cloth and bake as desired. 2. Duplicate the cloth mesh, move it slightly above. Remove cloth simulation, shape keys, ... to get just a plain mesh. 3. On the timeline, go to the frame you want for the cloth shape. 4. Select the duplicate cloth and add a Shrinkwrap modifier. Shrink to the original with the shape. For example, "project negative Z". Fine-tune until it looks right. 5. Apply the Shrinkwrap modifier as a shape key to the copy. It will be removed from the stack. You can test it by turning up the influence of the shape key. 6. On the timeline, go to another frame with a cloth shape you want. 7. Repeat 4 and 5 as many times as needed.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.