Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using SDFs for collision
#3
(12-08-2024, 07:52 AM)josemendez Wrote: Hi,

SDFs in Obi are adaptive: instead of all voxels having the same size as in a regular 3D texture, their size changes depending on how much resolution is needed to represent a specific region of the SDF. As a result their storage requirements are much lower than regular SDFs. The downside is that Obi only works with its own SDFs, as adaptive representations are not usual.


This wouldn't allow for robust collisions agains deforming meshes. The problem is that SDFs lack information about surface velocity, which is necessary for accurate collision detection. When your SDF represents a rigid object and doesn't deform, you can just use the velocity of the object. However if your SDF changes every frame in a flipbook-like fashion, it essentially becomes a "teleporting" surface as far as any physics engine is concerned.

If your SDF is thick enough and deforms slowly enough that other objects (in Obi's case, particles) don't suddenly find themselves on the other side of the volume this might work.

The best approach for collisions against some deformable meshes (eg a human body) is to segment the mesh into convex regions surrounding each bone and generate a SDF for each one, then parent the SDF collider to its corresponding bone. This allows to calculate velocities for each collider accurately, uses far less memory compared to a single SDF for the entire body, and is a lot more performant as it doesn't require calculating the SDF from scratch every frame.

kind regards
oh, SDF from Mesh To SDF work fine for collisions. It's used by the Unity hair system, and I also implemented a PBD cloth simulation which uses the SDF. It's not perfect, but good enough for most cases. and SDF per bone for dozens of bones which are used to move a dynamic mesh partly animated by blendshapes would also not work. MEsh to SDF works fine with all of this.
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