Erin Catto's Sequential Impulses with accumulation and coherence

Started by
11 comments, last by Numsgil 14 years, 8 months ago
You could. In theory you can form the Jacobian for your entire physics world and solve it all directly that way. The problem is that in practice the computational complexity increases to be more than you can do in the 16ms you have to do a frame in. That's not even counting the combinatorial part of the LCP, which can potentially be exponential if you use a stupid solver (direct enumeration), or the problem is ill formed in ways I don't entirely understand.

So in practical use cases, there's probably a sweet spot. For a hinge constraint, you probably just end up replacing one of the points in the contact manifold with a hinge, and so the system is still 2x2.

Doing what I've suggested, solving the contact manifold between bodies iteratively, is sort of like an "iterative kernel solver". It might be called something else, I'm sort of grasping at terminology here. But basically you can increase the size of the "kernel" (increase the size of the system you solve at each step), and it'll decrease the number of iterations you need to arrive at an answer, but increase the number of operations you need to perform per kernel solve. So in a theoretic sense there's some sweet spot between kernel size and iterations, but I don't have any idea how to approach it.

For certain problems, where constraints can be arranged into a tree structure (ragdolls, for instance), there's a way to solve the system in linear time. Clicky. And incidentally, I'm currently working my way through the math to find a global solver for constraints in linear time. You can follow my progress in this thread. But neither Baraff's paper or my work in the latter part of that thread deal with how to handle box constraints on the values (ie: constrain the impulses to the range [-10, 20] or something like that). Which is another open question I can't figure out and doesn't seem to have been adequately addressed anywhere that I can tell.
[size=2]Darwinbots - [size=2]Artificial life simulation
Advertisement
Quote:Original post by Numsgil
So imagine you're in 2D. There are three degrees of freedom per body. So imagine now you have two bodies. There are six degrees of freedom for the system. Now add a constraint between the bodies. The constraint, no matter what it is, removes a single degree of freedom from both bodies. So each (binary) constraint removes two degrees of freedom from the system.


I think that this may be incorrect -- a single normal/axial constraint (constrains the distance between a point on each body projected onto some axis; used in collision constraints) should only remove a single DOF from the system, i.e it removes one relative DOF, not one from each body.

Example: describe body B relative to body A; B has 3 DOF relative to A.
Constraining the position of B relative to A along some axis only removes one DOF from the whole system -- B is still free to move perpendicular to n, and to rotate about pB, and A is free to move and rotate in any way.

A "pin"/joint constraint does remove 2 DOF, but that's because it fixes the position of one body relative to the other -- analogous to two axial constraints.
Hmm, looking it over again I think you're right. I musta got confused somewhere. I guess that doesn't explain why my 4x4 LCP with friction was singular.
[size=2]Darwinbots - [size=2]Artificial life simulation

This topic is closed to new replies.

Advertisement