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 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.

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.

Latest Important Changes

  • 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 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.2.0-cp310-cp310-win_amd64.whl (596.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyPBD-2.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (804.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.0-cp39-cp39-win_amd64.whl (596.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyPBD-2.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (805.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.0-cp38-cp38-win_amd64.whl (596.1 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyPBD-2.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (789.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.0-cp37-cp37m-win_amd64.whl (589.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyPBD-2.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (808.0 kB view details)

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

pyPBD-2.2.0-cp36-cp36m-win_amd64.whl (588.6 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyPBD-2.2.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (811.5 kB view details)

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

File details

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

File metadata

  • Download URL: pyPBD-2.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 596.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for pyPBD-2.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 31ea36a8a1c2814274369a3dd57e95021a67c61a532c5a7a8aeb722d9636a72d
MD5 14d63ebcf0844ddd909d5f51e5337319
BLAKE2b-256 55f68bfa778d7427ae6a04e340e963f0aeabf29232c072025d0e36e553a94a02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f37f603ae383b03d57b401268d7b6174d3df51dff3efbb52c6d27700117dc196
MD5 9de76474a441235f25665a0404a0cff0
BLAKE2b-256 71d670c2065af537c48d388818ba233422efc9813c8ccbac3559bb8c2a9e44f3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 7722b0411a7df9a08c7528f2d9f7622c3165734277fac6cdf19a8e03c09f0f57
MD5 cc4c3559a4301c4cc61a0d55339fb86e
BLAKE2b-256 6c9c3d845b6c21c9cc2261954e0c67284fe08f9dd85f9838b6bdf667f02d9edd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0986ee58f185ca81d4f7bb17736fbe100dbc727b24d02648f1b5ac9ae803e373
MD5 206a8478d914ef23cb5251be4535fc13
BLAKE2b-256 5394a00c7de2e06a7b5eaf0bd8c8594bce40d406ac93371adbf4b9b826dcf91e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 792dcb295709b212baaca9d09cf94086606117de32778db6dcba09bf8484e80c
MD5 ab00a7e034c2987ae385022856c5783d
BLAKE2b-256 eeb0b036352801a212aea555a21e77574128f359d9e4a982f6d8aa4d675611f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6578ce34c7463715edcb47c66a43817a9df1b3e40694ba01e5cd2e4c37409889
MD5 79ac3bf438b3ed9b9e66883191a53d52
BLAKE2b-256 4875b0fad649979e4a29f9dcbfbacbc827accd135d68283ae4dd40e5040e44d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 589.0 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.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 17275d26aa7cba816f8826c599bcb5b5f81970e34df346d2f1bc0aebb54bc763
MD5 d08fb76dd6840a7e54ba18281368f1f0
BLAKE2b-256 49a836d9cd7082f23b62053949ab59eae2965fc00dbf67b6d7d32f9fceeff1d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.0-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 07a1fb4d4d2b2a29ff766278b518e0257cd688f416a1728e20f01e2c97836c36
MD5 cacc162a7ff0234543ec24f9c90ba7a3
BLAKE2b-256 fd061e2efddcd8f7437af7c4ccc84f9cfc10f957a19e6eeda1347185dc4f8a26

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.2.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 588.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.13 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.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d28670c1e28a76f59cbeabab19589583a039b31fe70e359e52dd9ceb033643f5
MD5 0d3400daf96c6d1e32c062313bb30cb5
BLAKE2b-256 f3296a4c0999636f35558479ffc48876cac9ef21e00ea1f52fc54035ddc5eb56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.0-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 aa75cb4ba6e5150f7f3f0a24da854426daac2a6224e05ff705d62efd187d8d02
MD5 57b25769efa66a3809e9de8f8e4e5a1e
BLAKE2b-256 3309fd839d9537aeb7afb1ec4a78c8db1da299615c7d707155b00c0d87523151

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