# coefficients of restitution and friction

This topic is 4895 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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 on other sites
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 on other sites
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 on other sites
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 on other sites
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 on other sites
Quote:
 Original post by John SchultzIn summary, you can use any method that provides acceptable looking behavior: a simple, generalized solution does not exist.

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 on other sites
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 on other sites
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 on other sites
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 on other sites
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.

1. 1
Rutin
29
2. 2
3. 3
4. 4
5. 5

• 12
• 13
• 11
• 10
• 13
• ### Forum Statistics

• Total Topics
632954
• Total Posts
3009443
• ### Who's Online (See full list)

There are no registered users currently online

×