Search Unity

Resolved J impulse is wrong

Discussion in 'Physics for ECS' started by Sab_Rango, Sep 22, 2021.

  1. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Hello folks!
    I noticed that "Impulse applying equation" is incorrect in all Physics Engines and papers

    Specially, applying Linier Impulse is incorrect. here the equation :

    va2 = va1 + j n / ma
    ωa2 = ωa1 + (rap × j n) / Ia

    thebookformula.png


    In the Equation above, Linear impulse never considering contact point location, e.g if its close to Center of Mass. And this is completely incorrect. Since force or impulse Vector should be divided with Vector separation rules.

    Meanwhile, this equation shows its main incorrect value when an impulse or force vector perpendicular to the collision arm vector. Indeed in this case, Linear Impulse should be zero. but the equation above adds additional impulse to the Linear velocity
    90deg.png



    Here I proposed my own fixed equation for applying Impulse or Force for a Rigidbody


    va2 = va1 + (rap · j n) / ma ----(Dot product of "collision normal" and "collision arm")
    ωa2 = ωa1 + (rap × j n) / Ia







    Please, let me know what do you think about my proposal ! Because Impulse applying formula is core of the Physics Engine, the incorrect formula totally changes realism of the simulation.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    I think this is a very broad assumption. Couldn't be just you?

    Ok, here is the problem. Everything you describe is wrong. But it's ok, I also experienced the same confusion as you (and thought the same) the first time I faced these situations. I know that understanding this is not intuitive, but there's an explanation for the actual impulse equations not to consider the contact point location.

    Please check out the section 5.5 " Force vs. Torque Puzzle" of this paper. The case is nicely explained there:
    https://www.cs.cmu.edu/~baraff/sigcourse/notesd1.pdf

    Here are the relevant figures:

    upload_2021-9-23_10-21-33.png

    upload_2021-9-23_10-22-12.png

    As you can see, the velocity (impulse) is the same regardless the contact point. Surprisingly, that's how it works in real world physics.

    That would mean that any force applied in a direction that forms an angle of 90 degrees with the vector of the contact point wrt the center of mass would apply 0 impulse, even if the contact point is just 1 mm away of the center of mass, no matter the magnitude of the force. It's evidently incorrect.
     
  3. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Hello! @Edy


    1) Here, still, what I believe is that Linear Force value should be changed into vector projection when its away from Center of Mass (COM).

    Since it shows huge inaccuracy when force or impulse far away from COM.

    ff.png

    2)As, it was mentioned in the paper, E kinetic energy depends on path that travel during the force applied.
    But what if there is an "Impulse" instead of a "Force". Why the applied impulse should gain more impulse than its original value.





    Yet, this collision formula is in the field " Algebraic Collision Law", which means ,no matter what , the final result is not going to give 100% accurate result because of few computation.

    Nevertheless, I still believe linear impulse or force vector should be given by its projected vector value to the Rigidbody, even "Algebraic Collision Law" used to solve collision response or applied energy.
     
  4. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    That would lead to incorrect and unrealistic results. Believe it or not, physics in reality work as described and formulated in the papers.
    An impulse is a force applied during a very short amount of time. Result is the same.
    The applied impulse (== force) does more work when applied off-center, so it gives more kinetic energy to the rigid body: same kinetic energy as per the same velocity and additional kinetic energy as per the added angular velocity.

    Again, I know it's difficult to understand. And again, that's how physics work in reality, believe it or not. The problem is not the physics or the papers, but understanding a correct concept that seems not intuitive at first.

    Think on the billiard/pool players when they hit the ball off-center. The ball receives the same velocity as when hit in the center, but the off-center distance also gives them additional angular velocity.
     
  5. Sab_Rango

    Sab_Rango

    Joined:
    Aug 30, 2019
    Posts:
    121
    Finally I've just figured out that this formula is correct and proved with a simple lever example

    lever.png
     
    Last edited: Nov 24, 2021