Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Cloth abnormally twists in the CharacterCloth sample
#1
Hello!
I created a new Unity project and imported Obi Cloth. The CharacterCloth sample and the Trampoline sample have the strange problem as the below pictures show. Other samples are all normal. 
[Image: 7c5d7b9c382e6a2a.png]
[Image: 1586b43809408caa.png]
I tested two backends, they are the same.
I tested it in 4 Unity versions.
In Unity 2021.2.7f1c1, 2021.2.0b12.3482 and 2022.1.0b8.2747, the same issue occurs.
Luckily, in Unity 2020.3.29f1c1(LTS), this issue doesn't occur.
I tested on two PCs, the results are the same, maybe it's because the two PCs have the same CPU.
I can use Unity 2020 to continue my work, but it would be better to find out why the issue occurs.
I don't know if it is necessary to attach the project file, because it is just an empty project.
My system: Windows 10.0.19043  x64
CPU: Intel Core i5-4200H  two cores four threadings
I'm sorry that my English is not good. Indeciso
Thank you in advance!
Reply
#2
Hi,

Looks like Unity decided to change vertex ordering for those meshes. Cloth generation (and many other processes) is dependant on vertex order: the order in which vertices appear in the mesh is assumed to be the same used when generating the blueprint.

However at a couple points in Unity's history, a Unity version decided to reorder vertices for certain meshes. For instance, Unity 2019.1 added "mesh optimization" by default that reordered vertices for *all* meshes. This caused cloth blueprints that were created with previous versions to appear garbled, since the vertex order assumes by the cloth does not match the vertex order used by Unity. Seems to be the case again with one of the newer Unity releases.

Note this isn't a bug in Obi or Unity, is just that they don't "agree" on the vertex order because at some point Unity decided to change it. This will only affect cloth blueprints created with a Unity version older than the one that decided to reorder the vertices. If you create new cloth blueprints in 2021.2.7f1c1 for instance, there will be no issue. Only blueprints created in an older Unity version (the ones in the sample scenes were created in 2019.3) will look garbled when loaded in a newer Unity version that doesn't use the same order.

Similarly, if you click "Generate" again in the blueprints used by these sample scenes and re-do their setup, Obi will pick up Unity's new vertex order and the issue will go away.

kind regards,
Reply
#3
(24-02-2022, 08:01 AM)josemendez Wrote: Hi,

Looks like Unity decided to change vertex ordering for those meshes. Cloth generation (and many other processes) is dependant on vertex order: the order in which vertices appear in the mesh is assumed to be the same used when generating the blueprint.

However at a couple points in Unity's history, a Unity version decided to reorder vertices for certain meshes. For instance, Unity 2019.1 added "mesh optimization" by default that reordered vertices for *all* meshes. This caused cloth blueprints that were created with previous versions to appear garbled, since the vertex order assumes by the cloth does not match the vertex order used by Unity. Seems to be the case again with one of the newer Unity releases.

Note this isn't a bug in Obi or Unity, is just that they don't "agree" on the vertex order because at some point Unity decided to change it. This will only affect cloth blueprints created with a Unity version older than the one that decided to reorder the vertices. If you create new cloth blueprints in 2021.2.7f1c1 for instance, there will be no issue. Only blueprints created in an older Unity version (the ones in the sample scenes were created in 2019.3) will look garbled when loaded in a newer Unity version that doesn't use the same order.

Similarly, if you click "Generate" again in the blueprints used by these sample scenes and re-do their setup, Obi will pick up Unity's new vertex order and the issue will go away.

kind regards,
Thank you for your replay!
Reply
#4
(24-02-2022, 08:01 AM)josemendez Wrote: Hi,

Looks like Unity decided to change vertex ordering for those meshes. Cloth generation (and many other processes) is dependant on vertex order: the order in which vertices appear in the mesh is assumed to be the same used when generating the blueprint.

However at a couple points in Unity's history, a Unity version decided to reorder vertices for certain meshes. For instance, Unity 2019.1 added "mesh optimization" by default that reordered vertices for *all* meshes. This caused cloth blueprints that were created with previous versions to appear garbled, since the vertex order assumes by the cloth does not match the vertex order used by Unity. Seems to be the case again with one of the newer Unity releases.

Note this isn't a bug in Obi or Unity, is just that they don't "agree" on the vertex order because at some point Unity decided to change it. This will only affect cloth blueprints created with a Unity version older than the one that decided to reorder the vertices. If you create new cloth blueprints in 2021.2.7f1c1 for instance, there will be no issue. Only blueprints created in an older Unity version (the ones in the sample scenes were created in 2019.3) will look garbled when loaded in a newer Unity version that doesn't use the same order.

Similarly, if you click "Generate" again in the blueprints used by these sample scenes and re-do their setup, Obi will pick up Unity's new vertex order and the issue will go away.

kind regards,

hey thanks for this post, I also was getting it but i dont know why today i made a new project and updated to jobs 0.50.0 preview 8 and using newest 6.4 and it worked right
Reply
#5
With Unity 2022.3 didn't work at all for me, the Edit didn't show the mesh.
Also, what should I reply to this?  Confundido

[Image: jUPiqfI.jpeg]

[edit]
I see, I can't use the Unity's plane xD
Reply
#6
(20-04-2024, 09:13 AM)MaximilianPs Wrote: With Unity 2022.3 didn't work at all for me, the Edit didn't show the mesh.
I see, I can't use the Unity's plane xD

You need the mesh to be readable by the CPU. This is set on the mesh's import settings, but can't be adjusted for Unity's primitive meshes (plane, cube, capsule, etc).

(20-04-2024, 09:13 AM)MaximilianPs Wrote: Also, what should I reply to this?  Confundido

[Image: jUPiqfI.jpeg]

It's entirely up to you. Unity is offering you to automatically update some of the code to use newer APIs available in your Unity version, if you want to be on the safe side answering no is less likely to break the project.

kind regards,
Reply