Home Technical Talk

Deformation from Max Cloth to Unity3D?

wannabeartist
polycounter lvl 8
Offline / Send Message
wannabeartist polycounter lvl 8
Hi guys,

I'm looking for a way to get mesh deformation driven by cloth simulation in Max to Unity3D - has anyone tried this?

I'm guessing the animation has to be baked-in somehow first?

Thanks!

Replies

  • leslievdb
    Options
    Offline / Send Message
    leslievdb polycounter lvl 15
    i think you can use the point cache modifier for this. Not sure what formats export the vertex animation in a good way for unity though
    i think fbx does but i'm not sure
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks for the tip!

    Yes, FBX is what is used generally to get models and animation into Unity, but I have no earlier experience in getting Cloth-driven stuff out - I will look into Point Cache!
  • Mark Dygert
    Options
    Offline / Send Message
    Discussion about point cache, its expensive at times.
    http://www.polycount.com/forum/showthread.php?p=880762

    Discussion about converting a cloth sim to bones, much lighter and results are scalable, tweakable and loopable. Know that you can loop point cache data using morph targets.
    http://www.polycount.com/forum/showthread.php?t=66993

    Also other engines like UDK do realtime cloth simulations.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks,

    In the meanwhile I learned that Unity does not support vertex animation, so I guess that excludes point cache. The bones conversion sounds promising! Looking into that next!

    EDIT: Unity has Cloth simulation now, but I'm afraid it might be too expensive for character clothes (it's not really the main focus anyway)
  • commander_keen
    Options
    Offline / Send Message
    commander_keen polycounter lvl 18
    The cloth simulation should be at least as fast as having bones per vertex. Plus it should get disabled on low end cards that dont support it.
  • wannabeartist
  • thatanimator
    Options
    Offline / Send Message
    thatanimator polycounter lvl 6
    EDIT: Unity has Cloth simulation now, but I'm afraid it might be too expensive for character clothes (it's not really the main focus anyway)

    reading that makes what I'm about to say fairly redundant..but since I havent posted in a while, and as I have been accustomed to at work, "quantity over quality" so here goes :poly142:

    don't see why you'd want to bake out cloth simulation from one program and use as animation in unity..rather just animate joint driven cloth then?
    you want cloth physics because they are not animation, they are dynamic and wont stop moving just because the character has.

    but whatever, how about ragdoll joints or some other kind of dynamic joint chain solution?

    you seem to have figured out a lot after your first post, so Im sure you're on track! :D
  • Brendan
    Options
    Offline / Send Message
    Brendan polycounter lvl 8
    Within Unity:

    Select object (robe or whatever, fbx imports each separate mesh separately and nicely, so you can select which bits you want), then up top

    Components > Physics > Then there's 3 cloth options.

    Play around with those, they're PhysX driven, but you can mess with the physics rate with Unity's Time Manager.

    The only problem you MIGHT have is if you want them to physics with the body (like a sleeve on an arm), they (sleeve) MIGHT have to be double-sided. Unity Mesh Colliders have a strange tendency to do strange things occasionally, so watch out.


    Then there's a bunch of parameters to mess with, such as how stiff the material is, etc.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks for the input, guys!

    I'm still trying to avoid using Unity's cloth sim, because in this case, in-game simulated clothing is really not that essential and on the other hand the there's a lot of other things that could use the "saved performance".

    the idea of using cloth to drive bones seems like the best alternative right now :)
Sign In or Register to comment.