Page 1 of 1

A few questions about iterative solver...

Posted: Tue Jul 26, 2005 7:11 pm
by emman
Hi,

Good to see a forum dedicated to physics and nice work on the Bullet project!

As an introduction (and a shameless plug) I'll post here what I've done so far on the subject.
I do post my progress on Gamedev quite frequently so it might not be new stuff: -Physics WIP-

It's impulse based and pretty much a hack since static contacts are modeled using point/point constraint in order to minimize the drift produced by the sequential processing of the contact points. In order to make it less of a hack I'm planning to try solving resting contacts using a global method but...

1) Do iterative solvers eliminate all drift and jittering or do you still need to stabilise the results in some ways?
2) Are they significantly better at handling large mass ratios?

My primary concern is performance. My current exe do brute-force contact caching (my todo list is too long :)) so it get very slow when the contact count rises but otherwise it can be made pretty fast. Could I see much performance/stability gains with a global solver?

Oh and... just in case, this is all a hobby and my Math skills are pretty weak so, unless you need to, please don't go too hard on the Mathematic terms ;).
Thanks!

Posted: Tue Jul 26, 2005 9:21 pm
by Erwin Coumans
As an introduction (and a shameless plug) I'll post here what I've done so far on the subject.
I do post my progress on Gamedev quite frequently so it might not be new stuff: -Physics WIP-
The demo looks very nice, and the stack very high.
1) Do iterative solvers eliminate all drift and jittering or do you still need to stabilise the results in some ways?
stability can be affected in a lot of ways. I've seen people using damping, modifying the inertia tensor to stabilize simulation. The friction model is quite important, contact generation, and the solver.
2) Are they significantly better at handling large mass ratios?
Large mass rations are difficult to handle, especially for iterative solvers.

I recall a discussion with Jan Paul van Waveren, who was using impulse based physics in Doom 3. Because his approach prevents penetration, he might be able to deal better with larger mass ratios, I will ask him his opinion.

Also Kenny Erleben had some posting about large mass ratios in another threat.

Posted: Tue Jul 26, 2005 9:35 pm
by emman
The demo looks very nice, and the stack very high.
Thanks :)
stability can be affected in a lot of ways. I've seen people using damping, modifying the inertia tensor to stabilize simulation. The friction model is quite important, contact generation, and the solver.

Large mass rations are difficult to handle, especially for iterative solvers.
That's a surprise! Maybe I'm mistaken on the solver class name but are you talking about matrix based solvers? I thought they were especially good at that. For example, my current implementation is unable to handle a 50kg crate sitting on a 500g book with 24 iterations over the contact list (slowly solving penetration at each iteration). Would that be a problem for a matrix solver too?
I recall a discussion with Jan Paul van Waveren, who was using impulse based physics in Doom 3. Because his approach prevents penetration, he might be able to deal better with larger mass ratios, I will ask him his opinion.

Also Kenny Erleben had some posting about large mass ratios in another threat.
Thanks, I must have missed that thread, I'll go find it.

Posted: Tue Jul 26, 2005 10:02 pm
by Erwin Coumans
That's a surprise! Maybe I'm mistaken on the solver class name but are you talking about matrix based solvers? I thought they were especially good at that. For example, my current implementation is unable to handle a 50kg crate sitting on a 500g book with 24 iterations over the contact list (slowly solving penetration at each iteration). Would that be a problem for a matrix solver too?
You can divide lcp solvers in two categories:

- pivoting / direct solvers, for example Dantzig:
- It solves a big matrix,
- usually requires a lot of memory
- allows for very stiff constraints
- often not so fault tolerant, no error correcting

- Iterative solvers, for example Gauss Seidel, Successive Overrelaxation:
- sparse matrix storage
- allows for larger error, and is error correcting
- potential convergence issues: every iteration comes closer to the actual solution
- very similar behavior to penalty methods

I can recommend Kenny Erlebens PhD thesis, especially chapter 6:
http://www.diku.dk/~kenny/thesis.pdf

I'm more into collision detection, so perhaps someone else can give a better explanation. Erin, Kenny, Stephane ?

Posted: Tue Jul 26, 2005 10:06 pm
by emman
Thanks a lot!

That's exactly the kind of descriptions I needed. Extremely useful, those method names only really didn't mean much so far.

In the event this forum was to become popular I suggest this as a FAQ entry ;).