Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using SDFs for collision
#5
(15-08-2024, 01:56 PM)josemendez Wrote: Hi!

Got the impression you were looking to use this for making game characters wear cloth relying purely on collision detection. In a nutshell: as long as the character movement is slow enough and the object is thick enough it should work reasonably well, however no CCD can be performed, so it can't guarantee that the cloth won't penetrate the SDF and once it's fallen off/clipped trough, it cannot recover from it. Also there's the overhead of generating the SDF every frame, which may or may not be significant for whatever your use case is.


Yes, blend shapes wouldn't work with the approach I suggested above. We will consider adding support for GPU 3D textures containing distance fields in the future. Sonrisa

kind regards,
sounds good! the overhead for creating SDF is not big, like 0.1ms on a 3080 with around 10K vertices; usually done with a proxy (if character mesh is high poly). And the collision check is very fast. So overall this kind of collision checking would be probably much faster than anything else, while still being VERY accurate, of course with some downsides as you mentioned (velocity e.g., but this could come from skinning as an approximation). you can check the hair system for a good implementation, it also calculates friction based on SDF collision.
Reply


Messages In This Thread
Using SDFs for collision - by qlee01 - 07-08-2024, 05:05 PM
RE: Using SDFs for collision - by josemendez - 12-08-2024, 07:52 AM
RE: Using SDFs for collision - by qlee01 - 15-08-2024, 01:40 PM
RE: Using SDFs for collision - by josemendez - 15-08-2024, 01:56 PM
RE: Using SDFs for collision - by qlee01 - 16-08-2024, 02:18 PM