Damping oscillations in PBD?
Posted: Sat Feb 25, 2017 1:11 pm
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
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