Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using SDFs for collision
#2
(07-08-2024, 05:05 PM)qlee01 Wrote: Hi,
now that Obi runs ion GPU I am coming back to this asset I bought long time ago. I also saw that Obi does support SDFs; however it seems only SDFs generated by Obi components, is this correct? I am already using SDFs generated by Mesh-to-SDF by Unity (which basically stores SDF in 3D Texture).

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.

(07-08-2024, 05:05 PM)qlee01 Wrote: Would be great if this could be used as collision provider by Obi, as this also allows having SDF of deforming meshes (e.g. SMR).

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
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