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.2-cp310-cp310-win_amd64.whl (560.2 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyPBD-2.1.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (716.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.9 Windows x86-64

pyPBD-2.1.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (716.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

pyPBD-2.1.2-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.2-cp37-cp37m-win_amd64.whl (550.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyPBD-2.1.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (737.2 kB view details)

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

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

Uploaded CPython 3.6m Windows x86-64

pyPBD-2.1.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (724.2 kB view details)

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

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

Uploaded CPython 3.5m Windows x86-64

pyPBD-2.1.2-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.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 12f1464d5d92ecb68e6325ada2287779760bd184986dc6e65be428e6b86fc9d2
MD5 ce382e875eaa6d894defc11a4cdc948b
BLAKE2b-256 736f5269e64e1a21ff72caa1363b1de04fda6d27d3f46c4f56b0a93873378352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.1.2-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9ef01c1dae4040687bbfca91d715713afcb37dd0e0545d60ff610bf81a588d66
MD5 7c3431406c9edcdcf12129397b5a211f
BLAKE2b-256 9860411e733d14a29993b085a11920736e2c1bcf24910fdbc6c5bd7f2b9e9d68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 77bef60e05b2dfcf278f5b717fdc4d74c79037e657b4703b6b034a7e1830e41a
MD5 50f99b17751373dfddb09d9befdd9268
BLAKE2b-256 833ba0b35f8c1ff4d6bdf1cb83835e1fef355c52dcb3b9048c1a3d6957967642

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.1.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7d6e543f2225f5fec04b12bc18fe3ac3b05aaec07f43187b8f9773c47edecc51
MD5 c10467bdf28e5739374c62c1b52505a6
BLAKE2b-256 e1a80b573967fd69c79d4f63dfad25d878c791816a753232492bf69c7a97c796

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9b608ebd38a93b0f8d8f2db9a72ccafbdfeff974e05c1fb25abb7b1894f5d50f
MD5 84f816f488fa0efcb436c5fdda094f37
BLAKE2b-256 481e554bb55c7292beb2841b813c35b4c3cbdcbc1d2900c6b1bd105207568bca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.1.2-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 471545fc5ceee8bc45203b33083997a34bca66697136f91a00533e0aa0789cf0
MD5 25a63de1f888c2f05439ca36470a9241
BLAKE2b-256 8f7f44157db77466c8068eaf207514aff72fbecaa606234afef8f3baabaa32a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 a021c14919262014e606d9c801b90cea84ca434ec47d22aec7e1adb69bae7515
MD5 b54adaacb78bd662626033ba8c8631b2
BLAKE2b-256 a79ed9e09c06eb9fdd56a66d0428ad55a84317242d647423057faa7ae60c9643

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.1.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 29852ade215bc7057474a0a4f1ec1da8943434d9460ab5968aea2171dbf65492
MD5 ff99e0e0a1ce1600e16f18fff37adb17
BLAKE2b-256 dd988998368ba5aabb973220b5e723bac97b8e4c91a80718cc11acc8f17b1203

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 36e58dba375c5f00bc059cec01642ea2a2859f8ff7efca98ca213a0ad07414e1
MD5 0c90499e152645e6825113d8b2989df2
BLAKE2b-256 0224da6d73f76493dc473058abf35b2e7301d8010ba9bbcaa2038fa79f34a422

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.1.2-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9b72a4d3927c05e6d8bc6265f485ba1c39e4f676cf7f1c867afb4a2ae71545a1
MD5 32885ec53f4f8eba538a891fcce32680
BLAKE2b-256 f4a987c5d591c3d406779cb2bf33a8cb8c4e9b816cd234aa169825ce58d48805

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 2f26b7840c580e60f654164b3a4cc00de2d9e6eae3744ee6510be1585f259944
MD5 0d1988c87359ef6dec512d1a3e2fe16b
BLAKE2b-256 532fcb1eaf127389112a5d4c137ee72cf908df8b466d1fd9425b42dd5b8a30ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.1.2-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.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 c5b55d45633286a98eb1bc6e29a9d8e813009c18e641def52c7cb063d50d2b7f
MD5 1f7d3027ae4bbbb473a5599696b73fe4
BLAKE2b-256 64388063a961066e2336a247d2351fdaea0928895e033a08a81be8e2edf394fe

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