Help issue with cloth collision - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Help issue with cloth collision (/thread-3568.html) Pages:
1
2
|
issue with cloth collision - danazoid - 29-08-2022 Hi, I can get collision to happen with one mesh, but with my desired mesh it is not colliding at all. The 2 videos below are in the same scene. The Obi Solver setup is the same. The colliders used to touch the cloth are setup in the same way, just different in size. The mesh that works is "simpler" (vertices quite evenly spaced) and also 10x bigger than the one that doesn't. What could be the issue? Thanks Working https://www.youtube.com/watch?v=1tHRgr8oNyw Not working https://www.youtube.com/watch?v=a5_nAQ1EU2Q Also, if I may provide some feedback: my mesh particles were flying about and found that it was due to scaling (ie the transform scale was not 1, 1, 1). I spent some time troubleshooting this, it would have been good if the warning was in the manual somewhere... RE: issue with cloth collision - josemendez - 29-08-2022 (29-08-2022, 10:00 AM)danazoid Wrote: Hi, I can get collision to happen with one mesh, but with my desired mesh it is not colliding at all. Assuming the collider setup is identical and the solver setup is as well, then the blueprint's collision filtering is the only potential failure point: whats' the collision filtering setup for your cloth particles? (in blueprint edit mode, "category" and "collides with" properties) and for your collider? Are particles allowed to collide against the category your collider is using, and vice-versa? (29-08-2022, 10:00 AM)danazoid Wrote: Also, if I may provide some feedback: my mesh particles were flying about and found that it was due to scaling (ie the transform scale was not 1, 1, 1). I spent some time troubleshooting this, it would have been good if the warning was in the manual somewhere... Will add a warning in the cloth blueprint manual page, to make it clearer. Thanks for the feedback! Currently it is mentioned here: http://obi.virtualmethodstudio.com/manual/6.3/obisolver.html Quote:Solvers always perform the simulation in local space. This means that translating, rotating or scaling the solver will rigidly transform the simulation as a whole. Scaling (being an affine transform) will only work for rigid objects. So only the solver can be scaled, this will rigidly scale the space in which the simulation is performed in. RE: issue with cloth collision - danazoid - 31-08-2022 Thanks for the quick reply as always! Quote:So only the solver can be scaled, this will rigidly scale the space in which the simulation is performed in.Oh ok that is much clearer. My original interpretation from the manual was the reverse: keep the solver free of translation / rotation / scaling, and apply everything to the cloth objects. Quote:then the blueprint's collision filtering is the only potential failure point: whats' the collision filtering setup for your cloth particles? (in blueprint edit mode, "category" and "collides with" properties) and for your collider? Are particles allowed to collide against the category your collider is using, and vice-versa?Just to be sure, I checked the collision filter in the blueprint and all particles are set to collide with everything. They are also in Unity default layer. ----- So this is the result after doing that: https://www.youtube.com/watch?v=zeG8hpW09lc The issue now is that collisions are only occurring with the "large" particles (mesh vertices that are far apart from each other), but I need it to work with the "small" particles (mesh vertices that are very close). I have tried changing "collision margin" (from 0.02 to 0.05 and 0.005) and the "Obi Fixed Updater" substeps (increase from default 4). The other settings don't seem to be relevant (but I am not sure). What should I try next? RE: issue with cloth collision - josemendez - 31-08-2022 (31-08-2022, 07:58 AM)danazoid Wrote: So this is the result after doing that: https://www.youtube.com/watch?v=zeG8hpW09lc That's really strange, not even all "normal" sized particles (the red ones) are colliding with the sphere, most of them are ignoring it completely. Those that collide seem to become static almost immediately after colliding. Would it be possible for you to share a repro scene/project by sending it to support(at)virtualmethodstudio.com? Never seen such an issue before and I'm not too sure what could be causing it. kind regards, RE: issue with cloth collision - danazoid - 31-08-2022 Quote:That's really strange, not even all "normal" sized particles (the red ones) are colliding with the sphere, most of them are ignoring it completely Oh sorry! The red particles are working as intended! It is the blue and green ones that aren't working correctly. EDIT: I have sent the files to the support email thanks RE: issue with cloth collision - josemendez - 31-08-2022 Hi Daniel, Just answered your email, pasting my answer here for future reference in case anyone else encounters the same issue. In few words, particles were so small that their mass was considered zero by the engine. Using sane mass values fixed the problem: "Initial particle mass values are derived from their size, smaller particles having less mass. Your particles are *so* small (the smallest ones have a radius of 0.0006 meters, that's half a millimeter) that the mass values given by default fall below the engine's Epsilon value: they basically have zero mass and the collision detection pipeline will ignore them. Luckily the fix is simple: enter the blueprint editor, and give your particles sane mass values. I used a value of 0.005 for the smallest ones and that worked well. As a side note, your solver's sleep threshold value is also quite large for the size of the solver: most particles have so little kinetic energy they will fall under the sleep threshold and freeze constantly, I'd recommend using a sleep threshold of 1e-08 or smaller for working at such small scale." RE: issue with cloth collision - danazoid - 05-09-2022 Hi Jose, thanks for solving the issue! I tried it and it worked as desired. Unfortunately I have now encountered a new problem (sorry!) I applied the cloth proxy and it does not work for the "small" particles. In these 2 videos, the problem can be seen with the green particles. The red particles are working correctly. 1. https://www.youtube.com/watch?v=7Yh8mMR1oYI - settings: the small green particles are not pinned, the rest of the green particles are. - results: the cloth proxy does not move. 2. https://www.youtube.com/watch?v=unXX_i5mkSw - settings: only the largest green particles at the edge of the mesh are pinned - results: the cloth proxy moves. however if you look closely, the cloth proxy part associated with the small particles does not move with the small particles. The cloth proxy is actually following the movement of the larger particles. RE: issue with cloth collision - josemendez - 05-09-2022 (05-09-2022, 08:30 AM)danazoid Wrote: Hi Jose, thanks for solving the issue! I tried it and it worked as desired. Proxies determine which particles to bind mesh triangles to according to several metrics: barycentric weight (barycentric distance of the particle to the mesh triangle), normal alignment (how close to facing the same direction the particle and mesh triangle are), and elevation from surface (how far from the triangle surface the particle is). There's sliders in the proxy asset to control the importance of these metrics during binding, what are the settings you're using? RE: issue with cloth collision - danazoid - 05-09-2022 (05-09-2022, 08:50 AM)josemendez Wrote: Proxies determine which particles to bind mesh triangles to according to several metrics: barycentric weight (barycentric distance of the particle to the mesh triangle), normal alignment (how close to facing the same direction the particle and mesh triangle are), and elevation from surface (how far from the triangle surface the particle is). There's sliders in the proxy asset to control the importance of these metrics during binding, what are the settings you're using? The default settings - barycentric weight: 1 - normal alignment weight: 1 - elevation weight: 1 RE: issue with cloth collision - josemendez - 05-09-2022 (05-09-2022, 08:54 AM)danazoid Wrote: The default settings Try using barycentric weight alone, set normal and elevation to zero. If you mesh contains corners or other sharp features it will help assign the correct weights to each particle. May I ask why you're using particles so small? I couldn't help but notice that while particles were very small, the solver is then scaled up to compensate for the tiny particles, so not sure what the purpose of this is. I can't be 100% sure that such small sizes/masses won't cause floating point precision issues in some other parts of the simulation. kind regards, |