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

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?

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:

https://docs.unity3d.com/Manual/class-WheelCollider.html

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

https://github.com/ultrano/OliveEngine/blob/master/source/PhysxSDK/Physics/include/NxWheelShapeDesc.h

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:

https://discussions.unity.com/t/487227

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:

https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Vehicles.html#pxvehicletiredata

PxVehicleTireData reference:
https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/apireference/files/classPxVehicleTireData.html

How Unity translates the values from old Asymptote and Extremum to new PhysX's PxVehicleTireData is not documented. It worth noting that 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 some preliminary data, and the method PxVehicleComputeTireForceDefault actually computes the longitudinal and lateral tire forces:

computeTireFriction
https://github.com/NVIDIAGameWorks/PhysX/blob/4.1/physx/source/physxvehicle/src/PxVehicleUpdate.cpp#L2074

PxVehicleComputeTireForceDefault
https://github.com/NVIDIAGameWorks/PhysX/blob/4.1/physx/source/physxvehicle/src/PxVehicleUpdate.cpp#L2226

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 this post below for more references on this model).

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

https://github.com/NVIDIAGameWorks/PhysX/blob/4.1/physx/source/physxvehicle/src/PxVehicleUpdate.cpp#L3567

Additional useful references:

WheelCollider's suspension force is calculated here:
https://github.com/NVIDIAGameWorks/PhysX/blob/4.1/physx/source/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/content/gameworkslibrary/physx/apireference/files/classPxVehicleSuspensionData.html#23f96767e47ea394bbb10ee597f2d9d3

Here a PhysX developer (Gordon?) tries to justify the suspension model in PhysX Vehicles:
https://twitter.com/PhysicsIsFun5/status/1312102459087622144

"We are free to choose any definition of zero displacement". That's the major misconception of the PhysX suspension model.

7 Likes

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.

1 Like

Look up HSRI tire model. HSRI =The University of Michigan Highway Safety Research Institute.

2 Likes

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/

1 Like