Search Unity

Cloth Questions/possible bugs?

Discussion in 'Physics' started by Foestar, Jul 26, 2019.

  1. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    325
    Am I missing something is the cloth component super buggy? I don't use the cloth much, or rather at all in fact. So I may just be missing the obvious despite not finding anything other than the "2018 cloth doesn't work" through google posts.

    I'm trying to add cloth to my mesh and pin it so my character has a working physics based sack around his lower body. The mesh is one sided, but the material's shader makes it double so it's pretty much a plane at this point exported from 3DS Max. I then add my sack mesh to the cloth object, add its material, then go to edit the constraints only to find no black circle as videos show where my mouse is over it.

    Manually selecting and changing them doesn't work either as the options are grayed out under the cloth constraints inspector. It's almost like it's being masked or something. I even read one older post saying they fixed their issues by resetting their layout but that did nothing for me.

    Anywho, any ideas or knowledge on the subject are welcome.
     
  2. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    250
    You're not alone.. I'm running into issues after updating to 2018.4.4 ... something bugged out.
     
  3. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    325
    I did finally get it working, literally did nothing different and it started to go. The paint mode is still bugged out, but the manual selection process works fine for me now when I click max distance/surface penetration. They no long stay grayed out. Not really sure why they started working, maybe resetting everything worked, I know I tried that several times. But alas, I'm pretty sure it was a bug.
     
  4. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    250
    I ended up copying the one cloth game object that was working and deleted the other broken ones.. cloth is buggy :(
     
    Foestar likes this.
  5. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    325
    Yeah, I'm hoping they have some upcoming much needed updates to this feature to help it. Shouldn't have to do a custom work around just to get a built in feature to work.
     
    indieDoroid likes this.
  6. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,618
    Yes we've also been having problems with cloth in 2018.4.x...Have had to write a bunch of scripts to get around most of them.
     
  7. danUnity

    danUnity

    Joined:
    Apr 28, 2015
    Posts:
    17
    I am using 2019.2.0f1 and the cloth system is still pretty buggy... It literally explodes my mesh when I add any constraints on the particles ... Also when editing the particles, they are too big when the mesh is at the proper size for physics and sometimes they disappear when editing. Basically nothing works...
     
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,497
    Had a whole bunch of problems trying cloth out today. Figured it would've all been fixed since the last time I checked a year ago. Figured wrong.
     
    soleron and awesomedata like this.
  9. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    250
    Hi @SeanParkinson , just wanted to include you in this thread regarding physics bugs too.

    Thanks for looking into it!
     
  10. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    16
    Hi, the fix for the exploding mesh didn't make it for 2019.20f1, it has just landed recently.

    I've also added code to allow the constraint size visualisation to be varied. This has just landed recently too.
     
    Foestar, AndrewRH and indieDoroid like this.
  11. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    250

    @SeanParkinson Awesome! Thanks a lot for supporting these bug fixes! BTW Will there be any support for us 2018 users? :rolleyes:
     
  12. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,618
    Fabulous!
     
  13. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    250
    Hi @SeanParkinson I put together a video of what's happening to me when I make a simple cloth. Is this the same kind of behavior other people are having?


    I'm on Unity 2018.4.6f1

    You can see that I tried to edit the bounding box, but was not able to and the bounding box gets offset the more I move the game object AWAY from 0,0,0 :oops:

    I also just noticed that the bounding box affects visibility.. You can see the offset bounding box directly affects the cloth objects visibility. Also the bounding box gets offset that much is .... I suspect has to do with the child inheriting the Root Bone's parent position, rather than the cloth objects local position? That's my best guess

    Here you'll see the cloth constraints are being offset in a strange way :eek:

    Thanks for the support!
     
    Last edited: Nov 15, 2019
  14. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    UI still broken in 2019.3.0f6

    Apparently the "max distance visualization" and "manipulate backfaces" allowed the display of the cloth verts BUT I cannot paint the verts easily because the brush radius seems to be snapping weirdly to some invisible grid. I'm painting on a sub-object in a prefab and my brush cursor is just wacky and not moving to the correct place...

    Also, my character disappears when I bring him to the origin and it displays a bounding box and breaks my mouse panning using middle-mouse..

    PLEASE fix the Cloth UI -- This thing is so broken! D:
     
    Last edited: Feb 16, 2020
  15. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    Alright -- I think I've narrowed down at least ONE of the bugs.


    Can confirm this still happens on 2019.3.0f6 using custom Blender mesh.

    Steps to repro:
    1. -- Import an .fbx with any number of submeshes (i.e. cape submesh)
    2. -- Drop model straight into the scene view (position its root GO at 0,0.0 -- anywhere else makes things go NUTS.
    3. -- Check all the bounding boxes are correct.
    4. -- Add a cloth component to any submesh (i.e. to the cape submesh) and witness bounding box bug-out for that particular newly-clothed submesh.
    5. -- Try to edit cloth constraints and see (usually HUGE) bounding box wreck the ability to paint the cloth, and if you're much farther away from the origin, watch the UI just go nuts
    @SeanParkinson -- Please look into this.

    EDIT: This issue has been around since 2016!!!
    https://answers.unity.com/questions/1149101/why-does-adding-cloth-component-to-skinned-meshren.html

    And I would have to agree with one guy's post that just because this checkbox "fixes" the broken giant bounding box / zoomed constraint painting issue, "Update When Offscreen" is NOT a fix. It's a workaround. And it's not even close to expected behavior.

    Does Unity even HAVE a QA department?? -- If so, do they even look at the builds??
     
    Last edited: Feb 16, 2020
  16. mcmount

    mcmount

    Joined:
    Nov 15, 2015
    Posts:
    56
    The cloth has been broken for a while, some versions it has been working, like 2017.3.1f1. One workaround is to disable the cloth object compression. Painting is nearly impossible, it's more like trial and error to get it to work. When you do, the cloth behaves like a balloon. I don't really understand the problem with so many versions. I'm at 2019.3.06f and STILL having these issues... and the culling & scene cam angle....really this bad for so long...?
     
  17. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    252
    Cloth work for me on Unity 2019.3.1f1. You may have to redo all your cloth to get rid off the errors. That's what I was doing to have no more bugs.
     
  18. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    59
    Can also confirm that with latest 2019.3.1f1 it kind of works, but for sure not all bugs are fixed, e.g. using max penetration does not, the editor sometimes doesn't work, and I have still some huge force impacting some of my cloth meshes (those which have a skinned mesh controlled by bones).
     
    awesomedata likes this.
  19. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    This problem is what is impacting me the worst. I'm not sure it's a "force" but rather a scaling issue. The cloth seems to fall and move around in a big spherical area around my character. Were you able to get it working at all with your character? -- Also, have you reported a bug for this? -- It's kicking my butt too, and I had no idea it was related to bones..

    Even with all that, the UI is still ridiculously broken.


    I tried this, but no dice. That weird force described above is causing my major headaches (even after managing to wrangle the UI into some semblance of order.)

    All my cloth verts swirling around my character like an unholy storm of locusts at the end of days is rather terrifying to say the least. I really wouldn't consider this "working" -- and neither should either of you. Cloth has been an issue since 2016 -- at least that's the first time I tried to use it and failed, finding it to be a broken mess -- even back then. At the time, I wrote it off as growing pains -- but now, we're in 2020 and Unity can't even get the damn UI working?? This is nuts to me. "Unity has new and better things to do with DOTS and all the other awesome and exciting features planned" is no longer an excuse for this level of half-assery and neglect.
     
  20. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    59
    So it's supposed to be fixed in 2019.3.1f1, in 2019.3.06f cloth was still completely broken, and I can confirm that it works better now, I still have issues with bones driving the mesh, but need to do more tests, before I try to reopen the bug https://issuetracker.unity3d.com/is...93.1688744634.1580502394-799769757.1544889688
    Don't even know how to reopen a bug, though.
    If you have completely destroyed cloth, you should definitely upgrade to lastest, which will help.
     
  21. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    59
    So it's supposed to be fixed in 2019.3.1f1, in 2019.3.06f cloth was still completely broken, and I can confirm that it works better now, I still have issues with bones driving the mesh, but need to do more tests, before I try to reopen the bug https://issuetracker.unity3d.com/is...93.1688744634.1580502394-799769757.1544889688
    Don't even know how to reopen a bug, though.
    If you get completely destroyed cloth as you describe, you should definitely upgrade to lastest, which will help.
     
  22. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    I am on that version -- I upgraded for this exact reason -- and it's still just a mess of exploded verts whirling around my character. :(


    If you want to confirm an issue and need some quick models, grab a game character with a cape off the models resource website and put cloth on one of its submeshes. In my case, I have the cloth submesh parented 100% to the upper-chest bone in an FBX and I get all sorts of issues.

    I broke my UI appearance altogether by constraining all my verts just to see what it would do in play mode. Now I can't get the UI back at all. :mad:
     
  23. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    59
    Ah, you still need to switch off mesh optimization for the FBX. And you cannot use surface penetration, as it's till broken.
     
  24. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    Not using either of those. Still nuts... D:

    To get back my UI, I was able to switch to the other mode and then back to constraint painting mode. The UI reappeared.
    GAH wtf!!
     
  25. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    193
    I feel sorry to have to use this garbage and wasted half my day trying to make this work. . Is there an alternative other than Havok?
     
  26. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    993
    ObiCloth is a pretty decent alternative, but it took me a whole week of experimentation to get a simple cape on a skinned character mesh. Despite this, I still haven't figured out the ins-and-outs of the physics side of it. It is definitely NOT for the faint of heart.

    Maybe you'll have better luck than me.

    Be wary though -- documentation is outdated on most subjects, workflow has entirely changed, the example scene led me way away from what I was trying to do with a simple cape in regards to what components to use and how to set them up (as well as the skinned model), and weight painting appears to be a tad buggy in 2019.3 -- but it is functional after you get past the enormous complexities and study it very carefully to understand the concepts. Sadly, it is the only alternative I could find to get anywhere near a basic Cloth authoring component in Unity. So far, the experience hasn't been fun, but it is at least functional. That's more than I can say for Unity's cloth component. :(
     
  27. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    59
    I basically tried all alternatives; Magica Cloth works good, but simulation does not look very realistic. Obi Cloth looks better, but is pretty slow and hardest to setup. There is a plugin which is not on the asset store (due to a very high price) called deformer, which works pretty good.
    Unity cloth would for my liking be the best of the bunch, if it would work 100% (or at least 80%)....
     
    awesomedata likes this.
unityunity