Coulomb Friction

NVIDIA PhysX SDK

Coulomb Friction

Introduction

PhysX SDK 3.2 provides two different types of friction models:

  1. Default friction model

The default friction model is constraint-based friction model. It is efficient and leads to very stable friction behavior even at relatively low solver iterations. However, as it is constraint-based, this approach can lead to very strong static friction, which can diverge from the analytical results expected for a given friction coefficient. This makes it ideal for simulations in which accuracy can be traded off for performance; a situation common in games.

  1. Coulomb friction model

The Coulomb friction model is based on the Coulomb laws of friction. It is less efficient than the default friction model and it can require more solver iterations to achieve stable stacking behavior. However, its friction behaviors are much closer to the analytical results than the default friction model so could be preferable for applications where accurate friction behavior is important. The Coulomb model comes in two variants, one-directional and two-directional. The one-directional approach is similar in terms of workload to the default friction model and can be stable at similar solver iteration counts. Its behavior is closer to the analytical results but diverges slightly. The one-directional approach is a simplification of the full Coulomb model, in which the friction for a given point of contact is reduced to a one-directional friction model. This simplification allows us to reduce the number of iterations required for convergeance but is not as accurate as the full two-directional model. Therefore, in order to simulate stable stacking, we need to increase the number of solver iterations in the two-directional model.

Enabling The Coulomb Friction Model

To enable the Coulomb friction model, set one of the two flags in the PxSceneDesc::flags:

PxSceneDesc sceneDesc;
sceneDesc.flags |= PxSceneFlag::eENABLE_ONE_DIRECTIONAL_FRICTION;

or:

sceneDesc.flags |= PxSceneFlag::eENABLE_TWO_DIRECTIONAL_FRICTION;