Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Major cloth issues in v2019.2.0f1

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

  1. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    We just re-done all clothes already :( but it should be mentioned somewhere in upgrade guide or unity shiuld show nll reference, we had 1 fps when creating prefab with clothes and we didnt have idea why it was, and it was because of broken clothes.)
     
  2. Schwalbe

    Schwalbe

    Joined:
    Jun 19, 2017
    Posts:
    6
    I am unsure if what was mentioned would be the same issue, but I'll chime in:

    1. Cloth.SetEnabledFading seems to completely reset the cloth animation each time it's set to true
    2. The same method appears to work when fading out - as in, it takes 10 seconds if I specify 10f to stop the animation, but when I attempt to start the cloth simulation with SetEnabledFading, the skinned mesh appears to have it's bounds completely reset, and the cloth disappears for a blink of an eye - noticeably, I need to add. It's not just a single frame thing. Also it feels as if the goddamned thing doesn't respect if I put 10 seconds (for extreme result) to SetEnabledFading(true, 10f).

    Apologies if this post is rambly as hell, I just spent an entire day trying to figure out what the hell is going on - I'm ever so bloody tired.
     
    alexrvn and atomicjoe like this.
  3. alexrvn

    alexrvn

    Unity Technologies

    Joined:
    May 16, 2017
    Posts:
    53
    Will follow up on this, thanks!
     
    atomicjoe likes this.
  4. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,296
    I am a bit late to the party, but I want to throw few words of feedback about cloth.

    First of all I don't expect cloth to work perfect - what I want is to just work fine. In my opinion currently cloth is one of, if not the most bugged thing in unity. I don't know the reason and I don't want anyone to blame, it's just a fact and many probably could agree. However I wish someone did something with that.

    Second, our main character utilize cloth heavily and around 1 year ago I upgraded project to Unity 2019.4.1 or something like this and cloth worked fine. Later I made upgrade to ~2019.4.8 and cloth stopped working correctly. From what I know the last number should be the "patch" version with no breaking changes, while cloth literally changed behaviour and there was no way to make it work in the same way as before. Sorry, but something like this in LTS is a distasteful joke.

    I reported this bug 10 months ago (the title is actually not correct from my original report) and it is still not fixed, not to mention other bugs like cloth extrapolation when timescale changes (pausing and unpausing game will jitter cloth hardly).
    The funny part is this bug is result of other fix. I really wish someone test new changes and fixes before release.

    Sorry for negativity, but I got frustrated just by remembering this.:rolleyes:
     
    Jakub_Machowski and atomicjoe like this.
  5. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Any Info about that, cause cloth is really hard to use on 2019.4 to be honest fading dont work at all, but also when using with animator on normal update, it seems like clothes are updated to late what makes strange behaviour I reported it alredy in bug here
    https://issuetracker.unity3d.com/is...ate-mode-is-set-to-normal-slash-unscaled-time

    Any info about fixing it on 2019.4? What about fading it resets cloth every time when using that what make jump of clothes when using animator on character too. The problem is exactly the same when using lods, when lod is changing from lod where there is clothes to the one where there isnt, it just pop up. Only workaround to change lod was for us to give lod far far away, and turn on cloth component by code (with enable variable) according to camera distance, still not looking good , but much more better than broken fading in or changing lod. To be honest I assume that all that problems exist because that bug that I reported (link above) cause it look like first frame clothes is updated with defeault animator t-pose, and then next frame it update it normal way. Sorry but Fixed update for animator for characters used in large amout not only make performance problems but also not cooperate well with many systems etc. Cloth just shoudl work with normal update and animator by standard.
     
  6. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    YEs exactly the link to the report You give is my report :) Probably Unity connected You and mine into one, I reported it like a few months ago. Still no fix :(
     
  7. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,296
    Sorry, actually this is wrong link, this is mine issue, but I remember yours and I think this is exactly the same problem, or more specifically - they both came from the same source.

    Furthermore, my animator is in fixed update mode and I experienced probably the same stutters/jitters as you did.
    The main cause is world acceleration scale, they incorrectly reworked it in the middle of 2019 LTS (there was bug related to timescale) and that "patch" changed how the cloth works or gets updates - no clue, but we can clearly experience consequences of this change.
     
  8. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Its sad cause if that won be fixed in 2019.4 LTS we will just resign of using unity clothes, cause shaking clothes is just something that looks horrible and cant be present in final game. We already fight a lot with clothes like broken cloth painting tool, broken cloth bounds etc. But earlier could be fixed by some additional work, this bug just cant be fixed by user.
     
    Qriva and atomicjoe like this.
  9. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    @alexrvn Any Update about that clothes problems on 2019.4 ? :)
     
  10. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    This problem is still present in 2020 LTS, when will we have working cloth again? changing animators to update mode Physics is not an solution. And causes new issues.

    Any asset people can recommend to replace the broken Unity implementation of Nvcloth?
     
  11. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Yes, Magica Cloth is excellent for characters, but ObiCloth is more generalistic. Both use the new Jobs System for multithreading and should run even faster than the native cloth and compile everywhere Unity does.

    But the fact that you have to rely on third party indie solutions for something that's included by default in Unity is shameful...
     
  12. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,891
    Hi, Obi's dev here. Obi was originally created out of necessity, to circumvent all issues and shortcomings in Unity's built-in cloth: I needed a goal net for a soccer game and back then, Unity's cloth had just dropped support for rigidbody interaction and tearing.

    Fact that it took one guy less time to write a cloth simulator from scratch and achieve feature parity with Unity's -and then surpass it in every conceivable way- than wait for Unity to fix theirs is a testament to how utterly neglected Unity's cloth system is. The lack for decent cloth opened a huge market hole for store publishers, but also caused unending headaches and basically made it more profitable to fix the engine and patch holes in it than to build games. So I guess we should be sorta... grateful?

    It's been 7 years since I started trying to use the built-in cloth, and it has only gone downhill from there: features being removed, editor tools breaking, etc. Shame indeed :(
     
    Last edited: Dec 6, 2021
    wetcircuit, Qriva and atomicjoe like this.
  13. Vincenzo

    Vincenzo

    Joined:
    Feb 29, 2012
    Posts:
    146
    Our problem is that our characters are holding flags, these flags are held by characters that are being animated and in late update IK Applied to them, aswell as internal animator IK.

    This all makes cloth simulation all broken for unity, it worked fine in 2018.4LTS before unity screwed it all up.
    Flags are jittery, inacurate don't handle changes of movement of the player, it's a mess.

    @arkano22 we tried Obi Cloth before but were unhappy with it, but this was literally 5 years ago, I will give it a swing again. Thank you!
     
  14. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,891
    For accurate cloth physics, the simulation must be updated using a fixed timestep (like any other physics), because variable time stepping will lead to jittering. This means cloth must be updated in FixedUpdate(), but as far as I know Unity now updates its cloth in either Update() or LateUpdate() which is a mess. If you use IK, its output (adjusted bone positions) must be used as input for the cloth simulation every frame, otherwise you'll get a one-frame delay between them.

    So you need to update both IK and cloth simulation during FixedUpdate, IK being updated first. It's the only way for both to work correctly and accurately with each other.

    Obi comes with multiple updater components that allow you to update during FixedUpdate, Update or LateUpdate, and a flexible callback system that allows you to hook onto any step of the simulation. If you're using FinalIK or a similar IK system you can manually update it right at the beginning of Obi's physics step.
     
  15. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Unity version 2021 LTS 2 years later . Still Initalization of clothes reset cloth to t pose for 1 frame... What makes almost impossible to use LOD on clothes. Unity please stop adding new and new features and just fix and polish actual ones. The clothes looks good but clothes system without option for smooth cloth change is like no use for any serious dev.
     
  16. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    647
    Problem is still not fixed
     
    atomicjoe and Qriva like this.