2
$\begingroup$

I'm attempting cloth animation in Blender and exporting to Unity. My process is as follows:

-Pin one point of the cloth (for it to dangle from) and then apply armature motion to that pinned point

-Simulate cloth physics and export the resulting vertex data as a point cache (.mdd)

-Duplicate the cloth, remove physics, and import point cache data (basically a physics bake)

The animation works perfectly in Blender like so: enter image description here

However, when it comes to importing to Unity, something in the export/import process introduces stutter like so:

enter image description here

Any help debugging this problem would be greatly appreciated.

$\endgroup$
3
$\begingroup$
  1. Leave 'Rig / Animation Type' on 'Generic'
  2. Switch to 'Animations', deactivate both 'Resample Curves' and 'Anim. Compression'-checkboxes
  3. Switch back to 'Rig / Animation Type', select 'Legacy'
  4. Click 'Apply'
  5. Check the Animation-Preview - no stuttering!
  6. Drag the FBX onto the scene-view-window
  7. IMPORTANT: click 'Revert' rather than 'Apply' when asked whether unapplied import settings should be applied

Downsides:

  • No 'loop / ping-pong' etc. functionalities (I'll try to create a script-based-solution as a workaround)
$\endgroup$
1
$\begingroup$

Not 100% sure yet, but I guess I found some sort of a workaround to this issue... First, import the FBX with the baked-in cloth-animation into Unity, leave the 'Animation Type'-setting on 'Generic'. Uncheck 'Resample Curves', then apply the changes. If you preview your cloth-animation, it should play back as supposed to - for now!

In order to 'access' the animation, we need to re-set the 'Animation Type'-setting to 'Legacy', though. This very step would always destroy my 'fluid' animiation.

So I re-imported the FBX, didn't change the 'Animation Type'-Setting, drag-and-dropped it onto the scene. Now I'd delete the 'Animator', then add the 'Animation'-property.

Now I went back to the imported FBX, re-set the 'Animation Type' to legacy - and it didn't mix things up! It does play back the cloth-sim perfectly fine!

I'll try to write-up a detailed step-by-step guide later on. Hope this helps anyone else who has been looking for a solution to this problem...

Pardon the bad grammar.

$\endgroup$

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.