Ongoing Investigation: SP6 Route Performance & Redraw Issues

The problem here is that it doesn't work smoothly anymore in this route... when it always did up to SP5.
I'm seeing the opposite with my cluttered routes including the very large one.

There could be other things going on that are causing this. Is TRS Plus still caching content? I've had that ruin framerates.
 
No caching ongoing.
One more thought on this. In addition to high polygon assets, scripts can impact performance. If you have some older scripted assets, it's possible that the scripts are doing things that aren't quite Kosher as far as Plus thinks, but they worked perfectly fine in early versions of Plus and of course TRS19 and below. To find out if this is in fact an issue, close your route back to the Launcher. Click on Trainz Settings and then the Dev tab. On the Dev tab, check the box next to Show script exception notifications.

What this will do is show the red bug in Driver and possibly Surveyor if Surveyor isn't paused. Clicking on the red bug will bring up a list of errors. Double-clicking may give you more details on the script.

Fixing the script bugs isn't for the faint of heart and is relegated to those that know what they do. What you can do is highlight the text, right-click and choose copy. You can then paste the text in the forums - use Code formatting to keep it together, for us to look at. Those that know how to fix that kind of stuff may be able to help.
 
One more thought on this. In addition to high polygon assets, scripts can impact performance. If you have some older scripted assets, it's possible that the scripts are doing things that aren't quite Kosher as far as Plus thinks, but they worked perfectly fine in early versions of Plus and of course TRS19 and below. To find out if this is in fact an issue, close your route back to the Launcher. Click on Trainz Settings and then the Dev tab. On the Dev tab, check the box next to Show script exception notifications.

What this will do is show the red bug in Driver and possibly Surveyor if Surveyor isn't paused. Clicking on the red bug will bring up a list of errors. Double-clicking may give you more details on the script.

Fixing the script bugs isn't for the faint of heart and is relegated to those that know what they do. What you can do is highlight the text, right-click and choose copy. You can then paste the text in the forums - use Code formatting to keep it together, for us to look at. Those that know how to fix that kind of stuff may be able to help.
The only way to solve this current issue would be for all problem assets and scripts to be reomved from the download station and 3rd party trainz sites, And be fixed. Thats is not an option. We shouldn't have to pick and choose what we use in our routes to meet a very small vram and system ram requirement. This is insane. I am using very little Vram as well on a very capable videocard. This would be like microsoft flight simulator keeping everyone on medium settings regardless of what hardware you have, Or Amd and Intel keeping us all at 4ghz when alot of us can go higher. I haven never objected in trainz as much as i have since SP6 was dropped. This is bad for all pc Users.
 
As long as the program works smoothly, I don't care how much computer is being used. The fact that my video card CPU run a lot cooler with this version is not such a bad thing compared to SP5 and below.
I'd be in this boat too if it weren't for the fact that my program isn't working smoothly. With TRS22 SP5 and older I was getting much better framerates and next to no stuttering. I want to say that SP4 and older ran even better than SP5 but back then, I had no problems so I had no need to investigate. The SP6 hotfix fixed the slow/non-existent rendering, but my framerate is still atrocious. Many of the routes I typically play are close to unplayable but I'm trying to chug along since there's nothing else that fills the niche of Trainz.
 
Clicking on the red bug will bring up a list of errors. Double-clicking may give you more details on the script. ... Those that know how to fix that kind of stuff may be able to help.

Here's an example that has "bugged me" in Trainz Plus long before SP6 arrived.

Code:
- <NULL> : File cdhelper.gs, Line 253, ER_NullReference
  ; <NULL> : Script callstack
    ; <NULL> : function $void@cdhelper::AddMenuIcon(), line 253
    ; <NULL> : function $void@cdhelper::UpdateMenuIcon(), line 215
    ; <NULL> : function $void@cdhelper::RegisterMenuItem(GameObject,string,string,string,bool,bool), line 135
    ; <NULL> : function $void@cdhelper::RegisterMenuItem(GameObject,string,string,string), line 140
    ; <NULL> : function $void@NamedObjectsCacheLibrary::OnWorldModuleInit(Message), line 313

It gives no indication as to which asset (if any) is responsible. If that info was available I could possibly deal with it. A few other possible relevant points:-
  • It occurs in Trainz Plus but not in the identical route and session in TRS22PE (both programs have the script notification setting on in the Dev tab).
  • It occur at the very start of the Trainz Plus session before any action has started - and there are no AI trains running.
  • There has been the odd occasion where the red bug has not appeared at all but I cannot pin down what was different.
A long standing mystery.

EDIT: Added a new observation.
  • When running in Driver and switching, via the UDS, to Surveyor and then back to Driver again without making any changes, the same bug is flagged again.
 
Last edited:
Here's an example that has "bugged me" in Trainz Plus long before SP6 arrived.

Code:
- <NULL> : File cdhelper.gs, Line 253, ER_NullReference
  ; <NULL> : Script callstack
    ; <NULL> : function $void@cdhelper::AddMenuIcon(), line 253
    ; <NULL> : function $void@cdhelper::UpdateMenuIcon(), line 215
    ; <NULL> : function $void@cdhelper::RegisterMenuItem(GameObject,string,string,string,bool,bool), line 135
    ; <NULL> : function $void@cdhelper::RegisterMenuItem(GameObject,string,string,string), line 140
    ; <NULL> : function $void@NamedObjectsCacheLibrary::OnWorldModuleInit(Message), line 313

It gives no indication as to which asset (if any) is responsible. If that info was available I could possibly deal with it. A few other possible relevant points:-
  • It occurs in Trainz Plus but not in the identical route and session in TRS22PE (both programs have the script notification setting on in the Dev tab).
  • It occur at the very start of the Trainz Plus session before any action has started - and there are no AI trains running.
  • There has been the odd occasion where the red bug has not appeared at all but I cannot pin down what was different.
A long standing mystery.

EDIT: Added a new observation.
  • When running in Driver and switching, via the UDS, to Surveyor and then back to Driver again without making any changes, the same bug is flagged again.
That's interesting... This is probably one of the many bugs on the list to repair someday after the devs add some new feature we haven't seen yet.
 
SP6 + HF1 has had about a 10-15% negative effect on FPS for me when running my densely populated route and session. However, Nvidia has come to the rescue in a timely fashion by introducing Smooth Motion for its GeForce RTX 40 Series GPUs, which has had the effect of doubling framerates for me. I also have DLSS Override Super Resolution Mode set to Ultra Performance and Vertical Sync to Adaptive (half refresh rate) and in combination this also appears to suppress a lot of the stuttering that I previously experienced.

Taking a closer look at stuttering, and following John's advice above, I have recurring script issues as follows, which I think are associated with my Enhanced Interlocking Tower setup:

Signal.SetSignalState> Insufficient rights. This Signal (NK 145) is owned by another object (Crayford Creek Junction) and cannot be modified. (file signal.gs) (or similar message)
Script class: VSRSignal
MeshObject: <kuid2:125145:24013:2> "Sig 4A Gantry"
Script callstack
function $bool@Signal::SetSignalState(SecurityToken,int,string), line -1
function $void@Signal::SetSignalState(int,string), line 213
function $void@VSRSignal::DisplayIndication(), line 113
function $void@VSRSignal::signalStateChangedHandler(Message), line 481

File signal.gs, Line 213, ER_Exception
Script class: VSRSignal
MeshObject: <kuid2:125145:24013:2> "Sig 4A Gantry"
Script callstack
function $void@Signal::SetSignalState(int,string), line 213
function $void@VSRSignal::DisplayIndication(), line 113
function $void@VSRSignal::signalStateChangedHandler(Message), line 481

I've also been thinking about what new features introduced to Trainz in the last few years that I feel I've really benefitted from and the only one I can think of is Surveyor 2.0. But even that has an unfinished feel to it with certain features still only available in Surveyor 1.

Other new features or changes seem to have their flaws or also appear incomplete:
- Removing the option for Process Objects Behind Camera (forced a dramatic negative effect on running my dense route and session)
- HD Terrain system (file size issue)
- Plant Factory Treez (no animation, and seasonal issues and I saw no performance gain when swapping my SpeedTrees out for them)
- Living railroad and dispatch manager (the wait for passenger support goes on)

I'm now left wondering whether TrainzPlus is right for me as TrainzPE seems to have all I need with Surveyor 2.0.
 
I've also been thinking about what new features introduced to Trainz in the last few years that I feel I've really benefitted from and the only one I can think of is Surveyor 2.0. But even that has an unfinished feel to it with certain features still only available in Surveyor 1.

Other new features or changes seem to have their flaws or also appear incomplete:
- Removing the option for Process Objects Behind Camera (forced a dramatic negative effect on running my dense route and session)
- HD Terrain system (file size issue)
- Plant Factory Treez (no animation, and seasonal issues and I saw no performance gain when swapping my SpeedTrees out for them)
- Living railroad and dispatch manager (the wait for passenger support goes on)
Surveyor 2.0 was certainly a major change and, as you noted, still has an "unfinished" feel to it. The Bulk Update/Replace feature, for example, lacks the versatility found in Surveyor Classic and I occasionally go back to Classic to use of it.

HD Terrain has a lot of potential but the issue of file size is currently limiting its use to smaller routes. A earlier SP for Trainz Plus and TRS22 did significantly increase the file compression used when saving .cdp files but more will be needed. At the moment all my routes are too large to use HD.

The introduction of Plant Factory was to remove a significant obstacle to creating realistic plant assets - you need to buy a license to create SpeedTrees while Plant Factory can be used, for non-commercial applications (such as Trainz), without having to pay a fee. You can certainly create realistic looking trees in Blender but the Plant Factory program makes this much easier, plus it provides other benefits. Plant Factory has only been available for Trainz since the troubled SP6 release so it will take time before more developers get on board.

The Living Railroad feature will, I believe, be a benefit to those who want to create sessions with moving trains but do not want to spend the time programming (and debugging) Session Rules and the AI. Passenger trains will require some sort of timetabling feature to be added as passenger services tend to run on fixed schedules over fixed routes. Unlike freight services which run on an "on demand" system that requires a product, a producer, a consumer and available rolling stock.
 
When I ran with script debugging on, the biggest culprit I had were some old boxcars with a chameleon type script used to change weathering to some non-existent textures. When I deleted those boxcars, the session performance increased and the errors went away. The performance wasn't perfect but it was a lot better than before and I kept checking around.

With this really huge route, I found more culprits, although they didn't show any errors. These were some really old, and I mean really, really old hoppers and boxcars from before TRS2004. These freight cars were used as static objects on a siding, but had some kind of corruption. After removing these, the performance increased substantially in this built-up area.

I noticed that some trains literally sucked the performance out of Driver when they were sent out of portals. Since I prebuilt, these consists, I checked the freight cars and interestingly, there's a bunch there by a well-known author that are in need of some updating. When zoomed out, they disappear and then pop in. I had seen this as far back as TRS19 and didn't think about it, and saw that issue back then.

Popping into place isn't the only issue. The textures tend to glow in the dark, literally, and stand out when placed adjacent freight cars created by others. Removing these freight cars and replacing them with something similar also improved performance. Rather than shame the author here, I will contact him privately and let him know what's occurring with his assets. Like the huge performance hit, I noticed the glowing freight cars back in T: ANE and didn't think anything about it. I thought this was caused by the new lighting system and texture requirements.

As Trainz has become more and more complex, I agree with N3V that we need to pay closer attention to the assets we use on our routes. The problem is while they are telling us, these assets are still available for use. If they are so concerned, why don't they remove all of these performance impacting assets from circulation including those that have been packaged. The problem is if they do that, then there won't be the plethora of content available to download, a selling point of Trainz and has been for years.
 
Flagging such assets in CM or Surveyor to highlight their inefficiency would be nice.
That kind of thing would be nice. There's already a system built in that reports errors and warnings, why can't they apply that to the assets in Content Manager. Color worst performers a different color than other assets would be helpful. In Surveyor, having a heat map, as I've mentioned before, to show where worst-performers are installed on the route would help greatly when searching for troublesome assets would be really helpful.
 
Back
Top