Hi,
I've implemented a physics engine that uses the ODE LCP solver (the optimised Dantzig one). I'm using this to restrain the acceleration of a ball on a flat plane (for example). The LCP seems to restrain the acceleration of my ball perfectly, the resulting force is equal and opposite to the acceleration of the ball.
Unfortunately the ball still sinks slowly into the plane due to the fact that I'm using a small tollerance value to indicate if the ball was resting or not (relative normal velocity < EPS). This small value is not being considered by the LCP solver, so the ball slowly sinks. The question is, should this value be somehow added to the list of scalars (B) or the Matrix (M) used by the solver? Or should I simply add this on after the acceleration has been constrained? I'm using the method outlined in Physically Based Modeling by Baraff to compute B and M.
The paper does seem to consider relative normal velocity, but this is multiplied by nDot, which is zero if the ball has omega of 0.
Any help would be appretiated!
Thanks,
Steve.
Passing small epsilon values to the LCP?
-
- Posts: 117
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: Newyork, USA
-
- Posts: 117
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: Newyork, USA
Oh, I see.
The problem is you're using constraint in acceleration level. Thus, you'll see drift (numerical + integration) in velocity and position.
Those paper by Baraff are now obsolete. I'd suggest you using position constraint or at least velocity constraint like the majority number of physics engine out there.
If you want to know more, search for time stepping papers by David Stewart, Jeff Trinkle (with postition constraint stabilaztion) or Mihai Anitescu, Potra (velocity level, no built-in stabilazation).
The problem is you're using constraint in acceleration level. Thus, you'll see drift (numerical + integration) in velocity and position.
Those paper by Baraff are now obsolete. I'd suggest you using position constraint or at least velocity constraint like the majority number of physics engine out there.
If you want to know more, search for time stepping papers by David Stewart, Jeff Trinkle (with postition constraint stabilaztion) or Mihai Anitescu, Potra (velocity level, no built-in stabilazation).