Work in progress. Personal research effort applying machine learning methods to generate analytic signed distance functions for arbitrary polyhedrons using support vector machines with RBF kernels. The smoothed bunny is the learned SDF visualized with marching cubes.
Since starting this project, a number of papers have been released that effectively learn SDFs in Fourier space with deep neural networks. While these can learn mesh boundaries with finer details, one remaining advantage of my approach is that training is fast, since SVM problems are convex. Simulation
In rigid body physics simulations, an analytic SDF could be used in lieu of mesh topologies. In this scenario, attached to a rigid body is a coordinate frame, SDF, scalar mass, and linear and angular momentum vectors. Collisions could be evaluated in one of two ways:
Collision Method 1
The first works by dividing the SDF boundary into concave and convex regions, by delineating inflection contours on the SDF's zero-distance implicit surface. In each of these regions a point is constrained to move along the implicit surface. At each time step, these points are updated via the gradient of the nearest signed distance field. In general, contact points will flow along boundaries, unless a neighboring object is passing with low impact parameter, in which case the point may tunnel through the interior of the SDF boundary.
Each point is evaluated with respect to its nearest-neighbor field each time step. If the sign of this distance is ever negative, then we know that a pair of objects are colliding, and can adjust the momentum of the two objects while conserving global momentum.
See Miles Macklin et al with Zach Corse to read about an analogous idea for mesh topologies.
Collision Method 2
The second collision method I'd like to try keeps track of N objects with M points each. These points are selected within the boundary of each object stochastically. Over time, these migrate according to the superposition of the gradient fields of the N-1 other objects, weighted by some function of the scalar distance to each object. Should any of these evaluate to a negative value via another object's SDF, we know that a collision has occurred. After resolving the collision, contact points are deleted, and the volume occupied by the object is sampled with the same number of points, thus preserving the total of M points.
The original idea was to convolve the interior of each pair of SDFs. Should any of the samples in this integral be positive (the product of two negative values), then we know there is a collision. However, the above method would require fewer samples, and would likely catch collision events sooner than a method that requires sampling over the union of each pair of domains.