Sequential Impulses Causing To Much Bounce

Please don't post Bullet support questions here, use the above forums instead.
crashlander
Posts: 41
Joined: Sat Apr 08, 2006 11:20 am

Sequential Impulses Causing To Much Bounce

Post by crashlander »

I have a 2D physics engine based on Erin Catto's 'Fast and Simple Physics using Sequential Impulses Paper'

I'm experiencing what seems to be too much "bounce" from my rigid bodies. Is this to be expected using using this technique? Or, do I have a bug to track down.

An example:

I have a cube that is about .64 meters on a side and has mass of 1. Gravity is set to 2 and I drop the cube from about 8 meters.

AllowedPenetration is set to .01 and ImpluseBias is set to .8.

For debugging purposes, when the cube collides I write out the contact penetration of the deepest point. With the above parameters, the values I get are .08 and .02

What happens physically is the cube bounces almost halfway back to its original height then comes back down and rests on the ground with no further bounce.

Is this bounce caused by the "Extra oomph" calculated from the bias factor? Is the bounce just a side effect of using this technique?

My engine is written in c# and targets the XNA platform so I can't easily post an example unless you have all the XNA required tools on you pc. If you do, demos from my engine can be found in the releases section here:

http://www.codeplex.com/FarseerPhysics

Thanks.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Some extra restitution/bounce/energy might be introduced by penetration depth recovery. This is a general problem, not particular to sequential impulse method. One solution is to introduce continuous collision detection and proceed to the earliest time of impact, so no penetration is ever introduced. This is very complex, so the following option is easier to achieve:

You can prevent extra velocity created due to penetration depth recovery, by splitting the normal impulse from the penetration impulse. See Erin's posting about 'split impulse for more details here:
http://continuousphysics.com/Bullet/php ... ight=#2121

Erwin
crashlander
Posts: 41
Joined: Sat Apr 08, 2006 11:20 am

Post by crashlander »

I fixed the problem. It was a bug introduced when swithing my code from Erin's orginal code to the new split impulse method. All fixed now and working great.

btw, for anyone interested here is a game created by someone that is using my free 2d engine. (This game doesn't have the fix yet.)

http://xbox360homebrew.com/blogs/alex/default.aspx