tuning the number of iterations

Please don't post Bullet support questions here, use the above forums instead.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

tuning the number of iterations

Post by Erwin Coumans »

Kenny Erleben wrote: So, yes you can get a accurate TOI within some pre-scribed epsilon, but can you make a guarantee to always deliver the result within say 5 iterations?

Sure you can make more internal iterations. However, you need to control how many iterations you are willing to take. You have the same problems and tradeoffs as in every iterative root search algorithm.
I agree, but that is the nature of iterative methods. GJK suffers from this, SOR/Gauss Siedel does. Still I think those 2 are the best basis for rigidbody simulation in my experience (in realtime games).

Also please note that conservative advancement really does find the time of impact, unlike other root finding methods, like bisection. And the performance usually is sub linear, typically 3 or 4 iterations. Indeed there is the long-thin fast rotating object problem, but a bit of tuning of the envelope/tolerance can help this case a lot. Or asking the artist of not adding too long thin dynamic objects 8)


It would be nice to have a physics engine without tuning parameters, but so far I think this is utopia. Kenny, do you actively avoid tuning paramters in OpenTissue ? That's something I would be interested in. What about the number of iterations in the iterative solver. Or convergence epsilon in GJK ?
kenny
Posts: 32
Joined: Thu Jun 30, 2005 8:49 am
Location: Denmark

Re: tuning the number of iterations

Post by kenny »

Erwin Coumans wrote: It would be nice to have a physics engine without tuning parameters, but so far I think this is utopia. Kenny, do you actively avoid tuning paramters in OpenTissue ? That's something I would be interested in. What about the number of iterations in the iterative solver. Or convergence epsilon in GJK ?
There is more than one type of MBD simulator in OpenTissue. If you refer to the one I presented in my phd thesis (nearly one year old stuff by now:-) then I effectively have one parameter that requres some tuning: ``the weight-feeling'' parameter. It controls the quality of your simulation, so (in my opinion) it is a bit easier to tweak than for instance springs in a penalty method.

Regarding number of iterations in PGS, I always use 10 for a dynamics update and 5 for a first order world update. The total cost of the scheme in my thesis is roughly equal to 30 iterations. You shold note that this scheme works regardless of the mass-ratios and magnitude of external forces!!! No tweaking there:-)

I did some comparision of my approach against Novodex, ODE and Maya. I presented these at a talk some time ago, you can see the slides here:

http://www.diku.dk/~kenny/visionday05.pdf

My recent work (and unpublished, so it is still a bit secret:-) I have eliminated the weight-feeling problem, as soon as I complete the papers I am working on right now, I'll will write a paper on the new stuff:-)
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Kenny Erleben wrote: I did some comparision of my approach against Novodex, ODE and Maya. I presented these at a talk some time ago, you can see the slides here:

http://www.diku.dk/~kenny/visionday05.pdf
I really like the cows, much more interesting model then the stanford bunny !
Do you have a testbed and data for the tests ? I'm interested in running comparing Bullet too. Do you have them available as OpenTissue demos ?
kenny
Posts: 32
Joined: Thu Jun 30, 2005 8:49 am
Location: Denmark

Post by kenny »

Erwin Coumans wrote: I really like the cows, much more interesting model then the stanford bunny !
Do you have a testbed and data for the tests ? I'm interested in running comparing Bullet too. Do you have them available as OpenTissue demos ?
The cow configuration is a very challenging configuration to animate:

It is basically ellipsoidal objects with long thin tentackles. The cows are dropped from a high height (several hundred meters as I recall). Once the cows hit the surface they are moving so fast that inbetween frames they move more than half their own size. Thereby causing extreme penetrations with the surface and other cows. Once the first bounce with the surface is handled the cows gain a large angular velocity, causing them to spin violently. Meaning that the thin legs and tails can move completely inside other cows during a single time-step.

I did this simulation to show that correction by projection is robust in extreme cases, but not perfect (notice you get popcorn cows). Large penetrations is a natural consequence of explicit fixed time-stepping schemes (unless somesort of continuous collision detection is applied:-)

All the test-configurations from my thesis and on the slides are available in the OpenTissue demo named ``multibody''. The signed distance map and mesh data of the cow is available from DataTissue.

Another interesting simulation is this one

http://www.diku.dk/~kenny/why_norton_sucks.avi

It is 2 minute simulation of 10.000 objects at 100fps. It took 30 hours to do with the method from my thesis.
gino
Physics Researcher
Posts: 22
Joined: Mon Jun 27, 2005 9:28 am
Location: Helmond, Netherlands

Re: tuning the number of iterations

Post by gino »

Erwin Coumans wrote: Also please note that conservative advancement really does find the time of impact, unlike other root finding methods, like bisection. And the performance usually is sub linear, typically 3 or 4 iterations. Indeed there is the long-thin fast rotating object problem, but a bit of tuning of the envelope/tolerance can help this case a lot. Or asking the artist of not adding too long thin dynamic objects 8)
The long-thin fast rotating object is only a problem if the contact point lies close to the axis of rotation. But in that case you could reduce the range of the long-thin object to the area that can actually be hit. For instance if the query object is small and does not move a lot with respect to the long object, then the bound due to the angular velocity can be safely reduced, enabling larger steps. It's just a wild thought. I haven't tried this out, and it of course it breaks if you have two long spinning objects.