2
$\begingroup$

I hope this thread is not a duplicate since I have been exploring the subject for a few days and found no solution that works for me.

I have to export an animation in .dae format to use in SceneKit/Xcode for iOS. I have created a ghost made of sphere covered with a pinned cloth that waves (I have used wind force field). No armature, the only movement is a waving cloth simulation.

I have found that frames 82-116 are fine to loop them for a ghost idle mode. I tried to export it to .dae (Blender v2.79, default Collada / Better Collada) but the output file always contains static cloth instead of a waving one.

For a few days I have been searching the web to understand what exactly I need to do. I followed https://blenderartists.org/forum/showthread.php?387461-Bake-Cloth-to-game-engine and the workflow I have applied is:

  1. Bake the cloth simulation Bake the cloth simulation
  2. Select cloth and export to .mdd
  3. Remove the cloth modifier
  4. Select cloth and import the .mdd file

This is the result: import the .mdd file

Then, I export to default Collada .dae - but the output file contains static cloth. export to default Collada .dae enter image description here The same happens when I export to Better Collada .dae - the cloth is still not waving. export to Better Collada .dae

I also tried Mesh Cache modifier, following How can I bake the cloth simulation into keyframed vertices or shape keyed vertices? :

  1. Bake the cloth simulation
  2. Select cloth and export to .mdd
  3. Add Mesh Cache modifier

enter image description here

After I hit „Apply”, the cloth freezes. After I hit „Apply as Shape Key”, the cloth freezes and I have basis and singular shape key:

enter image description here

I don’t get it. What am I doing wrong? Is anything missed in my workflow? Is it a problem with export settings?

$\endgroup$

1 Answer 1

1
$\begingroup$

A collada file supports a static mesh, while an armature may be included to deform the mesh using some animation data. For a mesh deformed from a simulation, you need to use a file that supports an animated mesh, that is, different mesh data is used for each frame.

This can be done in files such as Newtek .mdd, a .pc2 pointcache file or an alembic .abc file. Both mdd and pc2 can be exported using addons available in the standard blender release that just need to be enabled. Alembic should be available in release builds, but as alembic support is compiled into blender, if it isn't available you will need to find a different copy of blender that has it included. Blender can use this exported data in the Mesh Cache Modifier for mdd and pc2 or the Mesh Sequence Cache Modifier for alembic.

$\endgroup$
3
  • $\begingroup$ Thanks for explaining theory in clear manner. Still, it is not answer to the problem I described. I need my workflow to be investigated in search of cause why output Collada file doesn’t include animation (despite use of .mdd or Mesh Cache modifier). As far as I know, elder versions of Blender didn’t support export of physics data to Collada see here. I work with v2.79 that supports default .dae (that allows Include Shape Keys) and Better Collada .dae (that allows Shape Keys and Animation). $\endgroup$
    – Magdalena
    Commented Feb 19, 2018 at 21:29
  • $\begingroup$ Well mentioning the modifiers may have been misleading, go with what I opened with - collada doesn't support animated meshes, your xcode project needs to read the mdd or pc2 file after you export it. The modifiers are more use as a way to check that your export is right or as a way to re-time or to duplicate the simulation in blender. $\endgroup$
    – sambler
    Commented Feb 20, 2018 at 7:46
  • $\begingroup$ Hi again sambler! After another week of research (I tried to check out whether I made mistakes in animating the cloth) I am now convinced that you are right. As far as I know Xcode supports Collada and Alembic. Still, after importing Alembic to Xcode, the developer doesn't see animated mesh. Mistakes? Perhaps best but meanwhile I can see animation of the mesh running in Unity (manually created .fbx and imported to Unity for test purposes). I have to admit that I even tried to convert .fbx to .dae but I failed since the .fbx file is missing some data needed for .dae to be created. $\endgroup$
    – Magdalena
    Commented Feb 28, 2018 at 22:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .