Jump to content

  • Log In with Google      Sign In   
  • Create Account

Irlan Robson

Member Since 08 May 2012
Online Last Active Today, 11:45 AM

Posts I've Made

In Topic: Lagrange multiplier in constrained dynamics

Today, 11:37 AM

I haven't watched that video completely, but I see that it follows Baraff's literature to solve for constraint *forces* (impulses / time_step). He uses essentially the same method as found in the constraint-based literature for non-penetration constraints using the LCP formulation. However, he uses quadratic programming (a global solver) to solve for the multipliers.


As Dirk said, you'll need to define your gradients (normals from the SAT for the collision case), each of which will be inserted into a Jacobian matrix for a general constraint-based system. From there you compute the lagrange multipliers as showed in Catto's slides. I think it is important to understand constraints geometrically when implementing these things. So yeah, we do look for a collision normal and point and only then we can find the force magnitude by relating it to the impulse-momentum law in Euler form and then we find the new relative velocities of each body after the collision/contact. 


BTW, different authors use the term impulse and force interchangeble, but assuming the force is constant the time step then impulse = force * time_step. Therefore the lagrange multipliers both refer to the same thing.


(Do not take this too theoretical but here is an example without using Catto's simplification to solve for the multipliers (impulses) for a distance constraint.)

In Topic: Lagrange multiplier in constrained dynamics

27 April 2016 - 02:16 PM

Yeah, agree with Álvaro, he's mathematically wrong. He meant minimizing C towards zero for his equality (although that is wrong either; he meant keeping the constraint between the constraint bounds). 

In Topic: Lagrange multiplier in constrained dynamics

27 April 2016 - 05:38 AM

In a velocity-based formulation the Lagrangian multiplier is the magnitude of a constraint impulse, whereas in a acceleration-based formulation is the magnitude of a constraint-force. It is required to put the constraint into a valid state. Having the constraint configuration defined, it shouldn't be difficult to solve for it currently.


I don't understand what is the second question though. For example, an equality constraint (e.g. distance, ball-in-socket, or a revolute joint) is satisfied for C = 0.  A inequality constraint (i.e. contact, angle limits) is satisfied when lo <= C <= hi (actually that is the general form of a constraint). Therefore generally is valid to say we want to minimize C so that it remais satisfied all the time. 


Yeah, minimize g(x(t)).


BTW, that's a good article and he basically summarized some of Catto's and Witkin's papers intuitively.  :)

In Topic: SAT problems (3D)

25 April 2016 - 06:36 PM

I've found this that may solve your problem:  http://www.gamedev.net/topic/676408-differentiating-between-an-edge-edge-and-something-face-collision/#entry5278632


Take a look at our comments. Randy posted an excelent article for the 3D case along with an implementation which I highly recommend if you want an OBB-OBB colision test that can be used in production.


The matrix majorness is irrelevant as long your basis vectors are unit and describe the faces of a box.  :wink:

In Topic: SAT problems (3D)

25 April 2016 - 05:34 PM

For paralell segments the cross product result is zero in which you should skip the test if you want the collision normal. You do this only for edge-edge tests. I see that you're crossing two face normals. Ideally you'd have to test the faces of the first box against the faces of the second box and all possible non-parallel edge combinations (e.g. an edge of the first box with an another box's edge). 


What is not working for your according to your visualization (e.g. what your collision configuration is showing)?