TRS22 and NVidia RTX

AFdude06

Active member
Good evening all!

I have been a Trainzer for a long time now, and one thing I notice often on the forums, is that lots of posts discuss the performance and optimization issues of the game. I have had my share of these problems and figured I would share the results of a solution I have used to help sort out two of those issues:

First, Trainz often has issues with frame drops and inconsistent frame rates.
Second, Trainz is very CPU bound and that can contribute to latency problems.

The heart of my PC is an NVidia RTX GPU, and with NVidia's app, there are settings I can tweak to change the way my machine handles games.
Before I could do that, I had to add trs22.exe to the NVidia app's program list.
To address the first point, NVidia has feature called Image Scaling. This tool makes the GPU render frames at a below-native resolution, and then upscales (sharpens) it to the native resolution, and without losing much detail. Lower-res frames means less horsepower used and more can be rendered in the given time. This helps boost framerates in many games, but in our case helps stabilize the framerate, as the CPU still hinders the GPU anyway.
Which brings us nicely to the second problem: latency. Since Trainz is a very CPU heavy game, framerates can be lowered by the CPU being too slow to keep up with the queue of frames waiting to be sent to the GPU. NVidia Reflex is a setting that limits the number of frames that can be queued, either a single frame with Normal mode, or none when Ultra mode is on. This gives the CPU a lighter load and helps smooth out performance.
Before looking at the results, I should add one note, from howtogeek: "The term "1% lows" refers to the lowest frame rates you experience 1% of the time during your gameplay. Similarly, the "0.1% low" refers to the lowest frame rates (FPS) you experience 0.1% of the time. These metrics provide a more holistic understanding of the gaming experience than just the average frame rate, as they give insight into the worst-case scenarios. They help identify instances of stuttering or lagging, which might significantly impair gameplay, even if the average frame rate seems satisfactory. If your 1% low is close to your average FPS, that's excellent news. It means that your game's performance is consistent, and you're unlikely to notice noticeable frame rate drops. However, if your 1% or 0.1% low is significantly lower than your average, you're encountering considerable frame rate drops during gameplay, leading to potential stuttering or lagging." Those are the stutters we see, and the higher that number is, the smoother the game will look, regardless of average framerate.

For this test, I recorded four benchmarks in Trainz Plus b126280 with MSI Afterburner, all using a train given the same drive command on the same path, each lasting about 200 seconds.
Hardware:
Intel Core i9-9900K 8-Core, 16-Thread CPU @3.6GHz
ASUS ROG Strix Gaming OC GeForce RTX 3080Ti GPU
Trainz Plus Settings:
2560x1440 165Hz
VSync off
Max Graphics
NVidia RTX BoostsAverage framerateMinimum framerateMaximum framerate1% low framerate0.1% low framerate
Image Scaling: OFF
Reflex Low Latency Mode: OFF
43.8 FPS32.5 FPS57.5 FPS30.6 FPS10.6 FPS
Image Scaling: Render Resolution 85% (2176x1224), Sharpen 100%
Reflex: ON
44.2 FPS32.8 FPS55.0 FPS31.1 FPS10.6 FPS
Image Scaling: Render Resolution 67% (1707x960), Sharpen 100%
Reflex: ULTRA
40.6 FPS30.9 FPS54.2 FPS32.7 FPS25.6 FPS
Image Scaling: Render Resolution 50% (1280x720), Sharpen 100%
Reflex: ULTRA
39.8 FPS31.5 FPS50.0 FPS33.6 FPS25.1 FPS

Looking at those numbers, it doesn't look like there are any big changes. In fact, the average framerate actually gets worse! But here is where those 1% lows come into play. Notice that without any boosts, we have a drop from 43.8 fps average to 30.6 for 1%, and 10.6 for 0.1%. That means that at multiple times, it dropped roughly 13 frames below average and we would have seen some stuttering. With the 0.1%, it dropped more than 33 below average, and that would have been a very noticeable hitch.
Looking at Reflex on Normal the changes are not great. But with the last two (Reflex on Ultra), we see the average start to go down slightly, but the 1% starts to speed up and 0.1% jumps up dramatically. At max boosts, we see an average of only 39.8 fps, but the 1% rose to 33.6, and the 0.1% jumped all the way to 25.1! so instead of being -33, we're only at -15 and we cut half of the difference off! This resulted in much smoother video, even though it was technically slower, since the 1% lows were keeping up with most of the frame times, it appeared much smoother. It seems the happy medium was actually when the upscaler was set to 67%. 0.1% lows were at 25.6, better than max settings, and I got a slightly better average and a better top framerate than max.
A bonus of both RTX boosts was that the environment actually rendered much faster as well, because of the lighter CPU load and the upscaling. Before it took up to 30 seconds or so to render everything, after it took about 2-5 seconds. That could be one of the most helpful parts, as I now don't have to sit and wait for every tree and section of track to start popping in. It seems that eliminating the render queue with Ultra Reflex does the most help to stabilize the framerate and render time.

Here are before and after screenshots to show the upscaling. I also used RTX Dynamic Vibrance to give some extra color depth to the game. This first shot is without Image Scaling or Dynamic Vibrance:
My-Trainz-Screenshot-Image.jpg

This second one is with the 85% resolution upscaling and Dynamic Vibrance at 50% Visibly, there is almost no difference in detail, but the game was running way smoother.

My-Trainz-Screenshot-Image.jpg


I figured that since I worked this out, I would try my best to share it with others to help improve Trainz for everyone. If anyone has any thoughts on this, I would love to hear. ;)

Cheers
 
Last edited:
Back
Top