04-05-2019, 06:20 AM
(04-05-2019, 12:49 AM)tyFlow Wrote: If you have a minute, maybe you could take a look at section 6.1 here, and see if it's working differently than how you imagine the friction algorithm should work.
At first glance, equation 23 in that paper should probably mean the frictional displacement is along the contact normal (same as the displacement that resolves interpenetration), and not perpendicular to it. So n would probably be the operative vector there, as it is in other particle methods going back to Baraff & Witkin. Unless NVidia have just found that it's easy & fun to make things pile up if they don't try to conserve angular momentum - but where would be the fun in a snowball that couldn't roll, or a sandcastle that couldn't topple?
I'll have a dig around in some other PBD/PBF implementations and see how they approach it.
Anyway, in the attached file (extra button pressed this time!) there are three copies of the same basic setup:
With Particle Bind, the lump of stuff hits the collider and bounces & tumbles as it should.
With Particle Physics, angular momentum is damped away entirely, allowing it to hang from the edge of the collider in a non-physical way. It should tumble something like the Particle Bind version, as should any breakaway groups.
The third one has no gravity and just shows how Particle Physics produces a net motion even when no other forces are acting on it, which just suggests your interparticle forces aren't quite symmetric.