MetalAVBD is a GPU-accelerated implementation of the Augmented Vertex Block Descent (AVBD) solver in Metal 4.
This project is a Metal-based realization of the research project from the University of Utah:
Augmented Vertex Block Descent
Chris Giles, Elie Diaz, and Cem Yuksel
ACM Transactions on Graphics (Proceedings of SIGGRAPH 2025)
- Official Project Page - Research details and comparisons.
- Research Paper (PDF) - Deep dive into the Augmented Lagrangian formulation.
- YouTube Video - Official demonstration of the solver from the research authors.
Following the principles of the AVBD research, this implementation offers:
- Unconditional Stability: Converges toward the implicit Euler solution, ensuring physical correctness even with large timesteps.
- Augmented Lagrangian Formulation: Handles hard constraints with infinite stiffness without numerical instabilities or the "softness" common in traditional penalty methods.
- Convergence: Improved convergence rates in scenes with high stiffness ratios.
- GPU Pipeline:
- Full GPU broadphase using spatial hashing.
- Parallel Gauss-Seidel solver utilizing contact-aware body coloring for deterministic stability.
- Scale: Capable of simulating millions of interacting objects in real-time.
This project is optimized for modern Apple Silicon and Metal 4 features:
- GPU Task Scheduling: Leverages adjacency-based coloring to orchestrate constraint solving with minimal contention.
- Descriptor Management: Uses Argument Tables and Residency Sets for efficient resource access.
- Atomic Memory Management: Optimized compute shaders using atomic batching to manage dynamic contact manifolds and allocations on the GPU.
- Diverse Primitive Manifolds:
- Box (SAT): Accurate face/edge/vertex collision.
- Sphere: Analytical geometry checks.
- Torus: Advanced collision manifold generation via approximate sphere decomposition.
- SDF (Signed Distance Field): High-performance collision against complex mesh geometry using pre-generated 3D volumes.
- SDF Visualization: Real-time raymarching visualizer for debugging and inspecting SDF volume alignment and quality.
- SDF-to-SDF Collision: Currently, collision detection between two SDF-based objects is not implemented. Only Primitive-to-SDF collisions are supported.
- Device: Physical iOS device (A17 Pro / M1 or later) or Apple Silicon Mac.
- OS: iOS 18.0+ / macOS 15.0+ (Metal 4 support required).
- Tooling: Xcode 16.0+
Important
This project utilizes advanced Metal features and cannot be run on the iOS Simulator. Please use a physical device or the "macOS Designed for iPad" destination.
This implementation is independent of the original authors' code but is built strictly according to the mathematical foundations laid out in their research.
- Original Research: University of Utah Graphics Lab
- License: This project is licensed under the MIT License - see the LICENSE file for details.
