• Stars
    star
    1,889
  • Rank 24,550 (Top 0.5 %)
  • Language
    C++
  • License
    MIT License
  • Created over 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PositionBasedDynamics is a library for the physically-based simulation of rigid bodies, deformable solids and fluids.

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

More Repositories

1

SPlisHSPlasH

SPlisHSPlasH is an open-source library for the physically-based simulation of fluids.
C++
1,553
star
2

Discregrid

A static C++ library for the generation of discrete functions on a box-shaped domain. This is especially suited for the discretization of signed distance fields.
C++
285
star
3

SPH-Tutorial

A course on Smoothed Particle Hydrodynamics (SPH)
172
star
4

TriangleMeshDistance

Header only, single file, simple and efficient C++11 library to compute the signed distance function (SDF) to a triangle mesh
C++
157
star
5

CompactNSearch

A C++ library to compute neighborhood information for point clouds within a fixed radius. Suitable for many applications, e.g. neighborhood search for SPH fluid simulations.
C++
156
star
6

splashsurf

Surface reconstruction library and CLI for particle data from SPH simulations, written in Rust.
Rust
120
star
7

fenris

A library for advanced finite element computations in Rust
Rust
119
star
8

cuNSearch

A C++/CUDA library to efficiently compute neighborhood information on the GPU for 3D point clouds within a fixed radius.
Cuda
93
star
9

FastCorotatedFEM

FastCorotatedFEM is a minimalistic implementation of the corotated FEM method which was proposed in paper "Fast Corotated FEM using Operator Splitting" by Kugelstadt et al.
C++
72
star
10

TreeNSearch

C++ library for fast computation of neighbor lists in point clouds.
C++
52
star
11

blender-sequence-loader

An addon for Blender enabling just-in-time loading and animation of mesh and particle/ point-cloud sequences.
Python
49
star
12

physics-simulation

Introduction to state-of-the-art simulation methods for rigid bodies, deformable solids and fluids in the area of visual computing
41
star
13

Latex4CorelDRAW

This is a addon for CorelDRAW. It allows to add and edit Latex equations or symbols easily.
C#
32
star
14

BlenderPartioTools

BlenderPartioTools is an open-source add-on to import particle data in Blender.
C++
31
star
15

stark

Stark is a C++ and Python simulation platform for the robust simulation of rigid and deformable objects in a strongly coupled manner.
C++
31
star
16

MayaPartioTools

MayaPartioTools is an open-source plugin to visualize and import particle data in Maya.
C++
26
star
17

GenericParameters

GenericParameters is a C++ header-only library to define generic parameters which store additional information like the parameter type, max/min limits, a description, etc.
C++
23
star
18

higher_order_embedded_fem

Source code for our paper "Higher-order finite elements for embedded simulation"
Rust
22
star
19

Latex4PowerPoint

This is a Latex Add-In for Powerpoint. It enables to add and edit Latex equations or symbols in a Powerpoint slide easily. The Add-In is based on ScintillaNET and supports syntax highlighting, code snippets etc.
C#
16
star
20

stark_micropolar

Fork of "stark" with source code for our paper "Curved Three-Director Cosserat Shells with Strong Coupling"
C++
8
star
21

physics-simulation.org

4
star
22

MayaMeshTools

MayaMeshTools is an open-source plugin to import single mesh files and sequences of mesh files in Maya.
C++
4
star
23

stark_magnetic

Fork of "stark" with source code for our paper "Strongly Coupled Simulation of Magnetic Rigid Bodies"
C++
1
star