Issues with split impulse

peltonen
Posts: 18
Joined: Thu Jan 17, 2008 8:16 pm

Issues with split impulse

Post by peltonen »

Hello,
I've been having some problems with split impulse and stacking objects.
I just downloaded 2.73 and ran through the demos featured in "AllDemos". With the split impulse box set to true, things seem to work fine.
However, when I modify the demos to use split impulse, the simulation becomes very "mushy". (Note: I've been seeing this behavior for a few versions now, so it is not due to something new in 2.73.)
I've included a zip containing modifications to GimpactTestDemo (as I originally thought the problem might have to do with Gimpact). I modified the demo to consist of a tall column of boxes. When the simulation starts, the boxes buckle under the weight of each other, penetrating each other's boundaries, while the bottom ones sink into the ground. It looks as if the column just melts.
Besides setting m_dynamicsWorld->getSolverInfo().m_splitImpulse to "true", are there other things that need to be done to avoid this behavior when split impulse is activated?
Thanks,
-Brian
p.s. I'm really looking forward to trying out the CUDA demos!
You do not have the required permissions to view the files attached to this post.
peltonen
Posts: 18
Joined: Thu Jan 17, 2008 8:16 pm

Re: Issues with split impulse

Post by peltonen »

2.73 SP1 fixes this problem.

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

Re: Issues with split impulse

Post by Erwin Coumans »

peltonen wrote:2.73 SP1 fixes this problem.

Thanks!
Unfortunately it doesn't. 2.73 SP1 removed the split impulse feature. We can put it back, if you really need it, but the default solver is more stable in general.

HTH,
Erwin
peltonen
Posts: 18
Joined: Thu Jan 17, 2008 8:16 pm

Re: Issues with split impulse

Post by peltonen »

Hi,

Thanks for the response.

You're right. I checked 2.73 sp1 for stability, but I didn't check for the scenarios where split impulse is needed by my application.

Is there any way to have overlapping objects not carry momentum after they separate (besides using split impulse)?

Thanks again.
ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway

Re: Issues with split impulse

Post by ola »

Hi,

after having upgraded to 2.73 and more recent SVN versions, I've found that the simulation is much less robust than before. I often get bullet asserts of the type
"./src/LinearMath/btQuaternion.h:188: btQuaternion& btQuaternion::operator/=(const btScalar&): Assertion `s != btScalar(0.0)' failed."
in places I did not get these before. This actually breaks several things in our game engine, and I'm trying to figure out how get out of this and still stay up-to-date with Bullet.

I recon the main reason is spawning objects inside or partially inside other objects. But I've also had this happening when a heavy object pushes a light one into a static object. Maybe I've just been to lazy when implementing this, but the split-impulse function handled this very well.

Have you got any hints on how to make this more stable? I understand you removed split-impulse for a reason, but it's hard to see why right now :-)

Best regards,
Ola

ps: This is with Bullet in Double-precision mode.
ola
Posts: 169
Joined: Sun Jan 14, 2007 7:56 pm
Location: Norway

Re: Issues with split impulse

Post by ola »

Hello again,

just a small update, I've also had stability issues with most of the demo applications,
(see my comments here: http://www.bulletphysics.com/Bullet/php ... 430#p12430 )
and it seems it's related to the double precision mode. So maybe there is another issue related to this, more than the split impulse feature itself. I cannot run my game engine in single precision mode because of it's design/purpose, but I can maybe make a small test application if you think it'll help.

Best regards,
Ola