Advertisement

Restitution and sequential impulse

Started by September 06, 2012 11:34 PM
0 comments, last by Inferiarum 12 years, 5 months ago
I successfully implemented sequential impulse following Erin Catto's sequential impulse slides. My implementation is based off his implementation in Box2D lite. I know that it is not as perfect as the current version of Box2D, but it's easier to read and understand compare to the current version. The penetration and collision response are solved with sequential impulse with velocity bias. It works perfectly when the restitution is 0. The simulation looks stable and no jitter is seen. However, when I try to change the restitution, jittering happens. This happens especially when 2 contact points are involved in the collision.

A way of solving that I can thought of is let the the impulse involving restitution to to be calculate outside the iteration. and apply to the average of the 2 contact points (if there are 2). I haven't try to implement this yet, so i am not sure if it will work or not. Any suggestions on other ways I can accomplish this?
I did some thinking on this topic lately. This is how i would implement it.

  1. Solve the system without restitution.
  2. Multiply all impulses along the collision normals with some value a >= 1 (That is ignore the impulses that simulate friction)

However, with this implementation you get in trouble if you have some form of gravity. If you have a non moving box lying on the ground, it will change velocity due to gravity. So you have to apply some impulses to avoid interpenetration. With restitution, this impulses are increased and let your object bounce of the ground.

What I would suggest is to do step 2 only for impulses with a norm greater than some threshold which is based on the length of the time steps and the gravity.

This topic is closed to new replies.

Advertisement