Page 1 of 1

Friction: what is the unit?

Posted: Sat Jan 02, 2016 11:17 am
by Gregwar
Hello,
In btRigidBodyConstructionInfo, we can specify a m_friction for objects.

The only help in the doc is here:
http://bulletphysics.org/Bullet/BulletF ... c7ad43a0bf
"best simulation results when friction is non-zero "

But what is exactly the unit of this?
Thank you

Re: Friction: what is the unit?

Posted: Sat Jan 02, 2016 3:06 pm
by drleviathan
Friction has no unit of measure; it is a dimensionless coefficient. Just think of it as a dial that twist from 0 (frictionless) to 1 (max friction).

Note that the effective friction of a collision between two objects is actually the average of the two objects friction coefficients.

Re: Friction: what is the unit?

Posted: Mon Jan 04, 2016 10:52 am
by Gregwar
OK, but what does this number mean?

Re: Friction: what is the unit?

Posted: Mon Jan 04, 2016 1:17 pm
by Basroil
Gregwar wrote:OK, but what does this number mean?
theoretically speaking max parallel force <= mu (that number) * perpendicular force. If you press down with 0.5N of force and the combined mu is 0.5, the maximum friction force will be 1N. Bullet friction is a bit off the theoretical mark due to approximations, but more or less that.

Re: Friction: what is the unit?

Posted: Mon Jan 04, 2016 4:04 pm
by Gregwar
Basroil wrote:
Gregwar wrote:OK, but what does this number mean?
theoretically speaking max parallel force <= mu (that number) * perpendicular force. If you press down with 1N of force and the combined mu is 0.5, the maximum friction force will be 1N. Bullet friction is a bit off the theoretical mark due to approximations, but more or less that.
You mean the maximum friction force will be 0.5N?

Re: Friction: what is the unit?

Posted: Mon Jan 04, 2016 8:33 pm
by DannyChapman
drleviathan wrote:Friction has no unit of measure; it is a dimensionless coefficient. Just think of it as a dial that twist from 0 (frictionless) to 1 (max friction).
It is indeed dimensionless, but there's no upper limit.

The friction value that you set on a rigid body object in Bullet isn't a "real" physical property (and isn't what's normally called the coefficient of friction) - it's just subsequently used to derive a friction coefficient for the resulting contact. The friction coefficient for the contact, when multiplied by the normal contact force, gives the maximum frictional force at that contact, as Basroil wrote.
Note that the effective friction of a collision between two objects is actually the average of the two objects friction coefficients.
That's not correct (except in special cases). The default calculation of the friction coefficient in Bullet looks like this:

Code: Select all

btScalar	btManifoldResult::calculateCombinedFriction(const btCollisionObject* body0,const btCollisionObject* body1)
{
	btScalar friction = body0->getFriction() * body1->getFriction();
Multiplying the object friction values gives a reasonable combination, in my experience. You can override this, or in some physics engines set a flag, to use average friction values, but the result is not good.

All this applies to the restitution value too.