Blender: Baking cloth animation to vertex data


Advanced search

Message boards : Tutorials : Blender: Baking cloth animation to vertex data

Author Message
Profile Janus
Volunteer moderator
Project administrator
Avatar
Send message
Joined: 16 Jun 04
Posts: 4469
Credit: 2,094,806
RAC: 0
Message 12062 - Posted: 19 Oct 2013, 10:20:41 UTC
Last modified: 26 Oct 2013, 18:03:36 UTC

Cloth, fluid and other physics sims work if they are attached to the session as libraries (a feature currently not publicly available but being alpha-tested in session 1208, session 1476 and similar ones) or if they are baked to vertex animations or shape keys.

The reason why physics data is different from, say, image data is that Blender does not include the physics data in the .blend file but instead puts it in a directory somewhere on the local harddrive. When you upload the .blend it will then lose its physics data.

This tutorial shows you how to bake a cloth simulation to a vertex animation.

1) Set up your scene with a working cloth setup like you usually do
2) Make sure that the cloth does not have a global loc/rot/scale (as this may mess up the data) by applying it to the cloth (object->apply->location + object->apply->"rotation and scale")
3) Bake the cloth in Cloth->Cloth Cache->Bake
4) Inspect the result by moving through the animation with the timeline slider
5) While still having the cloth selected, select File->Export->Lightwave Point Cache (.mdd) or File->Export->Pointcache2 (.pc2). If you do not have these addons they can be enabled in the user prefs -> addons -> import/export -> mdd or pc2
6) Duplicate the cloth in place and hide the original
7) Remove the cloth sim from the dupe
8) With the dupe selected, select File->Import->Lightwave Point Cache (.mdd) (or similar for pc2)
9) You can now inspect the final result with the timeline slider again. Notice that all the animation data is now preserved inside the .blend-file as vertex animations.

A better way is to bake the animation to shape keys as it will produce smaller files, but that is outside the scope of this tutorial.

[Edit:] An example of a session made in this way is here: Session 1790


Post to thread

Message boards : Tutorials : Blender: Baking cloth animation to vertex data