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

pyPBD-2.2.1-cp310-cp310-win_amd64.whl (602.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

pyPBD-2.2.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (783.7 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.1-cp39-cp39-win_amd64.whl (601.9 kB view details)

Uploaded CPython 3.9 Windows x86-64

pyPBD-2.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (784.1 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.1-cp38-cp38-win_amd64.whl (601.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

pyPBD-2.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (783.6 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pyPBD-2.2.1-cp37-cp37m-win_amd64.whl (594.0 kB view details)

Uploaded CPython 3.7m Windows x86-64

pyPBD-2.2.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (799.8 kB view details)

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

pyPBD-2.2.1-cp36-cp36m-win_amd64.whl (593.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

pyPBD-2.2.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (799.4 kB view details)

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

File details

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

File metadata

  • Download URL: pyPBD-2.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 602.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for pyPBD-2.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6a7eda510f3647df5dd7b70ac4772060c3f49b246eb9850fb1e3933620d3ea02
MD5 b5ebe8adaaa7d6626fd65a433fafe043
BLAKE2b-256 d2bca6ee7137772c39b9735e0314db6a5053f20497944c6ac4da56ca7645e110

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b138d699321a29454edf4fb1f9aeda8972fbe9346f9bad14bfb0035f2b07d411
MD5 d9cb655ae0a1e4f4e4908abf7bd9fb8f
BLAKE2b-256 ced1ab75454e426a4ea5370b2f203d239fd305ebf34d02088ad4cbd487635270

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ded0b3343fde85215cc37ff11700c1876ab983112263ae1ddae9e31c483e632b
MD5 1a25e2fcbebc43ca1ce0c3f89aafbea3
BLAKE2b-256 a96c4a259c7c3144202ec442dfe5211e7ccd938e2b4151ec2c62d2fb6bee956b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.1-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 85789f34190aaa3f682f52f2ccfca2c335949554a8f5679908248a8596c0edd1
MD5 72bdeb9ede80f46c143aa94666e8dcdd
BLAKE2b-256 f68269c8465cdab5cfdbd0e8531a3e0f8cd1a4c11f8b299509802d85b5fa4141

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyPBD-2.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6f302b425b58e676d6dae078b9d6c61d5a434c8f76f82d7a20b192951daa89c1
MD5 741cb77ff9a00caeeb06d532bc4635d4
BLAKE2b-256 fd9e9bd71267c478d6ba7fb45b5b1e1690e5e647b9e21cc5c28a0a9846976876

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 203065e49df8efe51e261c96a9d6a5b10d71c8d8e9740fd930f5ee48876c817b
MD5 2b49b5bdad7c53ce88f35c5e2c7c0fb3
BLAKE2b-256 ddc0764f77524a1ee2d86854562e72a6211522ff56951176a646f651c206772d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.2.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 594.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.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 42629258aed6573ede5258942abff48a3e7802188b12d411e29fe5423a5e2b95
MD5 0b96f2fa088fc1109c8f71ce2709a206
BLAKE2b-256 b597f0e5174ab9b2c7cbd2d13c0bbdb6b00c389758e47ea6392b7c87a10d315b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 260c7219c2f0da71485fa35ff83b154c53880477dcf190d6b1542df03753692e
MD5 13f4d5ca0ce6353c04f090b1f859fcf1
BLAKE2b-256 1984140a66b499c4c4dcf02b844a510a50a7b9f9ec2590ad05f8e50a33320a89

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyPBD-2.2.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 593.7 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.18 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.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 54a383181b091af02b1193c6072b52a1d05c162c26079b34a55ecf75d2021d1f
MD5 7fca5ca1d70b836db2ca1e844bed2924
BLAKE2b-256 fc86a72ea6ef380fb79299432a73e8a0c1e996c9691000d7bd1628d731e06a99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyPBD-2.2.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4c6d200f3043404ded970867589aefe54e1631fe1a9115b10b45327e9c7182a8
MD5 8b93766e1f20a66a4be20aeb8cca3821
BLAKE2b-256 0db0e1473b217f75db1e3cd982f44c173e2e92c77b78c69a5d60a3121f77baea

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