Viscosity Effect on Dirt Tracks

Discussion related to Turbo Sliders and beta version feedback.

Moderator: Forum Moderators

Post Reply
Jeffrey
Community User Level: 3
Community User Level: 3
Posts: 432
Joined: Sun Jan 08, 2006 12:57 pm
Contact:

Viscosity Effect on Dirt Tracks

Post by Jeffrey » Wed Jun 14, 2006 10:29 pm

The Setting Visosity in the terrain file seems that it slows the car acceleration and creates a dirt throwing effect.

If this setting is set to viscosity 1.0 this dirt effect does not appear. The setting must be over 1.0.

But over 1.0 slows the car and i have to compensate with acceleration setting.

Is there a way that i can create this dirt throwing effect without slowing the car.

User avatar
Mouse
Community User Level: 5
Community User Level: 5
Posts: 1358
Joined: Fri May 20, 2005 1:56 am

Re: Viscosity Effect on Dirt Tracks

Post by Mouse » Thu Jun 15, 2006 12:57 am

Jeffrey wrote:The Setting Visosity in the terrain file seems that it slows the car acceleration and creates a dirt throwing effect.

If this setting is set to viscosity 1.0 this dirt effect does not appear. The setting must be over 1.0.

But over 1.0 slows the car and i have to compensate with acceleration setting.

Is there a way that i can create this dirt throwing effect without slowing the car.
I am currently working on a rally car - one with some actual acceleration (to add some dificulty to rally racing). If i discover anything like that i will tell you.
Image

User avatar
road_oktane
Community User Level: 2
Community User Level: 2
Posts: 158
Joined: Wed Jan 19, 2005 3:16 pm
Contact:

Post by road_oktane » Thu Jun 15, 2006 11:58 am

You may think viscosity as an atrittion factor that multiplies the aceleration factor of the car togheter as its viscosity.

I can surely tell you there's no way to set up a general dirt terrain. It all depends on wich kind of car you'll use on it.

Check the combination: V-F5 + Sand1

Jeffrey
Community User Level: 3
Community User Level: 3
Posts: 432
Joined: Sun Jan 08, 2006 12:57 pm
Contact:

To Ande

Post by Jeffrey » Thu Jun 15, 2006 11:12 pm

Image

This is my question. Below i set id3 (which is not the yellowish sand but the texture shown above in the image). But i changed all the settings like the normal tarmac.

With viscosity 1.0 the dust throwing effect does not work. To make it good looking you need at least 2.0 which make the car too slow. Also i noticed that the game with many cars was no longer smooth but a bit jerky.

Can i make this effect without increasing visosity? Thanks


Terrain Sand
id 3
isWall 0
viscosity 1.0
acceleration 1.0
braking 1.0
grip 1.0
steering 1.0
skidMark 1
tyreMark 1
red 170
green 130
blue 80

# red 200
# green 170
# blue 130
End[/url]

User avatar
Ande
Game Developer
Game Developer
Posts: 487
Joined: Thu Oct 14, 2004 9:43 pm

Post by Ande » Fri Jun 16, 2006 9:02 pm

I have to read the code to have any idea how that thing works :).

Currently, dirt throwing is directly related to terrain viscosity factor as you noticed. The effect starts if viscosity is more than 1.0 and the maximum effect is got with viscosity 3.0.

Terrain viscosity is multiplied with the car viscosity and in every frame, and car speed is decreased by speed * viscosity * frame time. This is done after the speed has been increased by acceleration * frame time if acceleration is on.

Unfortunately, it may be impossible to achieve the exact effect you want. The current dirt throwing is supposed to be related to the slowdown caused by the terrain. Perhaps there should be some other parameter in the terrain that could be used to control the dirt throwing...

But you can try adding acceleration but it can make the car handle spinner-like. That could perhaps be somewhat compensated by decreasing grip and braking but I'm I know that may not be enough.

User avatar
Ande
Game Developer
Game Developer
Posts: 487
Joined: Thu Oct 14, 2004 9:43 pm

Post by Ande » Fri Jun 16, 2006 9:04 pm

One comment about the game getting jerky. Having lots of dirt on the screen requires lots of alpha blending which is a weak point of the SDL library the game is using. If you want to see if alpha blending is the reason, you can try disabling it in the video settings.

User avatar
road_oktane
Community User Level: 2
Community User Level: 2
Posts: 158
Joined: Wed Jan 19, 2005 3:16 pm
Contact:

Post by road_oktane » Sat Jun 17, 2006 2:00 am

ande wrote:I have to read the code to have any idea how that thing works :).

Currently, dirt throwing is directly related to terrain viscosity factor as you noticed. The effect starts if viscosity is more than 1.0 and the maximum effect is got with viscosity 3.0.

Terrain viscosity is multiplied with the car viscosity and in every frame, and car speed is decreased by speed * viscosity * frame time. This is done after the speed has been increased by acceleration * frame time if acceleration is on.

Unfortunately, it may be impossible to achieve the exact effect you want. The current dirt throwing is supposed to be related to the slowdown caused by the terrain. Perhaps there should be some other parameter in the terrain that could be used to control the dirt throwing...

But you can try adding acceleration but it can make the car handle spinner-like. That could perhaps be somewhat compensated by decreasing grip and braking but I'm I know that may not be enough.
Now i get it too. That's explain why Jazzy's Toca Tracks got smoke on that grippy pitlane.

User avatar
Ande
Game Developer
Game Developer
Posts: 487
Joined: Thu Oct 14, 2004 9:43 pm

Post by Ande » Sat Jun 17, 2006 7:28 am

One solution would be to add a new "dirtthrow" parameter to the terrain which would override the current system if it has been defined.

In rally tracks, it would also be nice to have dirt throwing related to acceleration, not speed, as it is currently. This way, lots of dirt could be coming in the beginning of an acceleration even with zero speed.

Jeffrey
Community User Level: 3
Community User Level: 3
Posts: 432
Joined: Sun Jan 08, 2006 12:57 pm
Contact:

Post by Jeffrey » Sat Jun 17, 2006 10:29 pm

One comment about the game getting jerky. Having lots of dirt on the screen requires lots of alpha blending which is a weak point of the SDL library the game is using. If you want to see if alpha blending is the reason, you can try disabling it in the video settings.
Yes Ande.. you are right, when there are more than 6 cars the game is not smooth.

But the dirt throwing effect is great with dirt tracks. You loose all effect if you switch that off.

And yes.. it would be nice that in next version, this dirt throwing effect could be added with just a parameter and not related with visosity

User avatar
Jazzyclub
Community User Level: 3
Community User Level: 3
Posts: 586
Joined: Sun Nov 14, 2004 2:11 am
Contact:

Re: To Ande

Post by Jazzyclub » Wed Jun 21, 2006 1:15 pm

Jeffrey wrote:Image

With viscosity 1.0 the dust throwing effect does not work. To make it good looking you need at least 2.0 which make the car too slow. Also i noticed that the game with many cars was no longer smooth but a bit jerky.

Can i make this effect without increasing visosity? Thanks
sure just set viscosity 1.1 and not necessry 2.0 and it work realy fine..
try this one code:
Terrain Rocky
id 48
isWall 0
viscosity 1.1
acceleration 0.95
braking 0.6
grip 0.6
steering 0.9
tyreMark 1
red 150
green 135
blue 105
End

User avatar
road_oktane
Community User Level: 2
Community User Level: 2
Posts: 158
Joined: Wed Jan 19, 2005 3:16 pm
Contact:

Post by road_oktane » Wed Jun 21, 2006 9:26 pm

Viscosity 1.01 works also, and the diference compared to 1.0 viscosity is not percepted by our human eyes :D

Post Reply