• Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Restitution and sequential impulse

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

#1cnboy0212  Members   -  Reputation: 166

Like
0Likes
Like

Posted 06 September 2012 - 05:34 PM

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?

#2Inferiarum  Members   -  Reputation: 628

Like
0Likes
Like

Posted 07 September 2012 - 02:15 AM

I did some thinking on this topic lately. This is how i would implement it.
• Solve the system without restitution.
• 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.

Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

PARTNERS