2
$\begingroup$

I want to bake the soft body animation that can be placed in unity or unreal. I also need the animation to loop. I know that you can you do loop key frames in graph editor. Is that possible with shape keys?

$\endgroup$
  • $\begingroup$ there is some issue with location transform, when origin is not set to 0,0,0. The imported mesh will be allocated. $\endgroup$ – ms.button Jul 14 at 16:40
4
$\begingroup$

To convert a Soft Body animation into shape keys you can use the MDD importer/exporter. The Export option exports the soft body animation to a file and the Import option imports the file into a set of shape keys, along with keyframes to automatically control the shape keys to maintain the animation.

First, use the User Preferences option to enable the MDD importer/exporter addon by opening the Add-ons tab, typing 'MDD' into the search and enabling the Import-Export: NewTek MDD format add-on.

addon

Next, select your soft-body object and use the 'File/Export/Lightwave Point Cache (.mdd)' option, specifying a filename to export the animation to.

Once exported, use the 'File/Import/Lightwave Point Cache (.mdd)' option to import the animation. This will create a set of shapekeys with keyframes. The keyframes automatically adjust the shape keys influence so as to activate/deactivate them to animate through the frames of the animation. At this point you can remove the Soft Body simulation.

shape keys

You can adjust the keyframes on the shape keys to effectively 'blend' the animation at the start/end.

Here is a fantastic answer which uses a similar technique except that it uses a Mesh Cache modifier in place of the 'Import' step. By using two modifiers (with offset frames) the animation can be more easily blended at the start/end of the animation : https://blender.stackexchange.com/a/10661/29586

$\endgroup$
  • 1
    $\begingroup$ thank you so much!!! i got it to work! i really appreciate the answer! $\endgroup$ – Stephanie E May 4 '18 at 1:21
  • $\begingroup$ @Ste I don't know about the speed of the mdd import/export, but you can also continuously apply the modifier as a shapekey. $\endgroup$ – Leander Jun 1 '18 at 9:47
  • $\begingroup$ not at the computer right now but does the import add-on support cache with a stride? (saved every nth frame). Since it's a lot of shape keys, some simulations where nothing changes abruptly could use some interpolation $\endgroup$ – Nicola Sap Sep 16 '18 at 7:42
  • 1
    $\begingroup$ @NicolaSap Afraid not - although it would be feasible to write a script to remove all but every nth shape key and adjust the keyframing to blend between frames to interpolate. $\endgroup$ – Rich Sedman Sep 16 '18 at 8:22

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.