Home Technical Talk

[Modo]How to export MODO’s cloth animation(a soft body) into Sketchfab?

Antonyony
polycounter lvl 4
Offline / Send Message
Antonyony polycounter lvl 4
Hello,

I've created a flag animation and wanted to export it into external engines like Sketchfab.

As far as I learned the animation is a soft body. However I couldn't find a way how to bake a soft body.
The help describes the process for Rigid Bodies and Particles only: Baking Dynamics https://help.thefoundry.co.uk/modo/index.html#help/pages/simulation/dynamics/baking_dynamics.html?Highlight=Baking Dynamics

Can anybody help with this newbie question?

Replies

  • Antonyony
    Options
    Offline / Send Message
    Antonyony polycounter lvl 4
    I was able to export the animation into external MDD file and re-apply it to the original mesh:

    However I don't know how to  save it in FBX format for exporting into Sketchfab.
  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    As far as I'm aware, you can't just export a geometry/point cache or vertex animation to Sketchfab.

    It does support Blend Shapes and Joints though. So you'll have to somehow bake the deformations into these concepts.

    Unsure how to do that in Modo I'm afraid.
  • WilliamVaughan
    Options
    Offline / Send Message
    WilliamVaughan greentooth
    if you are looking for a static mesh you can Bake Geometry Cache which will generate a new mesh with the deformations applied.
  • Antonyony
    Options
    Offline / Send Message
    Antonyony polycounter lvl 4
    Axi5 said:
    As far as I'm aware, you can't just export a geometry/point cache or vertex animation to Sketchfab.

    It does support Blend Shapes and Joints though. So you'll have to somehow bake the deformations into these concepts.

    Unsure how to do that in Modo I'm afraid.
    James from  Sketchfab gave me the following answer:

    "If it's a MODO specific animation feature, it probably will not be correctly exported to FBX or be supported on Sketchfab. You will probably have to bake the animation into keyframes and/or use morph targets. Sorry I'm not an expert on animation or MODO... "


    if you are looking for a static mesh you can Bake Geometry Cache which will generate a new mesh with the deformations applied.
    No William,  I'm trying to upload the whole animation of the flag:





  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    Yeah that's what I expected then, also this is on their animation documentation:
    https://help.sketchfab.com/hc/en-us/articles/203058018-Animations

    So yeah, you can only animate a whole object using transforms, you can't upload a vertex animation. You will have to find some way to bake it to bones, or blend shapes. Below are some non-Modo specific actions you can perform in order to do this.

    You might look towards doing a script, where you:
    1. Cycle through all of the vertices on the mesh and create a bone there
    2. Cycle through all of the frames and continue to update the bone translations to the new vertex positions
    3. Simplify this somehow, 1 bone per 1 vertex is very intensive
    4. Skin the un-deformed cloth model to the bones, play with the weighting
    5. Playback animation to make sure it looks good
    6. Upload animation

    Some problems with this, in the simplification process you will improve performance but unless you're fairly clever about your bone positions and weighting, it'll look a little bit off.

    Alternatively, you can do blendshapes:

    1. Create blendShape0
    2. Store position 0
    3. Play forward N number of frames, maybe 10. Store position 1.
    4. Repeat creating blendShapes and incrementing the index until your animation is complete

    I'm unsure how to set up the blend shapes to playback in SketchFab in the order and speed that you want, but you can refer to the page I linked at the beginning of this post to see that.

    Unfortunately, I don't think there is a one button click solution to this. There might be some scripts available for Modo, I know that in Maya SOuP you can do a "Bake Arbitrary Deformation to Bones" process which will do process 1 above.

    Hope this helps

  • Antonyony
    Options
    Offline / Send Message
    Antonyony polycounter lvl 4
    Axi5 thank you for so extended answer! :) It could be a little difficult for me at this stage - I'm not a pro animator atm :(

    At the same time, I've found a guide for Blender, where a person somehow utilized MDD feature. I don't know Blender, but probable it could help to generate the same approach for Modo:

     Blender to SketchFab Top Tips
    Cloth simulation.
    Sketchfab does not support Blender's cloth simulation modifier so you have to turn the animation into shape keys. Once you're happy with your cloth simulation, select the object then export as a Lightwave Point Cache (.mdd). To do this you need to enable Lightwave Objects and NewTek MDD format in import/export add-ons in user prefs. Now remove the cloth simulation from your object and, with it still selected, import the .mdd file you created. Animation is now in shape keys which work in Sketchfab. Example: https://skfb.ly/VNr622

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    Antonyony said:
    Axi5 thank you for so extended answer! :) It could be a little difficult for me at this stage - I'm not a pro animator atm :(

    At the same time, I've found a guide for Blender, where a person somehow utilized MDD feature. I don't know Blender, but probable it could help to generate the same approach for Modo:

     Blender to SketchFab Top Tips
    Cloth simulation.
    Sketchfab does not support Blender's cloth simulation modifier so you have to turn the animation into shape keys. Once you're happy with your cloth simulation, select the object then export as a Lightwave Point Cache (.mdd). To do this you need to enable Lightwave Objects and NewTek MDD format in import/export add-ons in user prefs. Now remove the cloth simulation from your object and, with it still selected, import the .mdd file you created. Animation is now in shape keys which work in Sketchfab. Example: https://skfb.ly/VNr622


    I'm no blender user, but looking at the documentation, shape keys seem to be blend shapes/morph targets. Whatever you want to call them, the concept is the same. So if that script/tool doesn't work for you, you can try follow my steps above.
  • Antonyony
    Options
    Offline / Send Message
    Antonyony polycounter lvl 4
    I've found a solution:
     to upload a Modo's soft body into Sketchfab you should export Alembic file after cache simulation. SketchFab can read Alembic file  (including point cache animation)

    The result:
    model

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    Antonyony said:
    I've found a solution:
     to upload a Modo's soft body into Sketchfab you should export Alembic file after cache simulation. SketchFab can read Alembic file  (including point cache animation)
    Ah that's cool!

    It's annoying that I couldn't find an announcement about this feature, from a quick search all I found was an old forum post from 2016 saying it was experimental, and alembic abc listed on their import formats page.

    Cheers for your solution!
Sign In or Register to comment.