0

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: Bounce of blog

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.

Download my blend file

I am new two both unity as well as Blender, Please help me on this.

Thanks in advance.

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.

leopragi
  • 111
  • 1
  • 4
  • Related https://blender.stackexchange.com/questions/67762/is-there-any-way-to-export-soft-body-simulation-to-unity https://blender.stackexchange.com/questions/101935/cloth-simulation-for-game-engine-doesnt-get-animated-despite-shape-keys-have-be – 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: https://blender.stackexchange.com/questions/23563/how-to-bake-softbody-animation-into-keyframes – 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
  • Yes, I tried exporting .FBX. Not working with animation in unity. Basically exporting .FBX won't help if keyframes are not generated. @DigvijaysinhGohil – leopragi Nov 25 '19 at 12:17
  • I exported .MDD file and imported it using Mesh Cache Modifier, Now animation is playing without any simulations like softbody. But I still cannot use Bake to Keyframes. @moonboots – leopragi Nov 25 '19 at 15:58
  • Guys, I finally figured it out. (Without using any script, I ll post the solution soon) – leopragi Nov 25 '19 at 16:36
  • You just have to import the mdd back in the file>>import menu without the mesh cache modifier and then you can export it to fbx. (Select the object before importing). – FFeller Nov 25 '19 at 18:01

2 Answers2

1

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.
leopragi
  • 111
  • 1
  • 4
0

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

enter image description here

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
Yaroslav
  • 421
  • 2
  • 10