Matthias, thank you for these videos. It's a great way to get started with PBD and also dive deeper into it! I liked reading the papers - but I think these videos are the way to go to make PBD more popular ...
That sub-stepping is pretty neat. In a Spiderman game I was trying to make I found that my swings lost energy way too fast and I didn't know how to solve it.
Thanks Matthias. Is the damping due to our bead not following the wire curve, just being placed on the nearest linear point, not curved following the wire?
Verlet integration handles constrains by adjusting previous position, which in some way, seem similar to PBD method. Could you compare the similarities and the differences between PBD vs Verlet. Thanks
I have re-created your example in C++. However, I am using floats, not doubles. When using 100 steps, the quality still improves, but with 1000 steps, the quality deteriorates instead of converging. Is this expected? How do you solve this?
thank you so much for these videos Matthias, they are bloody amazing & super inspiring! Would you be interested in doing a future video on rigid body & self collision implementations for simulations at all? I've recently started working on a personal project to create some cloth using PBD however i've been overwhelmed when trying to figure out a good narrow phase collision detection. Ive seen lots of examples use spatial hashing for the broadphase (Thanks for a video already on it! ) and then for narrow phase ive seen a mixture of techniques such as BHV / KD trees, voxelizing meshes and SDF's ect. Currently i feel even more confused then a did i did before ha :) And once again thank you for the content
Would this converge to the solution quicker? Currently, for all particles we linear velocity project, then, do contraint solve, place bead on wire, which is a curve, so we basically just moved a straight line away from a curve, then moved back to satisfy constraint which was another direction so we lost velocity, and created damping. This is because the projection doesn't take into account the constraint. What if you go through all particles, like usual, add gravity to velocity, then particles distribute its velocity along its constraints, losing force according to inverse masses and constraint damping. For each particle, solve the constraint, A=F/m. Basically we move the particle position along the constraint more along the curve of the constraint because now the particle velocity has been modified to follow the direction of the constraints.
In the original paper, position based dynamics, the author chosen delta p along the gradient with explaination that the choice will conserve both momentum and angular momentum if all particals are of the same mass. Why is it so? Could you please give a mathmatical prove to this statement. Many thanks.
I have wrote a prove to prove that the convervation of momentum and angular momentum is true. That's quite surprising. I wonder what's the mathmatical or physical deep thinking behind the update strategy?
This is very good and those videos are amazing. But for this problem, would it not be even simpler to use SVG and rotate the bead around the center of the big circle? Then all the trigonometry is handled by the SVG engine, the bead stays on the circle by definition (provided it started on the circle) and all we have to do is provide the angle of rotation at each step.
Implicit integration does not care about energy conservation. In some setups this will cause the energy to grow infinitely until the simulation "blows up", but in this example of the bead on a circular wire the tendency will be to lose energy until the bead is sitting still on the bottom of the wire. For the extreme case where the velocity is very high it's quite intuitive to understand why we are losing energy. Let's say the bead is in the right-most position and we give it an enormous velocity upwards, enough velocity that it would have done several revolutions in one time step. Our simulation will first move the bead as if it was unconstrained, then clamp it back to the wire (putting it to the top of the circle) and finally set the velocity to be the position difference. We gave it a huge velocity, but the simulation reduced the velocity to be
You can also add a final stage where you basically calculate the kinetic energy of the object before the physics fiddling, and after, then rescale the appropriate values to enforce the conservation of energy as if it were a positional constraint.
Matthias, thank you for these videos. It's a great way to get started with PBD and also dive deeper into it! I liked reading the papers - but I think these videos are the way to go to make PBD more popular ...
These videos are pure gold! From a Mechanical Engineer who loves Multibody simulations.
Hi, nice to hear that. More will follow :-) Let others know too if you like...
That sub-stepping is pretty neat. In a Spiderman game I was trying to make I found that my swings lost energy way too fast and I didn't know how to solve it.
These videos are all amazing!
Thanks Matthias. Is the damping due to our bead not following the wire curve, just being placed on the nearest linear point, not curved following the wire?
Verlet integration handles constrains by adjusting previous position, which in some way, seem similar to PBD method. Could you compare the similarities and the differences between PBD vs Verlet. Thanks
Superb!
I have re-created your example in C++. However, I am using floats, not doubles. When using 100 steps, the quality still improves, but with 1000 steps, the quality deteriorates instead of converging. Is this expected? How do you solve this?
thank you so much for these videos Matthias, they are bloody amazing & super inspiring!
Would you be interested in doing a future video on rigid body & self collision implementations for simulations at all? I've recently started working on a personal project to create some cloth using PBD however i've been overwhelmed when trying to figure out a good narrow phase collision detection. Ive seen lots of examples use spatial hashing for the broadphase (Thanks for a video already on it! ) and then for narrow phase ive seen a mixture of techniques such as BHV / KD trees, voxelizing meshes and SDF's ect.
Currently i feel even more confused then a did i did before ha :)
And once again thank you for the content
Can you link a page or article where the constraint force is derived for PBD as in 9:49. Thank you
Sure, here you find the derivations matthias-research.github.io/pages/publications/XPBD.pdf
Where exactly is the constraint force derived in the XPBD paper?
@swaroopnayak9939, were you able to find it?
How do we accomplish an angular constraint? I cannot get one to be stable.
Would this converge to the solution quicker? Currently, for all particles we linear velocity project, then, do contraint solve, place bead on wire, which is a curve, so we basically just moved a straight line away from a curve, then moved back to satisfy constraint which was another direction so we lost velocity, and created damping. This is because the projection doesn't take into account the constraint.
What if you go through all particles, like usual, add gravity to velocity, then particles distribute its velocity along its constraints, losing force according to inverse masses and constraint damping. For each particle, solve the constraint, A=F/m. Basically we move the particle position along the constraint more along the curve of the constraint because now the particle velocity has been modified to follow the direction of the constraints.
AMAZING, THANKS
Glad you like it!
In the original paper, position based dynamics, the author chosen delta p along the gradient with explaination that the choice will conserve both momentum and angular momentum if all particals are of the same mass. Why is it so? Could you please give a mathmatical prove to this statement. Many thanks.
I have wrote a prove to prove that the convervation of momentum and angular momentum is true. That's quite surprising. I wonder what's the mathmatical or physical deep thinking behind the update strategy?
This is v cool. Still not sure how to extend this to rigid bodies though
This is very good and those videos are amazing. But for this problem, would it not be even simpler to use SVG and rotate the bead around the center of the big circle? Then all the trigonometry is handled by the SVG engine, the bead stays on the circle by definition (provided it started on the circle) and all we have to do is provide the angle of rotation at each step.
I'm sorry but I can't follow why implicit integration == losing energy?
Same
Implicit integration does not care about energy conservation. In some setups this will cause the energy to grow infinitely until the simulation "blows up", but in this example of the bead on a circular wire the tendency will be to lose energy until the bead is sitting still on the bottom of the wire.
For the extreme case where the velocity is very high it's quite intuitive to understand why we are losing energy. Let's say the bead is in the right-most position and we give it an enormous velocity upwards, enough velocity that it would have done several revolutions in one time step. Our simulation will first move the bead as if it was unconstrained, then clamp it back to the wire (putting it to the top of the circle) and finally set the velocity to be the position difference. We gave it a huge velocity, but the simulation reduced the velocity to be
You can also add a final stage where you basically calculate the kinetic energy of the object before the physics fiddling, and after, then rescale the appropriate values to enforce the conservation of energy as if it were a positional constraint.
Bright background is horrible to watch at night :(