Jump to content
  • Advertisement
Sign in to follow this  
Ivan Reinaldo

Why do we iterate when applying sequential impulse?

This topic is 857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Edited by ivanrei

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Edited by ivanrei

Share this post


Link to post
Share on other sites

(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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!