Vehicle tire friction for sliding noise?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Vehicle tire friction for sliding noise?

Postby pHySiQuE » Thu Sep 25, 2014 1:20 pm

I'm having a lot of fun with the new vehicle implementation:


Now I'm adding sound and I want to detect tire sliding. Is there any way to do this?
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Vehicle tire friction for sliding noise?

Postby Julio Jerez » Thu Sep 25, 2014 2:12 pm

Ha that's the spirit.
Now that you have a core implementation, you can add all kind of vehicle configuration.
for adding soudn effect I added this interface function

Code: Select all
// return a value between 0.0 (no sidl slip) and 1.0 (max slip)
dFloat GetLateralSlip () const 

// return a value between -1.0 (max spin backward slip) and 1.0 (max slin forward slip)
// 0.0 (no slip)
// not a tire wh spinning always has a no zero slip value
dFloat GetLongitidinal () const


the second parameter you can use to customize your tires, is the tire lateral stiffness and longitudinal stiffness, these parameter represent different kind of tire.
the default that I use in the demos are
lateral stiffness = 20
longitudinal stiffness = 10000

these will be for a high performance low profile tire for race car, it look like you are using similar values.
A car like a truck, an suv or a pickup usually use high profile tires, so the will have lower lateral and longitudinal stiffness values.
Experiment with those numbers and you will be surprised how wide variation of behavior you can get.

sync so that you get the new functions.

you may not believe this but right there as it stands now, you already have a vehicle feature that is either equal or better than any vehicle support offered by any of the establishment high end game engines. that includes game engines like Unreal, Unity, Crisis, and so on.

I neglected they vehicle for too long thinking that people will use the support on their own, but aside from Walaber and David Gravel, no one really did anything, so I decided to make my self.

Same happen with alomost any effect in the engine, they go unnoticed for the most part
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Vehicle tire friction for sliding noise?

Postby pHySiQuE » Thu Sep 25, 2014 4:05 pm

It's working great:


I found that if you only allow the gas pedal to be gradually increased, you don't need as high a friction value, and you can allow a higher speed while keeping the nice skidding behavior. (Since a keyboard only allows a binary input, it's like flooring the gas pedal every time you press the accelerator.)
pHySiQuE
 
Posts: 608
Joined: Fri Sep 02, 2011 9:54 pm

Re: Vehicle tire friction for sliding noise?

Postby Julio Jerez » Thu Sep 25, 2014 4:31 pm

fo rthe engine you need a low frequency engine sound. that sound of for a High rmp high performance Car.

the skip sound you read the values they are linear but you probably do no wan the to act linear,
for example a car tuning will have so wide slip in order to turn , but the sound should be low.

you can achieve that but applying some sort of invert gamma to the value that you read.
something like,

Code: Select all
float somePower = 2.0;
float sideLip = tire->GetSideLip();
sideslip = pow (absf (sideLip), somePower);

//if you make somePower = 2.0 then is simple. which is very good in my opinion.
sideslip = sideLip * sideslip;


as for controller, yes would be nice to see with a analog controller.
I am surprise is work at all with a keyboard binary input.


also try lowering the longitudinal tire stiffness.
The values you are using if for very stiff tire that almost do not allow for any slip.
a lower value will let the tire operate at some value of longitudinal slip and the car will feel a little more elastic.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest