Contact/collision problem

Started by
5 comments, last by Narf the Mouse 12 years, 3 months ago
Due to the following sequence of events, my physics system (boxes only) is unstable - I'm looking for solutions:

1) A box does not drop flat onto a side (ie., its angular rotation (I use matrix rotation, this is for reference) is not a multiple of 90 degrees).

2) The box settles, but not exactly onto a side, due to floating-point imprecision, as well as momentum.

3) The box doesn't always have four contacts hitting the ground, resulting in occasionally-unbalanced contact resolution (all contacts between two objects are resolved by adding their linear and angular components and averaging) - Ie, if only three contacts hit the ground (engine does not now have continuous/swept collision), then it'll tilt towards the other corner point.

4) These "jitter impulses" build up until the box is rocking back and forth; after a while, it'll settle down.

Current ideas (comments, critique and additional ideas, please):

1) Re-introduce and test potential contacts from previous frames (suggested by "Game Physics Engine Development: How To Build A Robust Commercial-Grade Physics Engine For Your Game", by Ian Millington).

Thanks.

2) Some sort of "Forced zeroing" function, that will take effect when numbers grow small enough.

3) Continue reading the book mentioned in 1) (Only idea I'm acting on right now; mentioned to get the obvious out of the way)

4) Get a video of this up (Fraps? Something else? VirtualDub, I remember as being good at compression and free - What's current?)
Advertisement
Oh, and since editing is apparently impossible -

Thanks. :)

Oh, and since editing is apparently impossible -

Thanks. smile.png


I've heard that if you refresh the page the 'edit' appears.

-Josh

--www.physicaluncertainty.com
--linkedin
--irc.freenode.net#gdnet

You really want something which will give you all contacts between the box and the ground on the current frame, without caching or looking up previous results - it will be more stable this way.

Start with the best case (having all contacts), then work back from there if you really need. It should be possible to get it very stable.

I found using an approach like speculative contacts dramaticaly increased the stability of my physics engine in 2d; I see no reason it wouldn't work in 3d as well:

http://www.wildbunny.co.uk/blog/2011/03/25/speculative-contacts-an-continuous-collision-engine-approach-part-1/

Cheers, Paul.

[quote name='Narf the Mouse' timestamp='1326568801' post='4902726']
Oh, and since editing is apparently impossible -

Thanks. smile.png


I've heard that if you refresh the page the 'edit' appears.

-Josh
[/quote]
Did that, hit "Save Changes", no change apparent.

You really want something which will give you all contacts between the box and the ground on the current frame, without caching or looking up previous results - it will be more stable this way.

Start with the best case (having all contacts), then work back from there if you really need. It should be possible to get it very stable.

I found using an approach like speculative contacts dramaticaly increased the stability of my physics engine in 2d; I see no reason it wouldn't work in 3d as well:

http://www.wildbunny...pproach-part-1/

Cheers, Paul.

Thanks, reading it.

Interesting - How do you handle coefficients of restitution? I didn't see any "bounce" in your demos.

Thanks, reading it.

Interesting - How do you handle coefficients of restitution? I didn't see any "bounce" in your demos.


That's one of the trade-offs; its only possible to simulate fully plastic collisions :)

[quote name='Narf the Mouse' timestamp='1326574364' post='4902760']
Thanks, reading it.

Interesting - How do you handle coefficients of restitution? I didn't see any "bounce" in your demos.


That's one of the trade-offs; its only possible to simulate fully plastic collisions smile.png
[/quote]
Unfortunately, I need elestic collisions. :(

Thanks anyway. :)

This topic is closed to new replies.

Advertisement