dilevin / CSC417-a6-rigid-body-contact

9 stars 6 forks source link

Numerical stability under constant contact #2

Open AtheMathmo opened 4 years ago

AtheMathmo commented 4 years ago

Should we expect our algorithm to remain numerically stable when the objects are in constant contact (for example, changing the floor normal to (0,1,0)? (Spoiler: mine is not. At least, not for very long.)

dilevin commented 4 years ago

This is normal. Since we don’t run PGS to convergence we never fully solve the lcp leading to instabilities that are most noticeable during mundane configurations like objects sitting still.

AtheMathmo commented 4 years ago

Ok, that makes sense. I found that increasing the number of iterations to 100 improved things but did not fix them.

Is there a standard approach to deal with systems where objects will remain in contact for a long time?

dilevin commented 4 years ago

One option is to run PGS until the contact forces stop changing but this is quite slow. Another option is to use a more global optimization approach. Finally, lots of games simply freeze stacks of objects until something causes them to start falling.

AtheMathmo commented 4 years ago

Cool, thanks!