# coefficients of restitution and friction

## Recommended Posts

glSmurf    216
When two bodies with different coefficients of restitution and friction collide, which values do I use to compute the friction and bounce? For instance if a rock collides with a piece of ice... Rock { restitution = 0.1 friction = 0.8 } Ice { restitution = 0.2 friction = 0.1 }; ...do I use the lowest/highest coefficient or the average of them both? Or is there a formula for this?

#### Share this post

##### Share on other sites
ZedFx    176
when you are calculating a collision there is a "coefficiant of restitution between the two objects", which would imply the average of the two.

#### Share this post

##### Share on other sites
Ilici    862
Quote:
 Original post by ZedFxwhen you are calculating a collision there is a "coefficiant of restitution between the two objects", which would imply the average of the two.

Not really, the coefficient of (instantaneous?) friction affects the tangential velocities after the collision and the coefficient of restitution affects the normal velocities. They can both be incorporated into the collision solver equations, but I'm afraid I can't find them now. I'll keep googling though.

#### Share this post

##### Share on other sites
SpaceDude    208
You cannot assign a coefficient of friction to a certain surface, this does not make sense (the same applies to coefficient of restitution i would assume).

Coefficient of friction should always be between two surfaces.

i.e.

Ice & Ice = 0.01

Rock & Ice = 0.02

Rock & Rock = 0.3

I'm just making the values up here :)

#### Share this post

##### Share on other sites
John Schultz    811
Some thought experiments:

Restitution:

Take two bean bags and throw them together (coeff. rest. near zero for both).
Take a super bouncy rubber ball (coeff. rest. near 1) and collide it with a bean bag. All items have the same mass.

What would produce the most realistic behavior? The average or lowest?

Friction:

A grippy rubber tire with a coeff. rest. of 1.7 on pavement (1.0 is not the limit as some books seem to imply. This may explain why so many racing game cars slide around so much).
A snow+ice tire with a coeff rest. of .9 on pavement.
The same tires on ice.

...

Both coeff. of rest. and friction are ad hoc, empirical numbers (and concepts). They can not be generalized in a simple way. The most tune-able method for games would be to create a material table/hash, that contains the coefficients for every type of material pair supported by the game (there should not be many). Thus a function such as:

flt getCoeffFriction(MaterialID a,MaterialID b); // looks up a/b pair

For restitution, using the lowest value may provide acceptable behavior, otherwise a pair table/hash can allow complete tune-ability.

In summary, you can use any method that provides acceptable looking behavior: a simple, generalized solution does not exist.

#### Share this post

##### Share on other sites
glSmurf    216
Quote:
 Original post by John SchultzIn summary, you can use any method that provides acceptable looking behavior: a simple, generalized solution does not exist.

Best answer so far =)

your thought experiments:

Restitution:

I think that bean bag would bounce off that rubber ball, even if its just alittle bit. Is it atleast safe to say that coeff.rest will be somewhere between the average and lowest?

I will try something like:
coeff.rest = lowest + (average - lowest) / 3

if thats not realistic enought then Im back to lookup tables again.

Friction:

Having read about friction in a few books I was under the impression that coeff.fri was between 0 and 1. Thanks. (stupid books) =)

too tired to guess what a simple coeff.fri method would look like, so average will do for now... or use lookup tables again.

Oh well ...thanks for all replies

#### Share this post

##### Share on other sites
twanvl    512
I would expect the product to make the most sense for friction (if you adjust your coefficients accordingly). So if rock.friction = 0.9 and ice.friction = 0.3 then rock on rock = .81, rock on ice = 0.27 and ice on ice = 0.09

#### Share this post

##### Share on other sites
MrRowl    2490
I agree that the "proper" way for both friction and restitution is to use a lookup table, so you measure/guess the values for each pair of materials.

However, if you have a lot of materials, that's not easy to set up and make consistent, so it's nice to be able to characterise each material and combine them at runtime. Having said that, lookup tables let you tune pairs of interactions without affecting anything else (so for a car game you can tune the rubberA-ice interaction without breaking the rubberA-tarmac interaction, or the rubberB-ice interaction etc).

For restitution I would either take the lowest "bounciness" value, or multiply the two values. Both methods give sensible behaviour for individual bounciness values of 0 and 1 - i.e. the cases 0 against 0, 0 against 1, and 1 against 1, and reasonable values in between.

Friction is a bit harder:

1. If one of the surfaces is _completely_ slippery (grip is 0) then the resulting interaction should be completely frictionless - whatever the grip value of the other surface. So, averaging (errrr, which is what I do!) isn't right.

2. Lets say one surface has a grip of "0.2". The interaction with another surface of grip 0.4 should be different (slipperyer) from an interaction with a surface of friction 1.0, so taking the minimum grip value isn't right

3. Multiplying the grip values seems like it would give sensible behaviour.

Anyway, you material values for grip and bounciness don't have any meaning until you decide on what method you use.

#### Share this post

##### Share on other sites
glSmurf    216
Quote:
 Original post by twanvlI would expect the product to make the most sense for friction (if you adjust your coefficients accordingly). So if rock.friction = 0.9 and ice.friction = 0.3 then rock on rock = .81, rock on ice = 0.27 and ice on ice = 0.09

That might be worth trying =)

#### Share this post

##### Share on other sites
glSmurf    216
Quote:
 Original post by MrRowl(so for a car game you can tune the rubberA-ice interaction without breaking the rubberA-tarmac interaction, or the rubberB-ice interaction etc).

Nice point.

Maybe using both lookup tables and a simple method like multiplying coefficients
will give the best result. If I generally use the simple method on all collisions and where that is not satisfactory I'll use a lookup table.

#### Share this post

##### Share on other sites
John Schultz    811
Quote:
Original post by glSmurf
Quote:
 Original post by John SchultzIn summary, you can use any method that provides acceptable looking behavior: a simple, generalized solution does not exist.

Best answer so far =)

your thought experiments:

Restitution:

I think that bean bag would bounce off that rubber ball, even if its just alittle bit. Is it atleast safe to say that coeff.rest will be somewhere between the average and lowest?

I will try something like:
coeff.rest = lowest + (average - lowest) / 3

if thats not realistic enought then Im back to lookup tables again.

Take a wad of magic, non-sticky goo (green, of course) having a CR of 0.0 and collide it with the superball with a CR of 1.0. Will the superball bounce off? Take the ground with a CR of 1.0 and drop the bean bag. Does it bounce?
What if we drop an object with a CR of .5 on the ground with a CR of 1.0? We lose half the energy (not 1/4 (from an ave. CR = (.5+1.f)/2 = .75)). What if the ground is soft, and now has a CR of .5? Thus, the ground absorbs energy, as does the .5 CR object. Wouldn't a combined CR of .25 (.5*.5) make more sense?
Multiplying the CR's together might provide acceptable general behavior.

Also keep in mind that most typical game objects will have a CR near zero (unless you are developing a basketball/baseball/football/soccer game, SuperBall Madness, or something similar).

Quote:
 Original post by glSmurfFriction:Having read about friction in a few books I was under the impression that coeff.fri was between 0 and 1. Thanks. (stupid books) =)too tired to guess what a simple coeff.fri method would look like, so average will do for now... or use lookup tables again.

My first driving models used a CF of 1.0 for rubber on concrete (concepts from a basic physics book). However, after videotaping while driving a real sports car and comparing to the simulation, I had to up the CF to around 1.6-1.7 before the behavior reasonably matched. Race Car Vehicle Dynamics (Milliken and Milliken) is one book that shows that the CF is well over 1.0 for tires (over 2.0 for F1/Indy). One of the concepts is mechanical gearing between materials (a hot racing tire is also very sticky).

Experiments and videotape/motion-data-analysis, along with tweaking should provide good behavior for games.

EDIT: a few posts were made since I started writing this response; similar concepts were presented. Multiplying friction coefficients will not work in the racing tire, snow tire, ice and pavement cases (mechanical gearing must be taken into account, thus a LU/hash table (or special case tests) would be needed. Realistic tire contact modeling is the main reason a good physics-based driving model is an order of magnitude harder than the physics required for a spacecraft, boat, or flight simulator.

In any case, it's not hard to set up a hash map/table (many material types) or even a straight 2D array (if not many material types), which will allow you 100% control over behavior in a relatively easy way.

[Edited by - John Schultz on May 25, 2005 4:56:36 PM]

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now