16-08-2024, 02:18 PM
(15-08-2024, 01:56 PM)josemendez Wrote: Hi!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.
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.
kind regards,