Abstract

Many meshes in computer animation practice are meant to approximate solid objects, but the provided triangular geometry is often unoriented, non-manifold or contains self-intersections, causing inside/outside of objects to be mathematically ill-defined. We describe a robust and efficient automatic approach to define and compute a signed distance field for arbitrary triangular geometry. Starting with arbitrary (non-manifold) triangular geometry, we first define and extract an offset manifold surface using an unsigned distance field. We then automatically remove any interior surface components. Finally, we exploit the manifoldness of the offset surface to quickly detect interior distance field grid points. We prove that exterior grid points can reuse a shifted original unsigned distance field, whereas for interior cells, we compute the signed field from the offset surface geometry. We demonstrate improved performance both using exact distance fields computed using an octree, and approximate distance fields computed using fast marching. We analyze the time and memory costs for complex meshes that include self-intersections and non-manifold geometry. We demonstrate the effectiveness of our algorithm by using the signed distance field for collision detection and generation of tetrahedral meshes for physically based simulation.