upper boxes sinking into the floor
Posted: Thu Jun 15, 2006 12:11 am
Hi, I'm making a physics engine that is relying on the LCP formulation at velocity level for collision response. The paper I'm following is: http://isg.cs.tcd.ie/giangt/EGIrl2003.pdf .
The LCP solver I'm using is the one that is provided from on the accompanying CD-ROM of the book 'Game Physics.' I've set maximum number of iterations to 1000 for the LCP Solver.
I am not considering things like 'resting' contacts (solving contact forces etc.) or contact graph or shock propagation (I was wondering if they are truly vital for non-interpenetrative behavior inbetween the objects.) It's ok if I get a jittery stack, I can deal with those through other methods (kinetic energy threshold etc.)
I'm doing fixed time stepping (time steps are so small that they guarantee no missing of collisions.) I do vertex/face and edge/edge collision checks and determine correct normals for them (if the collision points are closer than 'e' distance from contact surfaces.)
The ground has mass -1 (meaning 1/Mass is strictly zero and Inertia_Tensor^-1 is a zero matrix.)
The problem is that after a few scenes the upper stack of boxes lying on the ground start sinking into the ground. My hunch is that after collision detection/resolution is done for one scene, the upper boxes are still moving closer to the lower ones. But I believe this shouldn't happen (since I take into account all the contact points on the stack at the same time for the LCP solver.) And I believe that when I'm done with solving the LCP the impulse magnitudes (Z or f vector if you will) should be enough to make all objects move away from eachother. So I'm totally stuck and don't know what I'm doing wrong, or if this is related to round off errors how I can deal with it.
Some feedback/help (specially from people who have been successful in making their own commercial quality physics engines) would be MUCH appreciated since I've been stuck with this for a long time.
The LCP solver I'm using is the one that is provided from on the accompanying CD-ROM of the book 'Game Physics.' I've set maximum number of iterations to 1000 for the LCP Solver.
I am not considering things like 'resting' contacts (solving contact forces etc.) or contact graph or shock propagation (I was wondering if they are truly vital for non-interpenetrative behavior inbetween the objects.) It's ok if I get a jittery stack, I can deal with those through other methods (kinetic energy threshold etc.)
I'm doing fixed time stepping (time steps are so small that they guarantee no missing of collisions.) I do vertex/face and edge/edge collision checks and determine correct normals for them (if the collision points are closer than 'e' distance from contact surfaces.)
The ground has mass -1 (meaning 1/Mass is strictly zero and Inertia_Tensor^-1 is a zero matrix.)
The problem is that after a few scenes the upper stack of boxes lying on the ground start sinking into the ground. My hunch is that after collision detection/resolution is done for one scene, the upper boxes are still moving closer to the lower ones. But I believe this shouldn't happen (since I take into account all the contact points on the stack at the same time for the LCP solver.) And I believe that when I'm done with solving the LCP the impulse magnitudes (Z or f vector if you will) should be enough to make all objects move away from eachother. So I'm totally stuck and don't know what I'm doing wrong, or if this is related to round off errors how I can deal with it.
Some feedback/help (specially from people who have been successful in making their own commercial quality physics engines) would be MUCH appreciated since I've been stuck with this for a long time.