Viscosity Effect on Dirt Tracks
Moderator: Forum Moderators
Viscosity Effect on Dirt Tracks
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.
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.
Re: Viscosity Effect on Dirt Tracks
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.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.

- road_oktane
- Community User Level: 2

- Posts: 158
- Joined: Wed Jan 19, 2005 3:16 pm
- Contact:
To Ande

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]
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.
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.
- road_oktane
- Community User Level: 2

- Posts: 158
- Joined: Wed Jan 19, 2005 3:16 pm
- Contact:
Now i get it too. That's explain why Jazzy's Toca Tracks got smoke on that grippy pitlane.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.
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.
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.
Yes Ande.. you are right, when there are more than 6 cars the game is not smooth.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.
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
Re: To Ande
sure just set viscosity 1.1 and not necessry 2.0 and it work realy fine..Jeffrey wrote:
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
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
- road_oktane
- Community User Level: 2

- Posts: 158
- Joined: Wed Jan 19, 2005 3:16 pm
- Contact:


