Closed sihengz02 closed 1 year ago
Hi,
Hi, Yifei.
Thanks for your previous answer.
To the best of my understanding (sorry i'm new to simulation), the collision test in DiffCloth only supports detection between every point in the cloth mesh and the whole obstacle mesh (according to the Simulation::collisionDetection
function in src/code/simulation/Simulation.cpp). It's more like the point cloud of cloth collide the obstacle mesh and it means that it do not support collison test between triangle faces.
So, how can the simulator detect the situation when one triangle edge in the cloth mesh penetrate into the obstacle?
In terms of solving collisions (as in resolving collision and cloth dynamics simultaneously at every time step), currently the framework only supports nodal contacts, (node-node, but not vertex-face or edge-edge). This is a limitation inherited from the simulation framework used by diffcloth (https://hal.inria.fr/hal-02563307v2/document Sec 5.4). However you can still add edge-edge and vertex-face for collision detections, and treat them as nodal contact constraints when adding them to the solver, which should still make collision handling more robust. Currently for collision detection I've only implemented nodal self-collisions and primitive collisions, which you probably already figured out. Let me know if you have any other questions.
I'm closing this issue for now. If you have other questions let me know.
Hi, Yifei.
I have briefly looked through
Primitive.cpp
andPrimitive.h
and I have another question regarding to how to add other obstacles that are not provided by the simulator.Primitive
class, set its mesh and implement collistion detection functionisInContact
, what should I do to ensure the collision detection function is differentiable becuase I think the collision detection function is (or not?) in our computational graph?isInContact
forCUBE
, which is included in the enumPrimitiveType
but is not implemented?Sphere
, but by using a pre-provided.obj
file?