I'm simulating a cloth. How can I bake the cloth simulation into keyframed vertices or shape keyed vertices?
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".
$\begingroup$ Just a note since I was having a devil of a time finding it: In Blender 2.9, the buttons for applying a modifier are in the drop-down to the right of its view toggle buttons. $\endgroup$ Sep 16, 2020 at 5:25
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.)
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$– AscalonSep 14, 2015 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$– AscalonDec 9, 2015 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$ Dec 9, 2015 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$ Dec 13, 2015 at 18:59
1$\begingroup$ @Maxim as I said above, you should "import as file" from user preferences > addons $\endgroup$ Dec 13, 2015 at 20:31
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.