# Convert physics to animation keyframe (Actions) in Blender

Problem:

I am trying to create a character in Blender and import it to unity. The character is like a blob, who has no bones for animation. I create any Entry animation like this using Physics in blender:

The blob is made of softbody. Now I want to convert the physics to an animation (Action) in Blender so that I can export this blob to unity with animation.

Things tried so far:

1. I exported the physics as an MDD file and then tried importing it again. Keyframes got created, I can see it in the Dope Sheet, but the action editor has nothing in it.
2. Also tried Object -> Animation -> Bake Action. It created Action, But there is no animation at all when I import in unity.

EDIT:

I exported .MDD file and used it on a different object using Mesh Cache Modifier. Now animation is playing and it's not based on softbody. I don't know how to convert the motion to keyframe.

• – batFINGER Nov 25 '19 at 11:16
• i already tried both of them, Not helping @batFINGER – leopragi Nov 25 '19 at 12:01
• according to Jaroslav Jerryno Novotny "You can't bake softbody into keyframes", and he gives a script to solve it, but it was in 2015: blender.stackexchange.com/questions/23563/… – moonboots Nov 25 '19 at 12:09
• Have you tried exporting .FBX file? – Digvijaysinh Gohil Nov 25 '19 at 12:14
• Yeah, I thought this might have some updates. That's why I posted this question. If it's not possible to bake softbody into keyframes is it possible to simulate a rigid body like a jelly material without using softbody modifier. – leopragi Nov 25 '19 at 12:16

Here are the steps you need to follow:

1. Let's say you created a simulation of physics on softbody
2. Select your object and export the file as MDD (This will export the keyframe as data to .MDD file)
3. Keep the object selected, Import the .MDD file you've exported.
4. Now if you see the Dope sheet there should be some keyframes on it. But you cannot see anything on Action Editor.
5. Remove the softbody modifier on your Object. (Hit Space, you should be able to see your simulation without the modifier)
6. Here is the key part, Now you have to convert the body to Rigid body to bake the keyframe to Animation(Action). Apply the rigid body modifier to the Object.
7. Make the Rigid body type as Active and animated (Checkbox). (Now Hit space, you should be able to see the simulation without the object falling down, Even though you applied Rigid Body modifier)
8. Now, go to Object -> Bake to Keyframe, I will take some time according to your mesh and simulation. But after finishing you should be able to see the keyframes on Action Editor.
9. As the last step simply import the .blend file to unity.

In the new versions of Blender (e.g. version 2.92) you can simply bake Rigid Body physics to Keyframes, and then do all exporting.

Just two easy steps:

1. Select objects you want to bake.

2. Object > Rigid Body > Bake To Keyframes

• Unfortunately this won't work for a soft body, which the question is about. – Markus von Broady May 18 at 9:52