PositionBasedDynamics icon indicating copy to clipboard operation
PositionBasedDynamics copied to clipboard

SDF->SDF collision detection

Open blooop opened this issue 3 years ago • 0 comments

I have been doing research to see if methods exist for calculating the distance/collision between two signed distance fields. So far this is the only codebase I've found that looks promising.

I have spent some time trying to understand the codebase to see the performance of SDF->SDF collision and if that is really what is happening, but I am struggling.

I put a timer around line 106: https://github.com/InteractiveComputerGraphics/PositionBasedDynamics/blob/master/Simulation/DistanceFieldCollisionDetection.cpp#L106

COLLISION TIME:0.000071ms
COLLISION TIME:0.003063ms
COLLISION TIME:0.005443ms

And got some very small values. However the collision statistics in some of the examples say it spends around 16ms on collision detection per frame.

My question is: Is the collision time just low because it has been culled by some other level of the BVH or is the SDF->SDF collision time actually just very low.

The reason is I was looking to replace the Flexible Collision Library (FCL) mesh->mesh collision with the SDF->SDF collision detection from here (if it is no worse than FCL). Bearing in mind that I am not using any BVH from FCL and just do a raw mesh->mesh collision checks.

Thanks

blooop avatar Feb 16 '21 15:02 blooop