pip install -r requirements.txt
-
XPBD
-
Constraints
- Spring Constraints
- Bending Constraints
- Non-penetration Constraints
-
Solver
- Jacobi
- [WIP] Parallel Gauss-Seidel
-
-
Collision detection
- Broad phase
- Parallel AABB BVH Construction/Traversal
- Spatial Hashing
- Narrow phase
- Vertex-Triangle
- [WIP] Edge-Edge
- Broad phase
-
Utilities
- GUI for setting XPBD parameters in runtime
- Vertex selection (for setting fixed)
- Exporting simulated meshes
python main.py
- 'r' : reset simulation
- ' ' : run/stop simulation
The mesh data(i.e., *.obj) are in the "starlab_physics/models/OBJ" folder.
In "starlab_physics/Scenes/concat_test.py" file,
model_dir = str(model_path / "OBJ")
model_names = []
trans_list = []
scale_list = []
...
offsets = concat_mesh(concat_model_name, model_dir, model_names, trans_list, scale_list)
fill in ... with your mesh data, as follows:
model_names.append("your-obj-name.obj")
trans_list.append([x, y, z])
scale_list.append(size)
- Lauterbach, Christian, et al. "Fast BVH construction on GPUs." Computer Graphics Forum. Vol. 28. No. 2. Oxford, UK: Blackwell Publishing Ltd, 2009.
- Macklin, Miles, Matthias Müller, and Nuttapong Chentanez. "XPBD: position-based simulation of compliant constrained dynamics." Proceedings of the 9th International Conference on Motion in Games. 2016. 3Lauterbach, Christian, et al. "Fast BVH construction on GPUs." Computer Graphics Forum. Vol. 28. No. 2. Oxford, UK: Blackwell Publishing Ltd, 2009.