Major cloth issues in v2019.2.0f1

We have just updated our Unity project to version 2019.2.0f1.

We have 2 big issues with the update to the cloth physics component, which we use on virtually all of our characters.

The first is that all of the painted weights on the cloth component are all over the place (as seen in Cloth_01.JPG). Before the updated the weights were painted in neat rows gradually increasing in distance, but now they look like this.

The second, and bigger, issue is that the new cloth physics only seems to work if the vertices of the mesh are skinned to a single bone (Cloth_02.JPG). Setting the distance to 0 results in the mesh following the skinning, as expected, but for some reason when the cloth is skinned to more than 1 bone the vertex positions go crazy, and get progressively more erratic with increasing distance.

My understanding of nvCloth was that the mesh should still obey the skinning and use a mask (i.e. the distance) to determine the amount of influence the physics has over each vertex.

Has anyone else experienced this, and if so, do you know of any solutions beyond re-skinning, re-importing, and re-weighting all of our characters?

Many thanks in advance.

4871618--469733--Cloth_01.jpg

Yeah there are a bunch of cloth issues in 2019.2.0f1

I think your first one is the same as mine:

Issue - Corrupt mesh after importing .unitypackage into Unity 2019.2.0

Status:

  • Reproduced in Unity 2019.2.0 on Windows
  • Bug not present in Unity 2019.1.8 & 2019.1.14, so seems like a regression
  • Awaiting feedback from Unity to confirm the issue and timeline for a fix

Links

If you import the .unitypackage file into Unity 2019.2.0 then the cloth mesh becomes corrupt. I exported this .unitypackage from Unity 2018.4.4 on Windows.

Seems to be cloth related because if I disable the Cloth component, the distortion disappears.

Thanks, Andrew. Yeah, that def looks the same issue as the first one- I’ll keep track of that one as well.

Still present on 2019.3.a2, please vote on this Issue, because it’s making the Cloth component unusable for skinned characters. Unity Issue Tracker - Parts of Cloth Mesh disappear when entering Play mode

FYI This bug is also present in 2019.2.5f1. All of our skinned mesh renderers with clothes are no longer functionning properly. Hi @SeanParkinson , do you know anything about this ? Any workaround per chance ?

Tried 2019.2.6?

For the first issue, I think it would be possible to write some sort of script to solve it as a workaround. The script would export the weight values in Unity 2018 and then apply them based on space location in 2019 to fix the weights.

The second issue with bones sounds like it would require an internal fix…Unless somehow fixing the above weights also fixes this :slight_smile: If I get some time maybe I’ll write this script as it would be useful until the bug gets fixed.

Yeah still present on Unity2019.2.6f1.

Even after re-editing the constraints, I still have vertices all over the place.

I’ve attached some images of what’s happening on my side.

Cloth component disabled :
4983215--486011--No Cloth.png

Cloth component enabled :
4983215--486014--With Cloth.png

Edit constraints mode active (all constraints set to max distance = 0)
4983215--486017--Cloth constrains.png

Cloth component parameters :
4983215--486020--upload_2019-9-20_10-49-28.png

1 Like

Thanks, that really shows the issue well…

It would be interesting to save the same scene with zero maxdistance weights in both 2018 and 2019.2 and do a diff to see if it’s something in the scene that’s causing the issue, or rather something inside Unity engine.

1 Like

Okay I think I can quantify what’s going on a little bit. This is a series of frankly serious issues that has persisted for at least the past several months of Unity updates. I think there’s some confusion in this thread because we’re all seeing slightly different artifacts, and I believe it’s coming from 3 separate bugs which may have to be dealt with individually.

1. Updating cloth to 2019

I haven’t tested this but from your first screenshot it looks like the weights got juggled around a bit upon update. You already pointed this out but I think it’s unrelated to the other issues.

2. Cloth stretches/distorts in the Editor

This is a weird one. I’ve tried tons of different combinations of modifiers/UV unwrapping in Blender to reproduce, and I have narrowed down the cause a little. It seems to be related to either mesh density or total vertex count. Take a look at this cube which is rigged to a single bone:

I had trouble reproducing it on a non-rigged object so I just weighted this cube to one bone. This allowed it to automatically enter as a Skinned mesh, as opposed to the Cloth generating one from a mesh filter/renderer. I’m using the solidify modifier to reproduce the cases that broke in my game. Now look what happens if I use a subdivision surface (a modifier that subdivides all polygons):

No cloth settings have changed, yet the stretching is now happening. So is something wrong with the subdivide modifier in Blender? I think so. This is the result I get when doing a “manual” subdivide smooth under the special menu:

It should be no surprise now that this is the result when I remove the Solidify modifier and manually extrude the rest, while leaving the subdivide modifier enabled:

This proves that it’s clearly not some combination of solidify/subdivision, but rather just an artifact of the subdivision. Now the most interesting part is when I apply the subdivision modifier:

The issue persists.

So what have we learned? The subdivision modifier does… something weird to the mesh. I was able to get distortion without the subdivision modifier by performing arbitrary steps of duplication and rotation, but sometimes it just won’t reproduce.

3. Cloth disappears during Play Mode

My best guess is that this happens when a “bugged” Cloth from Bug #2 is run with constraints active. This is what happens when Playmode is activated without constraints:

This is a capture from the first frame of playmode. After playing it falls down as you’d expect, no distortion. However, this is what happens when I add constraints to the top of the mesh vertices.

We get this buggy mess. Those black shapes are part of the cube. All I did differently is add a constraint of distance 0 to the top of the mesh, and you’d expect it to just stay in place. In fact, when tested on a non-bugged cube, that’s exactly what happens. So practically it makes sense to avoid the stretched/distortion bugged state that these objects get into.

Final Thoughts

It’s a bit complicated to explain all this over a Unity bug report, and I’m not sure if the cloth disappearing bug could be fixed thus fixing the rest of these… I’ll have to do more testing and see if I can get my mesh working by playing around with the subdivision and UVs. I’m not sure if other parameters such as skinned mesh vs. static will affect it, I really can’t afford to waste more time on this. I don’t know what else to do except bring it to Unity’s attention. I’ve voted on the issue tracker you listed so here’s hoping they investigate further and nail down the cause. I might report back if I can come up with a workaround for my cloth meshes.

2 Likes

Very nice report. there appear to be some screenshots missing, and perhaps one that was an duplication of a previous one.

Cheers,

Yes thanks for that, I corrected it. I’m not sure about the duplicate because the the results are just really similar in my examples, regardless the point is that you get the same stretching from the different methods I applied.

I’m surprised that these cloth issues weren’t picked up by all the automated testing the Unity has for regressions. Anyway, hopefully they’ll be adding some more cloth tests to make sure this sort of thing doesn’t happen in the future.

I meet same problem
Here is Unity 2018:

And here 2019:

Anyone have this problem like and know how to fix it or must re-add cloth again?

1 Like

I have same problems in 2019.3.0b4, sinse 2019.2 in all versions cloth seems to be broken :frowning:

1 Like

last good and stable cloth component was in 5.5 - maybe will be fixed in 2025 ? 2026 ?

1 Like

I somehow also gave up hope and instead am waiting for a new version of Obi cloth; which unfortunately also never worked for me so far, but the engineer(s) aiming to release a version which should work with 2019.2 + somewhere in October.

In order for them to fix it, it would need to be added as a bug report and put on priority. As stated there are likely multiple separate bugs, and I’m not sure which are related to which. It’s possible if they investigate the issue listed at the top of this thread that it would lead to the solution for everything else, but I’m not sure it’s really on their radar yet.

I might have enough info to submit a good report, but again I’ve already wasted so much time testing and getting set back by cloth issues that I’m not sure if it’s worth it to do a write-up yet. I would want it to be as detailed as possible so that everything gets fixed, but I’m still confused about the root cause of Bug #2 in my last reply. I would like to get more info on how the models are set up so I can confirm my findings. And there are likely more cases which can cause the same bug, so it’d be helpful to document those as well. I’m trying to be thorough because this is a major feature for Unity and we haven’t had fully stable cloth for at least several months now.

@TacticalShader your stretching looks similar to my Bug #2, can you share some details about the model you’re using? Was it made in Blender, and if so, does it have a subdivision modifier? Can you share the model so I can test it out as well?

@AndrewRH I believe I tried your jacket model in a different thread but I’d like to take another look. What program are you using to make it? Are you using subdivision? Can you share your model which is encountering stretching/distortion?

If I can find similarities between our models maybe I can track down more causes or confirm what I observed last time. If I can reproduce the stretching consistently I’ll see about writing a new bug report, because it would show for sure that it’s different than the one listed at the top. The problem is it seems like it doesn’t always happen, so it could be that once a model gets “bugged” it starts behaving differently than how a non-bugged one would react. Perhaps a non-bugged model would have no problem with subdivision, or maybe a bugged one has different reasons for going invisible on playmode than a working model? We just don’t know enough yet. If everyone could contribute screenshots and upload models of your bugs we can hopefully narrow this down, which makes fixing it much easier for Unity team.

What I don’t understand is that there were already support tickets, which were closed with “fixed” in 2019.2 and 2019.3, but at least in my experience the cloth component is still completely broken in latest releases. And it does not need much to replicate, just apply cloth and see it’s completely broken. Here is the ticket I am referring to.

So this weekend I spent a good deal of time working with cloth in 2019.2.6f1. At the beginning, I switching to the newer version did nothing. I decided to start from scratch and use “the scientific method” of change 1 thing and see. In the end, I have my cape working for my character. I have attached as many settings as I can in hopes something I did will work for some of you.

Couple things I learned:

  • never play the game while inside the prefab
  • only use your main screen - work on second monitor causes issues
  • dont re-use your old cloth, start from scratch.

Here are some image of how my character is setup and the settings I have currently

Cape cloth with bone capsule collides

Settings for my cloth

Surface penetration .1-.2 range

Max distance .1 to 1