Why do we iterate when applying sequential impulse?

Started by
2 comments, last by Aken H Bosch 8 years, 1 month ago

Erin Catto, in his GDC slides, tells that we apply impulse at each contact point and terminate after fixed number of iteration or until impulse becomes small.

What does this mean? How does the case where one impulse for each contact point is not enough look like?

(It seems gdc 2006 videos are nowhere to be found, so I couldn't find his explanation on this, sorry)

Advertisement

Anytime you have more than two coupled (touching) objects, or more than one contact point between them, the pairwise impulses are not guaranteed to produce a correct response. So, the algorithm iterates until an approximate solution is found to the multi-body contact problem.

Anytime you have more than two coupled (touching) objects, or more than one contact point between them, the pairwise impulses are not guaranteed to produce a correct response. So, the algorithm iterates until an approximate solution is found to the multi-body contact problem.

Thanks for the reply @Aressera, I'll try to redo the math and see. can you explain more what you mean by "correct impulse"? (example of the incorrect impulse case, if you will)

I tried to only apply impulse once, I didn't see what's wrong, but I didn't take into account rotation laugh.png

(Disclaimer: the following is based on my own experience, not the paper you're referring to ... also I'm writing this during my lunch break so I've got to keep it short)

Consider a stack of bricks, initially at rest. At the beginning of your physics step, gravity gives all of these bricks a downward velocity.

If you evaluate the impulses only once, the only contact point with an "inward" relative velocity is the one between the bottom brick and the ground; you'll end up setting the bottom brick's velocity to zero to keep it from falling through the ground, but every brick above that still has a downward velocity.

If you iterate once more, the contact point between the bottom brick and the brick above it now requires an impulse (to keep them from going through each other). After applying this impulse, the result will be both the bottom and second-from-bottom bricks moving downward at 0.5x their previous velocity (the velocity they got from gravity), and every brick above that still moving downward at full.

Signature go here.

This topic is closed to new replies.

Advertisement