Skip to main content

PBD Project Python Bindings

Project description

PositionBasedDynamics

  

This library supports the physically-based simulation of mechanical effects. In the last years position-based simulation methods have become popular in the graphics community. In contrast to classical simulation approaches these methods compute the position changes in each simulation step directly, based on the solution of a quasi-static problem. Therefore, position-based approaches are fast, stable and controllable which make them well-suited for use in interactive environments. However, these methods are generally not as accurate as force-based methods but still provide visual plausibility. Hence, the main application areas of position-based simulation are virtual reality, computer games and special effects in movies and commercials.

The PositionBasedDynamics library allows the position-based handling of many types of constraints in a physically-based simulation. The library uses CMake, Eigen, json, pybind, glfw and AntTweakBar (only for the demos). All external dependencies are included.

Furthermore we use our own library:

  • Discregrid to generate cubic signed distance fields for the collision detection

Author: Jan Bender, License: MIT

News

  • We added a Python interface: pyPBD
  • Our new paper about a Direct Position-Based Solver for Stiff Rods uses the PositionBasedDynamics library. You can watch the video here.
  • PBD now has a collision detection based on cubic signed distance fields
  • SPlisHSPlasH is our new open-source fluid simulator which uses the PositionBasedDynamics library to handle rigid-fluid coupling. It can be downloaded here: https://github.com/InteractiveComputerGraphics/SPlisHSPlasH
  • Our new paper about adaptive signed distance fields uses the PositionBasedDynamics library. You can watch the video here.

Forum

On our GitHub discussions page you can ask questions, discuss about simulation topics, and share ideas.

Build Instructions

This project is based on CMake. Simply generate project, Makefiles, etc. using CMake and compile the project with the compiler of your choice. The code was tested with the following configurations:

  • Windows 10 64-bit, CMake 3.9.5, Visual Studio 2019
  • Debian 9 64-bit, CMake 3.12.3, GCC 6.3.0.

Note: Please use a 64-bit target on a 64-bit operating system. 32-bit builds on a 64-bit OS are not supported.

Python Installation Instruction

For Windows and Linux targets there exists prebuilt python wheel files which can be installed using

pip install pypbd

These are available for different Python Versions. See also here: pyPBD.

Documentation

The API documentation can be found here:

http://www.interactive-graphics.de/PositionBasedDynamics/doc/html

Latest Important Changes

  • added Python binding
  • added some XPBD constraints
  • added OBJ export
  • added substepping
  • added DamperJoint
  • improved implementation of slider and hinge joints/motors
  • Crispin Deul added the implementation of his paper Deul, Kugelstadt, Weiler, Bender, "Direct Position-Based Solver for Stiff Rods", Computer Graphics Forum 2018 and a corresponding demo
  • added collision detection for arbitrary meshes based on cubic signed distance fields
  • added implementation of the paper Kugelstadt, Schoemer, "Position and Orientation Based Cosserat Rods", SCA 2016
  • removed Boost dependency
  • added SceneGenerator.py to generate new scenarios easily by simple Python scripting
  • added scene loader based on json
  • added collision detection based on distance functions
  • added collision handling for rigid and deformable bodies
  • high resolution visualization mesh can be attached to a deformable body
  • added support for Mac OS X
  • added automatic computation of inertia tensor for arbitrary triangle meshes
  • added OBJ file loader
  • parallelized unified solver using graph coloring
  • implemented unified solver for rigid bodies and deformable solids

Features

  • Physically-based simulation with position-based constraint handling.
  • Simple interface
  • Demos
  • Library is free even for commercial applications.
  • Collision detection based on cubic signed distance fields
  • Library supports many constraints:
    • Elastic rods:
      • bend-twist constraint
      • stretch-shear constraint
      • Cosserat constraint
    • Deformable solids:
      • point-point distance constraint (PBD & XPBD)
      • point-edge distance constraint
      • point-triangle distance constraint
      • edge-edge distance constraint
      • dihedral bending constraint
      • isometric bending constraint (PBD & XPBD)
      • volume constraint (PBD & XPBD)
      • shape matching
      • FEM-based PBD (2D & 3D)
      • strain-based dynamics (2D & 3D)
    • Fluids:
      • position-based fluids
    • Rigid bodies:
      • contact constraints
      • ball joint
      • ball-on-line-joint
      • hinge joint
      • target angle motor hinge joint
      • target velocity motor hinge joint
      • universal joint
      • slider joint
      • target position motor slider joint
      • target velocity motor slider joint
      • ball joint between rigid body and particle
      • distance joint
      • damper joint
      • implicit spring
    • Generic constraints

Videos

The following videos were generated using the PositionBasedDynamics library:

Hierarchical hp-Adaptive Signed Distance Fields Direct Position-Based Solver for Stiff Rods
Video Video

Screenshots

Cloth demo

References

  • J. Bender, M. Müller and M. Macklin, "Position-Based Simulation Methods in Computer Graphics", In Tutorial Proceedings of Eurographics, 2015
  • J. Bender, D. Koschier, P. Charrier and D. Weber, ""Position-based simulation of continuous materials", Computers & Graphics 44, 2014
  • J. Bender, M. Müller, M. A. Otaduy, M. Teschner and M. Macklin, "A Survey on Position-Based Simulation Methods in Computer Graphics", Computer Graphics Forum 33, 6, 2014
  • C. Deul, T. Kugelstadt, M. Weiler, J. Bender, "Direct Position-Based Solver for Stiff Rods", Computer Graphics Forum, 2018
  • C. Deul, P. Charrier and J. Bender, "Position-Based Rigid Body Dynamics", Computer Animation and Virtual Worlds, 2014
  • D. Koschier, C. Deul, M. Brand and J. Bender, "An hp-Adaptive Discretization Algorithm for Signed Distance Field Generation", IEEE Transactions on Visualization and Computer Graphics 23, 2017
  • M. Macklin, M. Müller, N. Chentanez and T.Y. Kim, "Unified particle physics for real-time applications", ACM Trans. Graph. 33, 4, 2014
  • M. Müller, N. Chentanez, T.Y. Kim, M. Macklin, "Strain based dynamics", In Proceedings of the 2014 ACM SIGGRAPH/Eurographics Symposium on Computer Animation, 2014
  • J. Bender, D. Weber and R. Diziol, "Fast and stable cloth simulation based on multi-resolution shape matching", Computers & Graphics 37, 8, 2013
  • R. Diziol, J. Bender and D. Bayer, "Robust Real-Time Deformation of Incompressible Surface Meshes", In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation (SCA), 2011
  • M. Müller and N. Chentanez, "Solid simulation with oriented particles", ACM Trans. Graph. 30, 4, 2011
  • M. Müller, "Hierarchical Position Based Dynamics", In VRIPHYS 08: Fifth Workshop in Virtual Reality Interactions and Physical Simulations, 2008
  • M. Müller, B. Heidelberger, M. Hennix and J. Ratcliff, "Position based dynamics", Journal of Visual Communication and Image Representation 18, 2, 2007
  • M. Müller, B. Heidelberger, M. Teschner and M. Gross, "Meshless deformations based on shape matching", ACM Trans. Graph. 24, 3, 2005
  • M. Macklin and M. Müller, "Position based fluids", ACM Trans. Graph. 32, 4, 2013
  • Dan Koschier, Crispin Deul and Jan Bender, "Hierarchical hp-Adaptive Signed Distance Fields", In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation (SCA), 2016
  • Tassilo Kugelstadt, Elmar Schoemer, "Position and Orientation Based Cosserat Rods", In Proceedings of ACM SIGGRAPH / EUROGRAPHICS Symposium on Computer Animation (SCA), 2016
  • M. Macklin, M. Müller and N. Chentanez, "XPBD: Position-based Simulation of Compliant Constrained Dynamics", Proceedings of the 9th International Conference on Motion in Games (MIG), 2016

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pyPBD-2.1.1-cp310-cp310-win_amd64.whl (560.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyPBD-2.1.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (716.4 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pyPBD-2.1.1-cp39-cp39-win_amd64.whl (560.2 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyPBD-2.1.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (716.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyPBD-2.1.1-cp38-cp38-win_amd64.whl (560.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyPBD-2.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (716.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyPBD-2.1.1-cp37-cp37m-win_amd64.whl (550.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyPBD-2.1.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (724.1 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pyPBD-2.1.1-cp36-cp36m-win_amd64.whl (550.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyPBD-2.1.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (722.9 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

pyPBD-2.1.1-cp35-cp35m-win_amd64.whl (550.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

pyPBD-2.1.1-cp27-cp27m-win_amd64.whl (551.6 kB view details)

Uploaded CPython 2.7m Windows x86-64

File details

Details for the file pyPBD-2.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 560.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for pyPBD-2.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b5b331a75f8352bd4b2201b37ccf9d286e0e5239ee0b26f53d49f540142a4163
MD5 3dd6c69329f629ed2cb12be576fc4f0b
BLAKE2b-256 be26c34e76965b6195fb56a86a8d0394203e3ecbb270fe22e7c809e7ff01cb4d

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyPBD-2.1.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 71b923b644fc241bc2e17a5a6ddcc5a359bf733654639647a93dd3fb214ceb84
MD5 e38f8c87c3ddee056d49289afea08459
BLAKE2b-256 3b4ea5d05852fd5eb95dead72a0e1039cc5fabe6514ac85aacb952b12e3b7479

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 560.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyPBD-2.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5c7a49571989f1d65e349f6bfefe979be7dc4af7f5ebc211c5e3dcc0538ef868
MD5 9d5cda96bad83f3aedcd576911c6d99c
BLAKE2b-256 46c3024ee159fe899c086eedd59990880a67d9914ccac8ffb3445ce139bb90a7

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyPBD-2.1.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 69c34688213b0711b6b49fe2f22766dfab66f55636ba5eedc6ea21e985b227d3
MD5 73fa648a2b4448155663dd9b8d764cd4
BLAKE2b-256 60b485c87b2ae799c42882c78cd1b002aba2ee162e14f70429b4ff45c9c74112

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 560.1 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for pyPBD-2.1.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e6b01084daf8808ba81becaf156061f8175c98a3413a50bfe43c43e456d45dce
MD5 71d5f8f00aac04ec96caa95e79a61c81
BLAKE2b-256 ecee9c9f606b1391ba867769bd3c9b16242230de3db248e1db46de9af9e7aec4

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyPBD-2.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ec655f85f6cfc25d96824f0f6af829db417c8254bdd7f928d7e6d7d0333736b5
MD5 834e63b9e6187fcf0d5832ebdd78ff45
BLAKE2b-256 fd18bb4e65456163c8fdc1abea4bd91add7312d11e9748c0f9f0724251150a81

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 550.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.9

File hashes

Hashes for pyPBD-2.1.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2ce8d0a423aeaad3342be2ac9e83a35cbaa015ac63d43c27efb0d55130c02640
MD5 77fa7b20d5339472372a65eba60336ad
BLAKE2b-256 a9dedcf82d787ffdfdc323c161bc8b39d485c2370fa316a62e5e5b7a87f5cad8

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyPBD-2.1.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 45678e77fc2f64f6c51f5063616308c9a1a57c9114c204fa5ed37aaddf20fbec
MD5 d13bfa18a997acc3f40ea23d568cc93e
BLAKE2b-256 25b9dd3b67c02a2f67e92a084dea83b09e12913fabe2d2acadd688152097d991

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 550.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for pyPBD-2.1.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2cd9747c8d4fc5659af00ad5ace9ce9d8669a45b609172592b76766eb406e87b
MD5 80d2043cdf9d3d468e07a6f8841636b9
BLAKE2b-256 811d93c63c452a3bcb3f356d8a68d42a769609bb50022cc0573c72a7184bda13

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pyPBD-2.1.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 519616f8d9425448932f6829f360efca572f2fa4ec76e5ab81e7c70d78d0382e
MD5 3d22b99733b2d1b9485357305df9f641
BLAKE2b-256 d9e4026c2e7df3b9493875d590f0849da306d9b60e41d07fd0f2f24e2e457165

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 550.5 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.5.4

File hashes

Hashes for pyPBD-2.1.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 389693ec4ec6efa23d25f1466eca70f60db9bd53247a6765dbb4d9b51a354a55
MD5 97e68d160a7c3b097bf0c5b4c1550b4a
BLAKE2b-256 ea8e91306c39b92586258ec39586d487b6c6ff8223e7cad2ca4a5f4e69593012

See more details on using hashes here.

File details

Details for the file pyPBD-2.1.1-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 551.6 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/2.7.18

File hashes

Hashes for pyPBD-2.1.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 d95fa468ed0c632e2d67592d7342a4f7b1c467090a25893893d49d24241a4ff6
MD5 db05592a758819b77743f0fab439df6f
BLAKE2b-256 c38643dbc9ee27af1b39cf0f685fd897bd64fb1257dc4e02344e9e625a233fb8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page