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

Uploaded CPython 3.10 Windows x86-64

pyPBD-2.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (712.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pyPBD-2.0.1-cp39-cp39-win_amd64.whl (577.1 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyPBD-2.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (713.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyPBD-2.0.1-cp38-cp38-win_amd64.whl (572.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyPBD-2.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (713.5 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyPBD-2.0.1-cp37-cp37m-win_amd64.whl (564.8 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyPBD-2.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (719.3 kB view details)

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

pyPBD-2.0.1-cp36-cp36m-win_amd64.whl (564.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyPBD-2.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (718.7 kB view details)

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

pyPBD-2.0.1-cp35-cp35m-win_amd64.whl (564.5 kB view details)

Uploaded CPython 3.5m Windows x86-64

pyPBD-2.0.1-cp27-cp27m-win_amd64.whl (568.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b88881c21a56bf755ade61a00ce80068084401c017f5fc78cfd9026451bd0424
MD5 3422dd899afa27053da0f07cf7e1cf0e
BLAKE2b-256 f7a386677d26be5a57651ef45e3527af93a9239c4bab18536665dc0b8abf33a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.0.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 003f6dae0633cbcc0f21afacb1080c56d2b51475903d47e74747c995a6588622
MD5 83d1e4cd399e54d4c88644372a3d2359
BLAKE2b-256 2ed59f4d89b2014ec128295eeae8f4df9e14a53b53a1dd033df4405ea6715739

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 577.1 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.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 beb9a6c6358634b7e724678a3be92f00bfc1395a80f186ea968c658ed7fa5928
MD5 2850c5ebdcb363b08fc07206c1bbe78c
BLAKE2b-256 98a02ad5356390c049bcde981eb4647e5f4526629b2e5963c5e2777e8abfdf53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.0.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7e3a1021786a0126c1fe4a2f3e64e599309aa6606e912079cbe9af591f6c861c
MD5 02b9ee89a848ded2fd2061906e834a31
BLAKE2b-256 86119ce1d2a90334a6524dd58b97c5a245350b132509bd7d6e1daa059d25c41c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 572.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for pyPBD-2.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b541e071528c02a278e4b6b48af2fb269d4e1a653726ab0703b45e40f40604dc
MD5 aeeeed637f134097f7319b60edf84c0a
BLAKE2b-256 af71e5d7b4892e4119495d6dfae49dfba8f921c94a33448b4d8741d67d3c09ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.0.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1602248c9ef8f66a6e502fe76eba0047a63837909b68fae778149c942badb006
MD5 6af17c07d8e76b51034872e8d230e3c5
BLAKE2b-256 03482e282838e059e223816a3dbb1e5fec53119aeabc1d955c354bf0130154c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.0.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 564.8 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.9.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for pyPBD-2.0.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 07f235a2d48c83fa1f52638cd521fc8cd95c32479ea5519401be2f3279354ca2
MD5 9aa9d3cdc831aff929d07d11a245fa76
BLAKE2b-256 fb4c3281afa63e97501b8c855b7df8f9e63d2cb6cc3e8406fe6bc9744772bd63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.0.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 29db1357cff2aef46700fa41e585096a75d86629fb01534d7d7e73e700e539fd
MD5 e2495469d475f046ef775090911606e8
BLAKE2b-256 e410a40a62bbf2f0957a2f07b6c4bb5ab9b2ba3c1067b969c42df3c6d0689aac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.0.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 564.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.8

File hashes

Hashes for pyPBD-2.0.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 dd83af994bd56f7b414d99f66f08db622690b1dab8811afb99cbe615eb40d884
MD5 cba386f53dfe9c5b2d332206d0bfee63
BLAKE2b-256 10a951b304eb74f8c46cba296e899007defb5421f81ad77295b100634a46168d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.0.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ae760addde72c595de53baae89f9ae57e52c17a60b30ef8ca668269eb1e99339
MD5 9a61e7b8d7665040c50666c71a133456
BLAKE2b-256 4f1ff52e50e205f82b161d44ad89a49dd14a7564128c54f408afd9397bbeb0c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.0.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 564.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.62.3 CPython/3.5.4

File hashes

Hashes for pyPBD-2.0.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 3ac8c896e43ed8d85e96de104ee3b504cebd298b41652842614b301ee2f350b9
MD5 a0051243f9a1051ac3935be0224ee62b
BLAKE2b-256 1f6fd42ce529f80e170180571b0fa14199655b367f435dc86ae73a4c0e9cb1d7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.0.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 0cdda877fec673623f4a58f59d903ed791c5687022d677ac37393aaaa8433006
MD5 6654d3a1f5a81deac4d77d2e461ab176
BLAKE2b-256 635a675b66bd0ee5a008557c03b3cf92d5956b58d2d76ab9f977122d1e0ea2e5

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