Advertisement

Box stack unstable (sliding) without warm starting

Started by February 18, 2021 12:58 AM
1 comment, last by platypus19 3 years, 10 months ago

Hey all,

So far I've a skeleton of a basic 3D physics engine based on Catto's sequential impulses, with some inspiration from qu3e.

I generate contact points using SAT, by clipping the incident face against the side planes of the reference faces and keeping points below. I do not project points back to the reference face nor do I do any culling for now. I'm able to draw the contact points for debugging and all looks good.

I've implemented all the basic solver features except for warm starting. When I try to stack some unit boxes vertically, any number above 3 will become unstable and the boxes (especially the lower ones) will slide away and make the stack fall. This is at 10 iterations. If I increase the iterations to 20, a 5-box stack is stable.

I wanted to know, is it expected that without warm starting a 4-box stack collapses and a 3-box stack is quite jittery? A quick test from Box2D-lite shows me a stack of 5 boxes is stable even when I disable warm starting.

Again, most basic features are implemented:

  1. Accumulated impulses.
  2. Friction.
  3. Baumgarte stabilization and SLOP.

I just implemented a very rough version of warm starting (using absolute contact positions) - just as a test. The box stack is stable now. But I'm still interested in knowing whether it was supposed to be stable even without warm starting, to exclude the possibility I have bugs.

EDIT: a 15-box stack is not stable, it bends over itself, even with warm starting. I think I have a bug somewhere…

This topic is closed to new replies.

Advertisement