Abstract
Collision detection remains a primary computational bottleneck in physically based simulations. Traditional methods, such as Bounding Volume Hierarchies (BVH) and voxelized Signed Distance Functions (SDFs), often struggle with GPU-unfriendly branching or prohibitive memory costs at high resolutions. This paper proposes the use of Neural Implicit Surfaces—Multi-Layer Perceptrons (MLPs) trained as SDFs—to provide a compact, differentiable, and highly parallelizable alternative. Our approach leverages Fourier features to capture fine geometric details and automatic differentiation to compute exact surface normals. We demonstrate that Neural SDFs can perform millions of collision queries in milliseconds, significantly outperforming traditional acceleration structures while maintaining a minimal memory footprint.
Introduction
In complex physics simulations, such as cloth draping over intricate geometries, the system must continuously perform collision queries to prevent interpenetration. Historically, two paradigms have dominated:
- Bounding Volume Hierarchies (BVH): These tree-based structures are efficient on CPUs but suffer from "warp divergence" on GPUs due to their branching nature.
- Voxelized SDFs: These offer constant-time lookups but suffer from cubic memory scaling, making high-resolution models impractical for memory-constrained environments.
We introduce a "middle ground" that utilizes the representational power of neural networks to encode geometry. By mapping 3D coordinates to signed distances through an MLP, we achieve a branch-free execution path that is ideally suited for modern parallel hardware.
Methodology
The core of our method is the Neural SDF, where an MLP learns a function $f(p) = d$, representing the signed distance from point $p$ to the surface.
Technical Components
- Fourier Features: To overcome the spectral bias of standard MLPs and capture high-frequency details (e.g., the scales of the Stanford Dragon), we map input coordinates into a higher-dimensional space using Fourier features.
- Automatic Differentiation: Unlike discrete grids, the neural representation is continuous and differentiable. We use backpropagation to compute the exact gradient $\nabla f(p)$, which provides the surface normal required for calculating collision responses.
- Integration: The solver is integrated into a TensorFlow-based cloth simulator, allowing for end-to-end differentiable physics pipelines.
Performance and Results
We evaluated our approach against a parallelized KD-Tree and a voxelized SDF ($N=256$) using the Stanford Bunny and Dragon models.
Speed and Scalability
As shown in the table below, the Neural SDF exhibits superior performance for large-scale queries. For 1 million points, the Neural SDF completes the task in approximately 255–350ms, whereas the KD-Tree requires up to 9.9 seconds. Crucially, the query time for a Neural SDF is independent of the original mesh's triangle count, depending only on the network architecture.
Memory and Accuracy
The Neural SDF for the complex Dragon model requires only 2.01MB of memory, a 30x reduction compared to the 64MB required for a 256-resolution voxel grid. Despite this compression, the reconstruction error remains below 0.1mm, ensuring high visual fidelity in simulations.
Discussion and Limitations
While Neural Implicit Surfaces offer significant advantages in speed and memory, certain challenges remain:
- Self-Collisions: The current implementation focuses on object-to-object collisions. Handling self-collisions in deforming cloth remains a target for future work.
- Training Latency: Training a Neural SDF takes several minutes, which is slower than the near-instantaneous construction of a BVH. This makes the method best suited for static or pre-defined collision obstacles.
- Deformability: Extending this framework to dynamic, deforming 3D objects (4D SDFs) is an ongoing area of research.
Summary updated