Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Issues with Obi Cloth Simulation in Unity – "Shirt Exploding"
#5
(11-07-2024, 09:25 AM)josemendez Wrote: Hi!

There's quite a few issues with your project:

-Transform scale values are all over the place: your cloth has a scale of 1.0778, and its parent transform has a scale of 0.16547. Your cloth blueprint's scale is 1 however, this is causing the cloth to "explode" right away as it expands towards its target size: 1/(0.16547*1.0788) = 5.6 times larger than its rest size.

While you could tweak the blueprint's scale to compensate for the transform's scale, the simplest solution for this is to ensure all your scale values are 1. Re-export your mesh using proper scaling, ensuring your transform scales are all 1. This will also simplify reasoning about vector spaces later down the development process.

- All constraint compliance values are set to 0.001 m/N, which is close to that of elastic rubber. You should use the default value (0) unless you're simulating very elastic fabric.

- You're using a proxy component with a skinmap that's unrelated to the mesh you're using.

- Your mesh is non-manifold, which might cause the simulation to fail as explained in the manual. It's also extremely dense, specially around the neck/sleeves and near the seam lines. If you want real-time performance, my advice would be to bring the poly count significantly down.

I guess you're trying to do a virtual try-on kind of app, where cloth is placed on a character relying purely on collision detection between the body and the cloth. I would advise against using MeshColliders (they're not very robust and extremely expensive) and use distance fields instead.

let me know if I can be of further help,

kind regards
Hi,

It works! I have now set all scales to 1 and adjusted the constraints.

Instead of MeshCollider, I now use the distancefields that I assigned to the ObiCollider. But is it normal that I can't delete the MeshCollider? I get the message that it cannot be deleted because the ObiCollider depends on it.

I have now taken a different shirt with fewer poly counts, but the simulation is still very slow. I tried turning down the substeps, but it doesn't do much. With distancefields I played around with the “MaxError” and “MaxDepth” settings, but unfortunately it is no longer so precise. Do you have any other tips?

Thank you for your help!
Reply


Messages In This Thread
RE: Issues with Obi Cloth Simulation in Unity – "Shirt Exploding" - by gunmec - 12-07-2024, 01:32 PM