Posts: 51
Threads: 11
Joined: Aug 2021
Reputation:
0
30-03-2022, 08:37 PM
This is probably covered in the document/tutorial/other posts, but I can't seem to find an answer, so I have to make a new post.
When I set up my cloth, it works fine at first, but if I turn on surface collision, the cloth just fell through without colliding with anything.
I also tried the demo scenes, and I found out that even the cloth objects in demo scenes can fail collision when I turn on surface collision on them. However, existing demo objects that already have surface collision turned on works fine.
I did some experiments and I think the reason is on the blueprints, however I cannot figure anything else beyond that.
If someone can teach me what's going on that'd be super helpful!
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
31-03-2022, 07:46 AM
(This post was last modified: 31-03-2022, 07:46 AM by josemendez.)
(30-03-2022, 08:37 PM)snowtv Wrote: I also tried the demo scenes, and I found out that even the cloth objects in demo scenes can fail collision when I turn on surface collision on them. However, existing demo objects that already have surface collision turned on works fine.
Hi there!
Some of the demo scenes were created pre-surface collisions, and because they make no use of them they were not re-made after surface collisions became a thing. This means their blueprints contain no simplices (which are the basic building block of surface collisions). Re-generating these blueprints would create simplices, allowing surface collisions on.
For any blueprints of your own, surface collisions should definitely work (unless they were created in an older Obi version that had no surface collisions support). Let me know otherwise!
Posts: 51
Threads: 11
Joined: Aug 2021
Reputation:
0
(31-03-2022, 07:46 AM)josemendez Wrote: Hi there!
Some of the demo scenes were created pre-surface collisions, and because they make no use of them they were not re-made after surface collisions became a thing. This means their blueprints contain no simplices (which are the basic building block of surface collisions). Re-generating these blueprints would create simplices, allowing surface collisions on.
For any blueprints of your own, surface collisions should definitely work (unless they were created in an older Obi version that had no surface collisions support). Let me know otherwise!
Yea I'm actually using ver 6.2 right now, because my project was using the 6.2 softbody, and I heard there are compatibility issues if you install the 6.4 cloth. The blueprint I generated myself is Tearable Blueprint, does Tearable not support surface collision?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(31-03-2022, 04:24 PM)snowtv Wrote: Yea I'm actually using ver 6.2 right now, because my project was using the 6.2 softbody, and I heard there are compatibility issues if you install the 6.4 cloth.
Yes, you should always use the same version for all assets. From the FAQ:
Quote:How do I install several Obi assets (eg. ObiCloth and ObiRope) together in the same project?
First make sure both assets are the same version (for instance, you can't install 5.1 and 6.2 together in the same project). Then, simply import both packages into the project.
(31-03-2022, 04:24 PM)snowtv Wrote: The blueprint I generated myself is Tearable Blueprint, does Tearable not support surface collision?
No, it doesn't. Only regular and skinned cloth do:
http://obi.virtualmethodstudio.com/manua...sions.html
In 6.2, the tearable checkbox still appeared in the cloth inspector blueprint though, it was later removed since it was an overlook (inherited from regular cloth).
Posts: 51
Threads: 11
Joined: Aug 2021
Reputation:
0
(01-04-2022, 07:03 AM)josemendez Wrote: Yes, you should always use the same version for all assets. From the FAQ:
No, it doesn't. Only regular and skinned cloth do:
http://obi.virtualmethodstudio.com/manua...sions.html
In 6.2, the tearable checkbox still appeared in the cloth inspector blueprint though, it was later removed since it was an overlook (inherited from regular cloth).
Ah well, that's a shame. So what's your suggestion of simulating surface collision but still make the cloth tearable? My current thinking is to increase the original mesh's vertex count. And cloth seems to be much more performant compare to softbody.
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(01-04-2022, 03:26 PM)snowtv Wrote: Ah well, that's a shame. So what's your suggestion of simulating surface collision but still make the cloth tearable? My current thinking is to increase the original mesh's vertex count. And cloth seems to be much more performant compare to softbody.
Increasing mesh density (and hence, particle count) would be a good option. Note this will be more expensive and require more substeps/iterations compared to actual surface collisions.
Posts: 51
Threads: 11
Joined: Aug 2021
Reputation:
0
(03-04-2022, 12:49 PM)josemendez Wrote: Increasing mesh density (and hence, particle count) would be a good option. Note this will be more expensive and require more substeps/iterations compared to actual surface collisions.
Sounds good.
Another question: for the tearable blueprint, is it possible to "manually" tear apart specific particles via script?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(04-04-2022, 04:29 PM)snowtv Wrote: Sounds good.
Another question: for the tearable blueprint, is it possible to "manually" tear apart specific particles via script?
Yes, simply call cloth.Tear(), passing the structural element you want to tear. After you're done tearing elements, you need to call cloth.UpdateDeformableTriangles() one to update the mesh triangles.
See the API docs. You can also check out ObiTearableCloth.cs for reference: its ApplyTearing method simply iterates trough all elements, sorts them by stretching force, and calls Tear() on the first few.
Posts: 51
Threads: 11
Joined: Aug 2021
Reputation:
0
(04-04-2022, 08:26 PM)josemendez Wrote: Yes, simply call cloth.Tear(), passing the structural element you want to tear. After you're done tearing elements, you need to call cloth.UpdateDeformableTriangles() one to update the mesh triangles.
See the API docs. You can also check out ObiTearableCloth.cs for reference: its ApplyTearing method simply iterates trough all elements, sorts them by stretching force, and calls Tear() on the first few.
Is it possible to "cut" cloth via script for regular cloth blueprint while enabling surface collision?
Posts: 6,326
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(06-04-2022, 07:51 PM)snowtv Wrote: Is it possible to "cut" cloth via script for regular cloth blueprint while enabling surface collision?
Not possible, only tearable cloth can be cut/torn.
|