Skip to main content

PBD Project Python Bindings

Project description

PositionBasedDynamics

      Documentation Status

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, hapPLY and imgui (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.

Documentation

The documentation can be found 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. If you do not meet these conditions please refer to the build instructions and to the python binding Getting started guide.

Latest Important Changes

  • GUI is now based on imgui
  • added support of PLY files
  • 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 (eXtended) 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

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

If you're not sure about the file name format, learn more about wheel file names.

pypbd-2.2.2-cp313-cp313-win_amd64.whl (656.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pypbd-2.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (957.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pypbd-2.2.2-cp312-cp312-win_amd64.whl (656.6 kB view details)

Uploaded CPython 3.12Windows x86-64

pypbd-2.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (957.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pypbd-2.2.2-cp311-cp311-win_amd64.whl (656.6 kB view details)

Uploaded CPython 3.11Windows x86-64

pypbd-2.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (953.7 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pypbd-2.2.2-cp310-cp310-win_amd64.whl (655.8 kB view details)

Uploaded CPython 3.10Windows x86-64

pypbd-2.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (953.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pypbd-2.2.2-cp39-cp39-win_amd64.whl (654.1 kB view details)

Uploaded CPython 3.9Windows x86-64

pypbd-2.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (953.4 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pypbd-2.2.2-cp38-cp38-win_amd64.whl (655.4 kB view details)

Uploaded CPython 3.8Windows x86-64

pypbd-2.2.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (952.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyPBD-2.2.2-cp37-cp37m-win_amd64.whl (656.6 kB view details)

Uploaded CPython 3.7mWindows x86-64

pyPBD-2.2.2-cp36-cp36m-win_amd64.whl (656.5 kB view details)

Uploaded CPython 3.6mWindows x86-64

File details

Details for the file pypbd-2.2.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 656.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pypbd-2.2.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ee8956b0daaa9c8ba4609b729ffaece7b336c4f7bf09e524708626efc169d52b
MD5 bcb787d28c45d2da628c6ff9c5d2ff7e
BLAKE2b-256 246855fec2195af6e59fd32233cfae567308e1c635612b785f7d86e75d66036e

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 32f79951a4bb540a54b8d65a780f92112df409c40eb619bd6efa6693b9cdffd1
MD5 a1f792c7f67956756bf9f218c1835419
BLAKE2b-256 d48ed05f87be2cbebb7accdb10b81f4f77d10acdf38565bf1e1452debf8a259c

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 656.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pypbd-2.2.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4ace6db13d1bcf52f0b861ef110debc5ed5874da1076fe21205a97ca3274260d
MD5 48c5c2e1f65b8ccf907c11f9226b46ad
BLAKE2b-256 8f8959dae2c4d57595fbaa96e38c973e16d1cb1f459c55e38df46d16a13dd6bb

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5147c9c73e6f51e2963f664e90336a8813a4b37f19c2c20369e5b1ddad59834
MD5 8b9d7503ff4a301ecc61034429678213
BLAKE2b-256 ab13821cbc8c8b14d049e9cf81b6e99702df76527ada96ae539e83005230e3b6

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 656.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for pypbd-2.2.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4528b40d7808db54def3be4cc0783186bae714abc58395773b2e573d7d4fafff
MD5 270bf8fdc92a826d79e8c79a28d6019a
BLAKE2b-256 a2d855cf133a15077a9f7242a3cb3aef48396a4d47019a8073ca038f02c6cb17

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f02f3d38717c3890f1d7e95aa32af3896bd948db355d987b870b61dfad0d4782
MD5 b22b07d1b5d96defa92fa0f36cb7ff4c
BLAKE2b-256 29e438f676e0f9d387e171652480de37ba597a198dfb2f4d462841dcbc21c279

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 655.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.11

File hashes

Hashes for pypbd-2.2.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 436e6f06220a975f94db997d9efb4bbaee0560522d1fd76c5d387b4d445d7827
MD5 1aafd7fc824320b1210c472122363977
BLAKE2b-256 ecc23e12ac781f94205b5bbc73778a12911dc9fb83790fb76b5f13b63f436594

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e713a8116d36b3adf9c8043bcb910e97c3fafcdefdb04b17c3725f828356e90
MD5 38a27a5385e374335eb514b158b00683
BLAKE2b-256 befaece2ce2732764919744015772cc0ecf09c64a7eb1c0e85808f5ab6f3c8de

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 654.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for pypbd-2.2.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 009ca6ae04c647c08da3af4d06965150feb3f35aacf9136d398d06ba156b2995
MD5 ea6d9ded12d7f84c5be8462e1f771b33
BLAKE2b-256 56bfad5899e228871a886ff244211a2585d4f1ffab48e39785698d2cf523d10f

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dbf4a0acf7390e475bad1286a84e5bd018e3bdc4783f95569675deaf98d71962
MD5 2bb3f1aeb0a675a8c93d1b08e9e23c8c
BLAKE2b-256 b99c81b58d900facd6d66f86bd4c20edb60e82be840307596b02596c641d3fe6

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pypbd-2.2.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 655.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for pypbd-2.2.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5b55a3005254eb1d72c182fd74a0a0566512ebc5a332fe2517f642afac191a6c
MD5 18c451d569a600d2d46f1d53255bfb20
BLAKE2b-256 24ca32e33f0b5b7dd40c4411233126f61650dcd1fc56509dc4a7802121f46fd9

See more details on using hashes here.

File details

Details for the file pypbd-2.2.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pypbd-2.2.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 857a67f6a4160aa95b5a1221df5d6c29f1d5a2d2ac4d722562e23cefdef21c3e
MD5 029d71907c9a60960f27f20e5e9785b7
BLAKE2b-256 f3efa513ea464bd4f4b1b0cfc469bbd35044df4e8a2c95a69302e0aee3683eae

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.2.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 8a64b43d62a7de3ae99303e7c9acfc5fa44b92e6461761a7b147d00adadbd595
MD5 624cdd3651d844d3db59027ab0b29c27
BLAKE2b-256 c5852d70440a5046b50039281193efff76dda0c0016a310224f386c83d45ab7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.2.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 656.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 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.2.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 eaa09b7b96c1e840ccdb72c03664230b2af6da856dfdd8ba1ab85a251a0ea61f
MD5 5474310c89d82e6e341fda1ed7953dae
BLAKE2b-256 a58f03c08eadabf73af0f87d6a49b47b33c742a4b661c440b9bd39666c04146e

See more details on using hashes here.

Supported by

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