Search Unity

  1. Click here to receive a gift with your purchase of Unity Pro or Unity Enterprise.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Major cloth issues in v2019.2.0f1

Discussion in 'Physics' started by Neale_GH, Aug 19, 2019.

  1. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    I would definitively wait for 2019.4 LTS in your place.
    I suppose cloth will be fixed by this point. Fingers crossed.
     
  2. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Keep in mind you will have to redo all your clothing even if they fix it, since vertex constrains will be corrupted from earlier versions, so don't fine tune the cloths too much until then.
    Also, the new asset database v2 will have to reimport ALL of your assets.
    You can avoid it and keep using v1, but the cool thing about v2 is it keeps different versions for different build targets, so if you're building for 2 or more targets, switching between them will be AGES faster.
    If you only target a single build target, you can stock with v1 and avoid the trouble.
     
  3. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    229
  4. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Of course, with a "get in touch" price tag...
     
  5. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    628
    Somewhat off topic but I noticed this in the upgrade notes as well. I would like to use it since I'm planning multiple builds (about 1/3 of my last game's export time was merely waiting for these re-imports) but I'm not sure if there's any side effects/things that can go wrong while switching. Has anyone heard of any potential issues with moving to version 2? Will my Blender files stay consistent with their material links and all that?
     
  6. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    I haven't noticed any problems with the import config of the assets: they stay the same.
    In your place, I would copy the project folder to a new folder and try the upgrade there.
    If anything goes wrong, just delete the new project folder and go back to your old project.
    That being said, in my case it took a reaaaally long time (a whole day on a beefy i7-8700K overclocked) but that was because I use ASTC texture compression for android, and it takes ages to compress.
     
    SomeGuy22 likes this.
  7. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    So after experimenting more with Cloth in 2019.03 release, most things seem to work..... And the simulation seems much better then e.g. Magica Cloth, and pretty fast. Stuff which does not work:
    - surface penetration (not sure if there is a bug report for this ?)
    - huge force applied after start (https://issuetracker.unity3d.com/is...ted-by-large-force-at-the-start-of-simulation), which often brings the cloth in an undesired state
    - the Cloth editor sometimes (workaround which works for me: selecting another GameObject, switching back to the GameObject with cloth, open editor again)
    - Colliders partially, but I think this was always the case (as far as I remember). I guess it depends on whether other constraints are being met, and in this case other constraints are prioritized above Collider)
     
    TacticalShader and SomeGuy22 like this.
  8. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    THERE IS! Vote for it HERE :)
    Magica Cloth works flawlessly for me. Could you elaborate on this?
     
    TacticalShader likes this.
  9. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    Works okay for me, having issues with skinned cloth driven by bones. But what I mean is the quality of simulation. Like realism of visuals, which are more pleasing to me with Cloth component. I guess the difference is that Cloth uses all vertices, while with Magica Cloth you should reduce it with the Virtual Renderer to achieve good performance.
     
    atomicjoe likes this.
  10. Nest_g

    Nest_g

    Joined:
    Jun 18, 2019
    Posts:
    18
    In the last beta (2020.1.a23) continue the problems (in my case the cloth looks like rubber), in the simulation cloths are stretched aprox. a 20% of the original size, this problem is present in 2019.2, 2019.3 and 2020.1 versions, in 2019.1 and previous all work fine.
     
  11. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Do a minimal project showing clearly the issue and send a bug report from inside the editor.
    Hopefully they'll get it fixed now that they are looking into the clothing component.
    Who knows when we will get their attention again in the future.
     
  12. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    150
  13. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    the exact version is noted down there in a comment:
    Fixed in 2019.3.2f1
     
  14. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    150
    Sorry I either missed that or they have just added! Thank you.
     
  15. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    I think they added it after the fact. Otherwise it wouldn't be in the comments ;)
     
  16. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    150
    Just tested in 2019.3.2f1. Its still broken. The External Acceleration is still in local space. So I have wasted most of the morning converting my project. Next time I will just do a 5 minute test. Just hang a curtain. Rotate in world space. The wind follows the curtain so it is blowing in local space!

    Also, it seems even more buggy than in 2019.2 with constraints vanishing (have to change the layout to bring them back). The model jumps all of the place in the editor. We are going backwards!

    New bug report sent..
     
    Last edited: Feb 21, 2020
    Nest_g likes this.
  17. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Make a minimal repro project and fill a bug report asap.
    It's best to do it as soon as they declare it "fixed" when in fact it's not, before they get reasigned to another bug...
     
  18. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Personally, I just upgrade and run the current cloth bug project I used for the bug report as soon as they declare it fixed and resend them THE SAME project with a new bug report.
    Honestly, I don't know what's happening inside Unity Technologies but it doesn't look pretty.
     
  19. Nest_g

    Nest_g

    Joined:
    Jun 18, 2019
    Posts:
    18
    I try Unity 2019.4 but the problem with cloths continue, is incredible, a simple flag looks like rubber. I continue using 2019.1.14, the last version in that cloth physics work fine.
     
  20. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Vote for this bug to be fixed HERE
     
  21. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    Hooray, in 2019.4f1 most cloth bugs have been fixed. Cloth seems to be usable again! Big thanks to unity devs!!!!
     
    hoshos likes this.
  22. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    The bug is still active, not marked as resolved.
    Does surface penetration work?
     
  23. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    yes, seems to. still having some weird issue sometimes, but it now works at least in some cases. might be, that some of my cases are weird by design of cloth (did not use it too extensively in the last working version).
    Seems that as long as I keep distance limited to all vertices, surface penetration seems to work correctly. if I set vertices to unlimited, there is still a strange "break" in the cloth.
     
  24. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    I have tried my repro project for the surface penetration bug with Unity 2019.4.1f1 and the bug is still there and does the same as before: it expands the mesh as if it was going to fly away or was full of helium with a surface penetration less or equal to the maximum displacement distance.

    Surface penetration is still broken.
     
  25. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    Interesting; it started working for me in some cases, but not all with latest build.
    in your test case, do you have "free" particles, with no distance constraints? Seems to me somehow related, if I limit ALL particles somehow, surface penetration seems to work correctly. But not sure if this is the real reason why it produces the "Blow up" effect, but I also still see it sometimes.
     
  26. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    No, in my test scene all vertices are set to max distance 1 and surface penetration 0.1
    This makes the cloth inflate like a balloon.
    Since the interest of surface penetration is to avoid the cloth from going inwards it's starting position to avoid the use of colliders, it's still definitively broken.
    (you can't use colliders to acurately follow a torso)
     
  27. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    Okay, will do a few more tests to narrow it down, as it now (with f1 release) started working in some cases for me; I also use it to replace my complex collider setup. Would probably be good to know what the factor is, and then generate a more detailed bug report.
    Edit: do you use collider in your scene, too?
     
  28. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    No colliders, just two spheres, one green with a cloth component and one red underneath without any cloth or collider just to see poke-throughs.
    Max distance is set to 0.2 and surface penetration to 0.1 for all vertices.
    Expected result: the sphere should just sag down.
    Actual result: the sphere inflates into a capsule and spins in all directions.
    You can download the repro project HERE
    It's the same repro project that I included in the original bug report.

    I wouldn't advise to open a new bug report on the matter. The phrasing on this report is not mine but from the Unity QA team, that rephrases your bug report to whatever they see fit. Even if it's incorrect.
    The user comments on the bug report show clearly the problem lies on the surface penetration feature and the included repro project speaks for itself.
    If you fill a new bug report, post it here anyway and we'll upvote it.
    I just want this cloth component to work!
     
  29. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    169
    For what it's worth, I see some more Cloth related physics in 2019.4.2. Maybe this time they have what you need. Probably don't get your hopes up but maybe it's a good time to test.

    I don't have any cloth in my project so I can't speak on the subject personally.
     
  30. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    Heya I've done some fixes on colliders and tethers on 2019.4.2f1, would be awesome to check if those fix your some of your issues. As for the issue, it is currently on my to-do list for the next batch of fixes, as I keep chowing down on cloth bugs. The current bugfix batch focuses on things such as graphical artifacts on the first frame cloth becomes visible and self-inter collision indices being stuck as always enabled once set, which probably will land in 2019.4.3f1. Sorry that this system has been in such a rough shape, we're currently fixing it up as much as fast as possible.
     
    Qleenie, sand_lantern and atomicjoe like this.
  31. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    OMG I CAN'T BELIEVE THERE IS ACTUALLY SOMEONE WORKING ON IT!
    Thanks for fixing this alexrvn!

    About the issue, for the record, the problem is related to the surface penetration setting: if you don't use it, all is fine, but if you use it, the cloth reacts as it was filled with helium and wants to fly away.
     
    sand_lantern likes this.
  32. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    Yeah it starts getting even more wild the second you pin at least one particle o_O. I'll post a update on this thread once I got a solution for this issue ^^. Also any and all bugs being filed by you, the community help a ton, so please keep on submitting! :). I've recently jumped on this system so I might not be aware of all the issues, you our users are encountering, even though I make use of the system in my own projects also, as such any and all feedback is priceless <3 Each and every. project out there is unique ^_^ and we'd like to make sure we help everyone succeed!
     
    Last edited: Jul 6, 2020
    sand_lantern, atomicjoe and Qleenie like this.
  33. TacticalShader

    TacticalShader

    Joined:
    Dec 5, 2018
    Posts:
    22
    Hey ! Thank you for letting us know someone is working on the cloth issues, very appreciated. We were left in the dark for a very long time.

    I'm hoping you could also look at this issue, this is critical for our project where we have multiple characters with cloth simulations.

    We also have a bug where the bounds of the skinned mesh renderer gets very wrong when adding a cloth component. It is more visible when the scale of the gameobject gets bigger. I will try to write bug report for this one with a project reproducing it as soon as possible, as there is no ticket yet on the issue tracker.
     
    atomicjoe likes this.
  34. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    Heya! Oh that issue, that one is something I'd love to get fixed up soon, as it's not really the simulation itself but the skinning/readback functionality that causes the most overhead. Afaik the behavior there is a bit broken, as having N cloth pieces(enabled) offscreen should mean they all simulate, but as long as "Update Offscreen" is not ticked on SkinnedMeshRenderer the vertex/normal data of the Cloth setups should not be read back, that is where most of the overhead is probably coming from :(. This issue is on the menu for getting fixed in one of the next bug batches ^_^. Now for the scale issue please file the report it when you can ^_^.
     
  35. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    149
    Hey @alexrvn,

    Just wanted to know, is Unity aware the skinned mesh cloth bound issue is still present ? Just tested on 2019.3.15 and 2019.4.2, indeed still present, and other people says so in the comment section of the issue tracker linked above.
     
  36. TacticalShader

    TacticalShader

    Joined:
    Dec 5, 2018
    Posts:
    22
    FYI I filed a bug report on my issue, turns out it was a duplicate of another issue.

    I wonder if it's related to yours.
     
  37. corjn

    corjn

    Joined:
    Feb 6, 2014
    Posts:
    149
    My issue looks like this :

    No cloth component :

    Capergeerfdfgfgture.PNG

    Just after adding the cloth component, it will mess the bound. Even the cloth constraints are messed up :

    Capergefgture.PNG
     
  38. TacticalShader

    TacticalShader

    Joined:
    Dec 5, 2018
    Posts:
    22
    I have the same issue, but only when the gameobject is scaled (the more you add scale factor, the more it gets offset).
    Also note that, if you enable the UpdateWhenOffscreen toggle of the skinnedMeshRenderer, the bounds is correct : which doesn't make any sense since it's precisely when the UpdateWhenOffscreen is off that we need the bounds to be correct for the culling to work properly.

    So we had to create a script to set the skinnedMeshRenderer.localBounds for each camera filming the character in the OnPreCull() function, but it gets costly very fast.
     
  39. Nest_g

    Nest_g

    Joined:
    Jun 18, 2019
    Posts:
    18
    In 2019.4.2 the cloth simulation looks like rubber in cloths with one collider was fixed, more than a year with this problem but well, now works fine, thanks.
     
  40. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    @TacticalShader @corjn I'm aware of the issue, it is ingrained quite a bit into the architecture of the system sadly but it will be fixed as soon as possible on 19.4+ and 18.4 :)
     
    atomicjoe and TacticalShader like this.
  41. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    ALEXRVN IS GONNA FIX EVERYTHING!

     
  42. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    126
    @alexrvn I assume there are no cloth related fixes / changes in the last two LTS releases (3 and 4)? Saw nothing in release notes, just want to check whether it's worth testing out.
     
    alexrvn likes this.
  43. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    Heya there's a set of changes making the rounds from 2020.2 -> 19.4 currently fixing the following issues :

    https://issuetracker.unity3d.com/is...-no-effect-when-they-are-added-during-runtime
    https://issuetracker.unity3d.com/is...pear-only-one-is-left-when-entering-play-mode
    https://issuetracker.unity3d.com/is...nd-sphere-colliders-under-the-cloth-component
    https://issuetracker.unity3d.com/is...applied-in-local-space-instead-of-world-space

    and a few other small improvements when copying cloth components around or resetting them.

    I'll ping back with which exact versions these will land into ^^
     
    Qleenie and atomicjoe like this.
  44. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    41
    Heya, the aforementioned fixes landed in:

    2020.2.0a21
    2020.1.3f1
    2019.4.9f1

    cheers,
    Alex
     
    Qleenie and atomicjoe like this.
  45. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    751
    Just chiming in to say both statements about Obi are no longer true: since 5.5 it includes full source code for the Burst backend (implemented using jobs+burst), and works on consoles :).
     
  46. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Thanks for the update!
    It still includes DLLs that will break through Unity updates though.
     
  47. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    751
    The DLLs are optional, if you're using the Burst backend they're not needed. It can run 100% on HPC#. Also, DLLs come precompiled so i see no reason for them to break trough Unity updates (in fact, quite the opposite is true: jobs + burst are subject to changes in Unity that will require updating the sources regularly)
     
    Last edited: Sep 21, 2020
  48. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    898
    Good to know! The more clothing options the better :)
     
    arkano22 likes this.
unityunity