Search Unity

Cloth Constraints not working - can't paint or select

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

  1. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    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:
    1,920
    I am a 2D physics dev and I don't work on 3D cloth. Maybe @SeanParkinson can help?
     
    Last edited: Jul 28, 2019
  3. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    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:
    1,920
    Yes, it's certainly being worked on. Sean above is the person to help.
     
  5. indieDoroid

    indieDoroid

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

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,920
    You're welcome.
     
  7. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    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:

  8. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,920
    Again, I know nothing about cloth, sorry.
     
  9. indieDoroid

    indieDoroid

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

    SeanParkinson

    Unity Technologies

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

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

    AndrewRH

    Joined:
    Jan 24, 2012
    Posts:
    2,592
    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. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    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:
    16
    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:
    16
    Hi Clive,

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

    CliveLewis

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

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    @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)
     
  20. unity_V16sPb0I8SVOuw

    unity_V16sPb0I8SVOuw

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

    unity_n2FvEnfvq2vehA

    Joined:
    Jan 27, 2019
    Posts:
    2
    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
  22. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186
    @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:
    1
    @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.
     
  25. indieDoroid

    indieDoroid

    Joined:
    Jan 25, 2016
    Posts:
    186