Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Can anyone point me to some resources that go into the maths of what Asymptote and Extremum are?

Discussion in 'Physics' started by Lethn, Aug 6, 2020.

  1. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,328
    I'm trying to understand wheel colliders and all the settings better, does anyone know some decent resources I could look up on Asymptote and Extremum specficially?
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,969
    Asymptote and Extremum are arbitrary denominations that were used in the original PhysX (formerly Ageia PhysX before being acquired by nVidia) to describe the points of the tire friction curve. Since PhysX 3 (Unity 5) these denominations are no longer used in PhysX, but Unity still uses them as they started with a PhysX version with them. The Asymptote and Extremum points are described here:


    Here you can see the original code in Ageia PhysX with the proper descriptions for the asymptote and extremum parameters.


    However, despite being a reasonably good model, that implementation of the tire friction in PhysX was severely flawed and the friction in that original WheelCollider (before Unity 5) never worked properly. Here's how the friction curve really looked like at that time:


    As said, "asymptote" and "extremum" are no longer used in PhysX. Unity keeps these denominations though, which since Unity 5 (PhysX 3) are somehow translated to the new tire friction configuration in PhysX, PxVehicleTireData:



    How Unity translates the values from old Asymptote and Extremum to new PhysX's PxVehicleTireData is not documented. It worth noting than in current PhysX only the longitudinal friction supports something barely similar to asymptote and extremum. Lateral friction is configured using two floats only. The units for configuring both longitudinal and lateral friction in new PhysX is radians (?).

    Tire friction is computed in PhysX in the the file PxVehicleUpdate. The method computeTireFriction uses the friction parameters for calculating something, and the method PxVehicleComputeTireForceDefault actually computes the longitudinal and lateral tire forces:


    Comments in the code state that the tire force calculations use the "Michigan tire model", but I couldn't find any other information on such model.

    Update: It can be found as "HDRI tire model":
    https://deepblue.lib.umich.edu/bitstream/handle/2027.42/330/28983.0001.001.pdf
    (Described in page 21; formulas in Appendix II, page 113).
    (See below for more references on this model).​

    Then longitudinal and lateral tire forces are combined and applied to the rigidbody ("chassis") here:


    Additional useful references:

    WheelCollider's suspension force is calculated here:
    https://github.com/NVIDIAGameWorks/...ce/physxvehicle/src/PxVehicleUpdate.cpp#L3359

    PxVehicleSuspensionData.mSprungmass. The section for mSprungMass describes the nonsensical formula used for calculating the suspension force:
    https://docs.nvidia.com/gameworks/c...ionData.html#23f96767e47ea394bbb10ee597f2d9d3
     
    Last edited: Apr 1, 2021
    Nition and Lethn like this.
  3. Lethn

    Lethn

    Joined:
    May 18, 2015
    Posts:
    1,328
    Holy crap! Thanks for all of this, that's some really detailed information, I was asking about it generally because I wanted to be able to make some more subtle tweaks to the wheel collider behaviour and thought it would be a good idea to learn properly about the values I'm adjusting, I'll have a look through everything, this should help out others too.
     
    Edy likes this.
  4. Nition

    Nition

    Joined:
    Jul 4, 2012
    Posts:
    774
    Look up HSRI tire model. HSRI =The University of Michigan Highway Safety Research Institute.
     
    Edy likes this.
  5. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,969
    Thanks!

    The HSRI tire model and its versions are briefly described in this presentation, slides 8 and 9:
    https://www.iith.ac.in/~ashok/VD/GroupF_Tire.pdf

    The formulas for the three versions of the HSRI model (as well as other two) are in this article, Appendix II, page 113:
    https://deepblue.lib.umich.edu/bitstream/handle/2027.42/330/28983.0001.001.pdf

    An example of usage of the model is in this article. The formulas for the HSRI model are in the point 2.2:
    https://www.hindawi.com/journals/mpe/2018/3106329/
     
    Nition likes this.
unityunity