Can you use mesh colliders with character cloth? - 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: Can you use mesh colliders with character cloth? (/thread-3869.html) |
Can you use mesh colliders with character cloth? - AdamZ101 - 12-05-2023 There's an asset called RASCAL which automatically generates mesh colliders for characters, and also updates those at runtime when using blendshapes. So the mesh colliders change shape/size depending on the blendshape. Is it possible to use those colliders with your cloth system? I tried to setup a shirt with a blueprint, but when I played the scene and then changed a blendshape slider on the body, the cloth didn't update. If I can't use mesh colliders, do you have another thought on how to handle blendshapes? Thanks. RE: Can you use mesh colliders with character cloth? - calvantsang - 14-05-2023 I can answer that, it works, but not good for all situation. please consider well before you buy the asset. to make it Obi readable, otherwise it will not have interaction. first of all you will need to add three line of code in RASCALSkinnedMeshCollider.cs at start, add "using Obi;" like "using UnityEngine;" Line 976 & 1001 To be fair, It can work almost great with low poly character and low poly cloth, proxy mesh is a must do thing or your cloth is already very low vertices. I am using AMD Ryzen 9 5900X,I can't have satisfy result with under 1000 particles(top, dress and jacket, I might make a video to show it), since you will have at least 3-4 substeps and high collision iterations you will have to make sacrifice on some other things. it might be pretty good with Obi rope or Obi fluid, didn't try it yet, but I have many hours on trying to get this thing work with Obi cloth. I always want to have fully simulation cloth like Maya/Clo3d,but it is almost impossible with normal user computer. I find out with good set up, you can have almost feel like fully simulation with default collider. So I gave up on RASCAL, for now. If you really want to have good collider setup for small detail like close up hand I suggest you can buy it, mess around it, try for yourself, If not what you want, get refund. maybe RASCAL will be the greatest solution when Obi 7 is came out with GPU solver, still waiting to try, so IDK RE: Can you use mesh colliders with character cloth? - josemendez - 15-05-2023 Just my two cents: I guess you're hoping to use ObiCloth for a virtual try-on/cloth fitting sort of app. Using MeshColliders for this is fundamentally wrong, for a few reasons: - MeshColliders are designed for meshes that don't deform: there's a preprocessing step that inserts all mesh triangles into a spatial partitioning structure (a bounding volume hierarchy, or BVH for sort). This allows for fast collision queries after the BVH is built, but every time the mesh has its vertices moved around, the structure needs to be rebuilt from the ground up which negates any performance benefits. - Concave MeshColliders are a lot less robust than convex ones, the reason being that you can easily tell if a point is inside a convex polytope, but it's extremely expensive to determine if a point is inside a concave one. As a result, convex MeshColliders are "solid" (any object that's completely inside of them is considered to be colliding) but concave ones are "hollow" (any object that's completely inside of them, is considered to not be colliding since it doesn't intersect the collider's surface). - Continuous collision detection doesn't work, since mesh vertices are essentially "teleported" to a new position every time the mesh changes: there's no velocity information about how the mesh is deforming. For these reasons, updating MeshColliders so that they match an animated character body is extremely slow -its internal acceleration structure needs to be rebuilt from scratch every frame- and extremely brittle -no continuous collision detection is possible, and objects are only considered to collide against it if they intersect the surface- There's another option that's better in every way: decomposing your character's body in independent rigid parts (one per bone/joint), and using a distance field collider for each one: - It's orders of magnitude faster, since there's no need to update collision geometry at runtime - It's a lot more robust: distance fields are always solid so if any cloth particle gets completely inside of them, it will be projected back outside 100% of the time. - It's compatible with continuous collision detection, since each body part has its own linear/angular velocity vectors if used with kinematic rigidbodies. kind regards, RE: Can you use mesh colliders with character cloth? - AdamZ101 - 15-05-2023 Thanks for your thoughts. Does Obi Cloth support distance fields out-of-the-box, or are you just mentioning that as a possibility to get accurate collisions? RE: Can you use mesh colliders with character cloth? - josemendez - 15-05-2023 (15-05-2023, 02:44 PM)AdamZ101 Wrote: Thanks for your thoughts. Does Obi Cloth support distance fields out-of-the-box, or are you just mentioning that as a possibility to get accurate collisions? Yes, distance fields are supported: http://obi.virtualmethodstudio.com/manual/6.3/distancefields.html |