Skip to content

yuju-lee/PBD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PBD algorithm

Setup

  • Mass points :

    • Mass π’Žπ’Š, position π’™π’Š, velocity π’—π’Š
  • Constraints :

    • e.g. spring(distance) constraint
  • Just like mass spring systems

  • Main difference time stepping method

Constraints & Constraint Projection

  • Operate on β€œproposed solution” : π’‘πŸ,…,𝒑𝒏

    • Distance constraint (spring) : π‘ͺπ’‘π’Š,𝒑𝒋=π’‘π’Šβˆ’π’‘π’‹βˆ’π’…

    • The most primitive of geometric constraints, distance based constraints restore mesh edges that extend or compress relative to their rest length

  • Projection

    • Task : update state π’‘πŸ,…,𝒑𝒏so that the constraints are approximately satisfied

    • PBD uses local linearization : one constraint at a time

    • PBD use only first derivatives

Constraint Projection

-Main idea of PBD

  • Project constraints one by one

  • One descent step per constraint

  • Why this works better?

    • π’‘π’Šare immediately updated

    • Next linearization works with the updated state

Constraint Projection Math

  • Taylor expansion :

    • π‘ͺ𝒑+Ξ”π’‘β‰ˆπ‘ͺ𝒑+πœ΅π’‘π‘ͺπ’‘βˆ™Ξ”π’‘=𝟎
  • Step :

    • Δ𝒑=π€πœ΅π’‘π‘ͺ𝒑

Putting together :

  • Δ𝒑=βˆ’π‘ͺ(𝒑)/|πœ΅π’‘π‘ͺ(𝒑)|^𝟐*πœ΅π’‘π‘ͺ𝒑

Other Constraint : Bending

  • Important for cloth and thin shells

  • How to measure bending?

    • Simple way : cross spring

    • Drawback : interferes with in plane stretching

Pressure Constraints

  • Constraint on volume of closed mesh

    • e.g. Cloth balloons

    • image

      • π’—πŸŽ: original volume

      • π’Œπ’‘π’“π’†π’”π’”π’–π’“π’†: over pressure factor

Collision Constraints

  • Assume : collisions already detected

    • Simple objects : easy
  • Similar as penalty forces (but constraints)

About

Position based dynamics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published