Search Unity

Cloth Constraints not working - can't paint or select

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

  1. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi @MelvMay
    After updating to 2018.4.4 cloth seems to have screwed up. I noticed my physics cloth objects were flying all over the place, after closer inspection it appears the cloth constraints were missing.

    Problem I have now is I can't paint anything.. the latest version of 2018 seems to have done something to cloth.

    Attached is a screenshot showing the issue

    Anyone have tips ?

    *UPDATE1*
    I ended up deleting my entire cloth and started from scratch, after that I was able to get the cloth constraints to show up.... So yea.. Just delete your old work and restart. That worked for me.

    *UPDATE2*
    If I try to attach this new cloth to my character, the transform coordinates of the character completely offsets the cloth "Bounds", moving the cloth object into some other space.. This didn't happen to me before updating to 2018.4.4 .. so beware guys.

    I tried to parent this object to other parts of the body, even not make it a child of the character game object. Nothing worked, the bounds just inherit transform values based off something. I'm not sure .. sucks that cloth is broken.
     

    Attached Files:

    Last edited: Jul 26, 2019
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    I am a 2D physics dev and I don't work on 3D cloth. Maybe @SeanParkinson can help?
     
    Last edited: Jul 28, 2019
  3. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Ok got it thanks!

    I ended up copying a cloth gameobject that WAS working and replaced the wonky ones.. it seems ok for now? But it seems like a really hacky way to do it ... hopefully someone at Unity is still working on the cloth systems?
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    Yes, it's certainly being worked on. Sean above is the person to help.
     
  5. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Great to hear thank you. Looking forward to the updates from @SeanParkinson ! ;)
     
  6. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    You're welcome.
     
  7. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi @SeanParkinson cc @MelvMay

    I'm also running into this weird problem with the cloth disappearing. Please check out the clip below with settings. Do you know what's causing this?

    I wasn't having this problem prior to updating to 2018.4.5f1

    Thanks
     

    Attached Files:

    Last edited: Dec 3, 2019
  8. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,500
    Again, I know nothing about cloth, sorry.
     
  9. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Haha ok sorry. I won't CC you anymore
     
  10. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    17
    Hi indieDoroid,

    Apologies for the late reply, I will look into these issues right away.
     
  11. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    We had the same issue in 2018.4.4 where we couldn't paint cloth vertices - selection seemed to work though.

    We fixed it by writing a script that recreated the hidden collider mesh - baked it from the SkinnedMeshRenderer. It seems that somehow the collider was in another part of the scene, so the raycasting for painting didn't work on it.

    I see in Unity 2019 this issue is solved - they've changed how the cloth collider/painting works and it's a lot better. Cloth sim seems slower in 2019 though, so we're still on 2018.4.4 for now.

    We also wrote a script to allow you to set the size of the spheres rendered for constraint painting as in our case they were way too big and there was no option to change this size. (Reflection FTW).

    Hope this helps solve it.
     
  12. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    Hi Sean,

    Thanks for getting back to us on it.

    I also seem to have run into some performance spikes with the physics cloth. Please find an attached screenshot.

    I'll do more tests to see how I can recreate it.
     

    Attached Files:

  13. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    17
    Hi,

    A fix for the bounds issue has just landed in 2018.

    A fix for flying cloth is about to land.

    Do you have a repro for the missing constraints issue that you can share, please?

    Thanks!
     
    AndrewRH likes this.
  14. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
  15. SeanParkinson

    SeanParkinson

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    17
    Hi Clive,

    This issue has just been fixed. It should make it to a release soon.
     
    olavrv likes this.
  16. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
    Got it. Thought that it was already released
     
  17. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    @SeanParkinson this is awesome! Thanks for supporting the cloth physics! Can't wait to update and test it out! Hope it solves my flickering cloth issue too :)
     
  18. CliveLewis

    CliveLewis

    Joined:
    Feb 20, 2017
    Posts:
    5
    Updated to Unity 2018.4.7f1. Issue is still there. Hope it will be fixed in next version.
     
  19. M0ntem

    M0ntem

    Joined:
    Sep 9, 2019
    Posts:
    2
    Still not fixed and I can't even properly edit the constraints... They just disappear when I look from the Z-axis (Version 2019.2.4f1)
     
    M_R_M likes this.
  20. unity_V16sPb0I8SVOuw

    unity_V16sPb0I8SVOuw

    Joined:
    Apr 1, 2019
    Posts:
    10
  21. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    871
    still got huge issues also in 2019.3.0b3 (either really slow performance, or cloth looks completely destroyed).
    Here it says it's being fixed in 2019.3: https://issuetracker.unity3d.com/is...cted-by-high-external-force-when-in-play-mode
    I hope this does not mean that in 2019.3.0b3 the fix should already be included...

    Edit: maybe to add to this: when I take a prefab from earlier version with cloth component, performance is okay, but cloth is distorted big time. if I recreate cloth, performance goes to 1fps max, and still cloth gets destroyed even heavier. I did not find any way to use cloth at all since 2019.2
     
    Last edited: Sep 12, 2019
    soleron likes this.
  22. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    @M0ntem @unity_V16sPb0I8SVOuw @unity_n2FvEnfvq2vehA @CliveLewis

    Seems like cloth bugs are a tough one to solve. Thankfully Sean's looking into it.

    Hi @SeanParkinson

    Thanks for addressing the bounds issue. Could you please share which version of 2018? I'm on 2018.4.6f1 but still am having the cloth problems.

    I made a few videos showing the problems, please find them here:
    https://forum.unity.com/threads/cloth-questions-possible-bugs.716663/#post-4918949

    If you still need a repo, I can make a separate project for you.

    Thanks for the help!
     
  23. ryannelson

    ryannelson

    Joined:
    Feb 26, 2015
    Posts:
    4
    Does anyone know what version of Unity was last to include a working cloth system? I'm encountering these issues in various version of 2018 and 2019 :-/
     
  24. nemodemos

    nemodemos

    Joined:
    Jul 29, 2016
    Posts:
    2
    @ryannelson Upgrading from 2019.1.14 to 2019.2.5 (and breaking) brought me here, so from my experience at least, 2019.1.14 has functional cloth simulation.

    For us, upgrading to 2019.2 and the new PhysX 4.x cloth is nonfunctional. It reorders all of the constraints, and attempting to repaint them (or paint new ones on a new mesh) triggers the issues others have mentioned: disappearing constraint nodes, bounds problems, etc.
     
    ryannelson likes this.
  25. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
  26. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    110
    Oh dear, I'm on 2018.4.9f1, and hoping to stay with it.

    But I can't paint any cloth constraints. And it's important to my project to have working cloth sim.

    Is there a proper fix for this?
     
  27. muzboz

    muzboz

    Joined:
    Aug 8, 2012
    Posts:
    110
    I found that I could apply Max Distance to the cloth points by using the Select interface, instead of the Paint interface.

    I pressed Select, then selected different verts, then clicked the Max Distance checkbox with a number in the Max Distance field.

    That seemed to apply the weights.
     
    asnyder28 and Thyronia like this.
  28. AndrewRH

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,806
    Yup!

    I've attached a script that we came up that will repair the cloth so that it can be painted on again.

    Just include this script in a /Editor folder and then the RenderHeads menu should appear where you can select "Cloth/Fix Collider"

    Hope that helps :)
     

    Attached Files:

    Freesmith likes this.
  29. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    @SeanParkinson might want to have this script too? :rolleyes:
     
  30. KarlKarl2000

    KarlKarl2000

    Joined:
    Jan 25, 2016
    Posts:
    606
    hi @SeanParkinson

    Thanks so much for fixing the cloth in 2018.4!! :)

    But I have some bad news .. :(

    I just updated to 2019.2.11f1 and the cloth is exploding :oops:.
    Sorry for the trouble.. You're probably buried under work. Just wanted to let you know.
     
    Last edited: Jan 9, 2020
  31. Swati-Patel

    Swati-Patel

    Joined:
    Apr 30, 2014
    Posts:
    1
    Hi

    I added script in Editor folder, restart unity but RenderHeads menu didn't appeared. I'm using unity2019.2.9f1.
     
  32. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Try changing your Editor layout back to default - it worked for me.
     
  33. PlasmeticRaven

    PlasmeticRaven

    Joined:
    Feb 2, 2020
    Posts:
    1
    Still having this problem, switching back to default did nothing.
     
  34. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    At first I thought this bug had gotten me too... It's been a while since I had interacted with the cloth component, as there had always been bugs with it. So I was wondering why my cloth constraints toolbox suddenly didn't appear in the scene view so I could paint verts... Eventually I realized the "Gizmos" button thingy should be grayed-out in your scene view toolbar... So yeah, backwards and unintuitive is still a thing ... D:

    But guess what?? -- This bug DID still get me! -- I just had to be some distance from the scene's origin (not a lot though). Then my brush seemed to be snapping to some invisible grid (even though grid snap was NOT enabled), and as a result, I still couldn't paint my constraints! Go me!!

    @SeanParkinson

    This tool needs some tender loving care -- Please help. :(

    ---


    EDIT: Looks like this bug (and others!) are still here in 2019.3.0f6 as well as 2019.3.1

    EDIT 2: Apparently the UI is just generally broken (and always has been, since before 2016!)

    EDIT 3:
    Now the bounding box gets broken when you add the cloth component to a submesh, which was causing MANY (but not ALL) of my hair-pulling UI issues. I found it requires "Update When Offscreen" to be enabled in the Skinned Mesh Renderer in order for the UI to simply function in the editor. This has never been fixed.

    Beyond this, in 2019.3.1 (and 2019.3.0f6), when starting the scene, verts just go nuts and are stretched to the size of the import model and not to the final size Unity picks for the model (breaking the tethers and the whole simulation simultaneously), and as such, the simulation is just bonkers. Am I wrong for thinking I could finally edit cloth in 2019.3??

    EDIT 4:

    I have just one question:

    Why is cloth still just a huge raging garbage-fire???
     
    Last edited: Feb 16, 2020
    M_R_M and irenya like this.
  35. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    Problem is still here 19.3.6f1 and this is really unprofessional.

    Not sure what Unity is doing, but they better sort things out because it is turning to a pile of "sometimes working" garbage. Cloth is a very basic and essential system, you can't be talking about new physics systems and have such issues in such basic components. I would be ashamed if this component in this condition was my responsibility.
     
  36. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    The sad thing is, it doesn't seem like it is _anyone's_ responsibility.

    The fact that there's no DOTS version of this even hinted at is proof enough for that, but someone from Unity has officially gone on the record to say that a DOTS version is not even being looked at. When I pressed them, nobody had anything further to say about it. :/

    Cloth is just a flaming garbage fire -- and it doesn't look to be improved anytime soon without someone besides me making a stink over it. :(
     
    soleron likes this.
  37. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    We just tried moving a project from 2018.2.3f1 to 2019.3.3f1 and also 2019.3.7f1 and our cloth bounds gets all messed when you hit play.

    @SeanParkinson Would you be able to give this thread an update on when we might see base functionality restored?
     
  38. Vharz

    Vharz

    Joined:
    Jul 28, 2012
    Posts:
    25
    For me if I try the cloth component on simple geometry such as the Unity plane then it works ok. The problems appear on skinned meshes, such as character clothing or armor. Then the bounds get messed up etc., the usual stuff. However, repeatly clicking the "edit cloth" (or whatever is called, from the inspector) then deselecting object, then clicking again it will eventually work as expected-ish.

    I say -ish because even then it's kinda clunky to paint cloth vertices, e.g. mesh disappears/reappears etc. But at least I can work it out.

    I'm using Blender for 3D stuff.

    But seriously, Unity, fix the damn cloth once and for all. This has been an issue for ages and is getting ridiculous.
     
    Last edited: Mar 29, 2020
    awesomedata likes this.
  39. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
  40. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    871
    ibyte likes this.
  41. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Seems like a good bug report to get that nice raytracing graphics card!

    They'll just post it as "fixed" if it has to do with cloth -- and BAM! -- you're in the running! :p
     
    ibyte likes this.
  42. caseysharer

    caseysharer

    Joined:
    Sep 19, 2018
    Posts:
    2
    I'm trying out 2020.1.0b14

    And when clicking edit constraints the tool nor the weight point particles show up, there's only a volume.
    Tried everything, looked all over the net, forums, and YouTube... am I missing something?
     

    Attached Files:

    Emanx140 likes this.
  43. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    871
    at least in 2019.4 there is a bug where you need to open paint tool, then select another GameObject, then go back. to GO with cloth, and then again open paint tool.
     
    Recky256 likes this.
  44. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    This is in 2019.3 too -- all versions. D:
     
  45. naatura

    naatura

    Joined:
    May 19, 2014
    Posts:
    8
    Please can you explain the workaround cloth bug? So I can make it work. Using 2019.3 and experiencing same issue. Can't see vertex to be painted. Thanks
     
  46. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    All I can remember is that you have to click on one mesh part, then back on another and something to do with your camera zoom affects it too.

    Trust me -- this is wasting your time. Your cloth is broken and will never work. It doesn't appear that anybody is assigned to Cloth at the moment. You should probably buy Magica Cloth on the Asset Store -- it's on sale and looks pretty decent.
     
  47. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    871
    Actually cloth works now again in latest LTS 2019.4
     
  48. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,419
    Wow. Did not know that.
    I fought with it up to 2019.3 and gave up. Glad to know there's at least one version of it that it's functional on.
     
  49. THEREALIZATION

    THEREALIZATION

    Joined:
    Mar 9, 2017
    Posts:
    2
    Another workaround is to switch your layout to default then edit your cloth and then switch back to your layout. It worked for me. Hope it helps.
     
    Last edited: Sep 20, 2020
  50. KospY

    KospY

    Joined:
    May 12, 2014
    Posts:
    153
    It's crazy that this bug has not been fixed since so much time. I always need to revert to default layout to make the collider and cloth component editor to work :rolleyes:. I wonder when Unity will do something. I think I do that since more than 2 years :D