Damping oscillations in PBD?

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
sebjf
Posts: 9
Joined: Mon Jun 06, 2016 9:34 pm

Damping oscillations in PBD?

Post by sebjf »

Hi,

In my PBD system, some of the particles are oscillating. I captured a few frames worth of the position buffers and put them into matlab to plot how the positions evolve over time and through the solve.

The green lines connect each sample to the next in time. The plot looks a little odd on first glance, but you can see what is happening. Between two subsequent frames, small changes in position cause the constraint solves to differ significantly. The collision response then moves the particles into a different location to before, where the constraint and collision solves then move them into the initial position.

Its like the system is cycling between two steady states.

There are two ostensible causes to this:

1. The collision response should have moved particles to the initial place with repulsive force.
2. The system should be damped more to avoid the large changes in predicted position, which in turn cause large changes in constraint solve.

I don't think either are fatal or should be though. Its reasonable for a particle to collide in one frame, then not on another, e.g. if its only just against a surface.

The behaviour is very dependent on system conditions, e.g. where the particle is re: colliders, timestep count, velocity damping, etc.

Is there some system wide technique we can apply to prevent this kind of behaviour? It almost looks like its resonating - perhaps something like introducing tiny randomisations into constraint solves?

Sj
Attachments
Motion of a single particle through capture
Motion of a single particle through capture
pbd_cap.png (115.51 KiB) Viewed 9972 times
mobeen
Posts: 122
Joined: Thu May 05, 2011 11:47 am

Re: Damping oscillations in PBD?

Post by mobeen »

Hi there,
We might be able to help you if you show us how you are doing the solves currently. And is it in bullet or have you created your own framework?
sebjf
Posts: 9
Joined: Mon Jun 06, 2016 9:34 pm

Re: Damping oscillations in PBD?

Post by sebjf »

Hi mobeen,

It is my own framework. The system is very simple. The cloth particles are constrained with edge constraints. The solver performs weighted-averaging over projected positions similar to Weiler el al's Projective Fluids. The weights of the projected positions are scaled by an energy potential that is a function of constraint violation similar to Macklin et al's XPBD. Pseudo Continuous Collision Detection is performed with distance fields, with the response computed by approximating a plane and moving colliding particles to the surface.

Originally I had asynchronous constraint solves based on per-particle strain value, somewhat like Ozgen and Kallmann's Directional Constraint enforcement. This has been commented out for the moment as removing it improves stability. I think this is more symptomatic than the cause however. By that I mean, asynchronous constraints will always be more unstable than those solved equally between particles, but in the same sense, a set of constraints using energy potentials will always be more unstable than the same set without (when solved in discrete timesteps).

The 'problem' as I see it, is one of quantisation. Non-linear responses from the collision detection system and constraint solve, combined with non-zero time-steps will always leave the potential for these 'loops' to arise where the system bounces between two states.

This is what I am guessing is going on of course. Due to the platform I can't walk every step of the solve in the debugger. While I could reduce the time-step, or I could improve the surface approximation of the collision detection system, these don't fundamentally solve the problem if that is it. For example, if two cells of a field that are discontinuous could 'cause' that behaviour, but in reality surfaces can be discontinuous, so I wonder if there is a better system-wide way to solve this.




Sj
Post Reply