Fast, robust, accurate, intersection-free rigid body simulations with contact forces and joint constraints based on Affine Body Dynamics
This is an implementation of the Affine Body Dynamics method as described and developed by Lei Lan et al. The code is based on the Rigid IPC implementation by Zachary Ferguson et al.
| DSUB - 25pin | Gripper |
|---|---|
![]() |
![]() |
| Gear assembly | BNC |
|---|---|
![]() |
![]() |
| Nut and Bolt | Slope |
|---|---|
![]() |
![]() |
| USB | Peg Insertion |
|---|---|
![]() |
![]() |
| Pendulum | Failing Cube |
|---|---|
![]() |
![]() |
Comparisons between Rigid IPC and Affine Body Dynamics can be found under ABD Vs. RigidIPC
WARNING: The build process will automatically download the dependencies listed in the Dependencies section below. Please make sure to check their associated licenses to ensure compliance.
To build the project, use the following commands from the root directory of the project:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..Depending on the system, this will generate either a .sln project on Windows or a make file for a Linux system.
The following flags might be needed for cmake
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES=75 ..We take as input a single JSON file that specifies the mesh and initial conditions for each body. The inputs directory contains example scenes.
The BNC scene above for instance uses the JSON file inputs/bnc_crimp/bnc.json.
To start the tool, run the following command:
abd_sim.exe --scene-path /project_dir/inputs/bnc_crimp/bnc.jsonFor the full list of options, run:
abd_sim.exe --helpBy default, a GUI will be launched as shown below:
You can then click the play radio button to start the simulation.
All dependancies are downloaded through CMake depending on the build options. The following libraries are used in this project:
- IPC Toolkit: common IPC functions
- Eigen: linear algebra
- libigl: basic geometry functions, predicates, and viewer
- TBB: parallelization
- Tight Inclusion CCD: correct (conservative) continuous collision detection between triangle meshes in 3D
- spdlog: logging information
- filib: interval arithmetic
- Niels Lohmann's JSON: parsing input JSON scenes
- tinygltf: exporting simulation animation to GLTF format
- finite-diff: finite difference comparisons
- Only used by the unit tests and when
ABD_WITH_DERIVATIVE_CHECK=ON
- Only used by the unit tests and when
- Catch2: unit tests
This is an implementation of the Affine Body Dynamics method as described and developed by Lei Lan et al. And the code is based on the Rigid IPC implementation by Zachary Ferguson et al.
-
Lan, L., Kaufman, D. M., Li, M., Jiang, C., & Yang, Y. (2022). Affine body dynamics: Fast, stable & intersection-free simulation of stiff materials. arXiv preprint arXiv:2201.10022.
-
Ferguson, Z., Li, M., Schneider, T., Gil-Ureta, F., Langlois, T., Jiang, C. & Panozzo, D. (2021). Intersection-free rigid body dynamics. ACM Transactions on Graphics, 40(4).










