Transport Fever 2

Transport Fever 2

344 ratings
Performance tuning
8
2
6
3
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
10.553 KB
16 Aug, 2022 @ 11:48pm
28 Jun, 2023 @ 4:04am
5 Change Notes ( view )

Subscribe to download
Performance tuning

Description
I have a Core i9 CPU and an RTX 3080 GPU running at 4k, so when the frame rate started dipping into the teens I figured the game could benefit from a little optimisation!

I have designed this mod to give a noticable performance boost "out of the box", with minimal effect on visual quality. There are some tuning paramaters included for those who want to delve a bit more into the details.

The issue with TPF2 seems to boil down to "rendering too much" or basically "rendering stuff you can't see". There are controls for "level of detail" that define what models are rendered (or not rendered at all) at certain distances from the viewer's camera perspective. The low detail models are used at greater distances.

On big and busy maps I think too much is being rendered that you can't actually see. The work effort increases exponentially with render distances as for a given density of objects the number of objects in the view area is likely to grow with the square of the radius.

The tuning parameters are:

- "Lod render distance scale factor"
This will scale down the render distances by the given fraction, effecting both when the transition between high and low detail models occur and when the models are not rendered at all. This defaults to 0.6 meaning the distances are approximately halved.

- "Threshold distance for lod scaling"
The distance (in in-game meters) away from the camera where the lod render scale is applied. This defaults to 500m, it means the quality of the models near to the camera are unaffected. This paramater is a key difference between using this mod and simply reducing the graphics settings (which does noticably affect the quality). Only the portion of a distance after the threshold is affected by the scale factor.

- "Absolute maximum render distance"
This distance (in in-game meters) is a cutoff past which nothing is rendered. I had noticed that models could be rendered as far as 10km away or more, and for practical purposes these are not visible anyway to the user. As the number of models scales exponentially with this distance, reducing it can have dramatic performance benefits without impacting game experience. This defaults to 5000m. Even running at 4k I do not notice a visual difference with this setting but it does cut the number of models rendered.

- "Turn on custom presets"
This is a switch that toggles a series of additional tuning parameters I have made - defaults to on. This is where I have found that some particular models are consuming disproportionately more resources (bridges for example) and so their render distances are more aggressively optimised.

Please feedback comments, suggests, bug reports on the steam workshop page.

Update 1.1:
Thank you to YT8HmH7 for spotting and providing a fix for a bug that could result in unexpected behaviour with large number of bridges.
I have also made a few more optimsiations for the default presets that should help further improve performance.


Popular Discussions View All (2)
2
12 Sep, 2022 @ 1:21pm
Where to tweak the settings?
sirupflex
0
14 Nov, 2022 @ 1:36pm
Weird effects on people
VacuumTube
73 Comments
okeating  [author] 11 Sep @ 5:04am 
I don't see why not...
Fenix Alfa 9 Sep @ 4:32pm 
Is this mod still working as of Sep 2024? I don't seem to have any major upgrade.
oshawotta737 21 Oct, 2023 @ 8:07pm 
I can't get the settings to change in game? how can I solve this?
hanspni 28 Aug, 2023 @ 2:06pm 
I have had big problems with lag even do i have a very good computer. It seems like i have solved the problem in 2 differrent steps. 1. I use this mod and it helped at least to make the game playable. I would say it run 95 % perfect after this mod on my megalomaniac map game. 2. I have adjusted my FPS on my graphic card AMD Radeon RX 6800XT. It orginally was 60 FPS and adjusted it to 120, later to 180 as a test without seeing difference from 120. The game now run 99.9% perfect and i have 28000 inhabitants,540 trains, close to 1000 trucks and trams combined.
okeating  [author] 24 Jun, 2023 @ 7:18am 
Many thanks I have incorporated and pushed a new release :)
YT8HmH7 23 Jun, 2023 @ 3:22pm 
You can use it with the most recent version no problem. However, try not to use bridge mods, or disable presets in settings.
As for my fixes, I uploaded them to my GitLab, and sent a message with full description to @okeating a few days ago. I suppose they are busy, or maybe just missed the notification.
Odey555 23 Jun, 2023 @ 3:03pm 
Heyo, is this mod still usable/needed after the big March update? I haven't played since last year so. Also wondering if I should just wait until you update with YTHmH7's edits
okeating  [author] 17 Jun, 2023 @ 3:23pm 
@YT8HmH7 sure feel free to message me
YT8HmH7 17 Jun, 2023 @ 3:00pm 
Hello @okeating
I made a massive fix for this mod. If not by line count, but certainly by impact. It should fix all the issues this mod had caused. It also slightly changes the scale factor behavior.
It probably isn't right for me to publish it, even with full credit written everywhere, because the main idea is the same. So I guess I could send you my version somehow for you to update this mod?
Aegyssus 15 Jun, 2023 @ 11:42am 
:steamthis::steamthumbsup: Perfection !
Had some problems before with low fps and no way to play humongous maps ...
After found your mod, I play those huge maps not only without any low fps, but most of the time I play at highest fast-forward speed :
FLAWLESS !

Thank You !
:steamhappy: