Long Island Railroad Severely Low Frame Rate

Discussion in 'Technical Reports' started by professorgenkixii, Feb 20, 2023.

  1. professorgenkixii

    professorgenkixii New Member

    Joined:
    Jun 16, 2020
    Messages:
    8
    Likes Received:
    14
    Hello All! I wanted to know if anyone else is experiencing Horrible Low Frame Rates on the LIRR Route that makes it Unplayable in most cases. I have a relatively High Spec PC:

    XFX Speedster QICK319 AMD Radeon RX 6700 12GB GDDR6
    AMD Ryzen 5 5600X 6 Core 12 Thread
    Corsair Vengeance RGB Pro 64GB (4x16GB) DDR4 3200
    ASUS ROG Strix B550-F Gaming AM4 Zen 3 ATX Motherboard.

    All My Other Routes which contain Mainly Metro North and Amtrak Routes all run very very smooth with no hiccups. Is Anyone Else experiencing this issue on Train Simulator Classic?
    Thank you for your Help in Advance!
     
    • Helpful Helpful x 1
  2. wellington

    wellington Guest

    Hello guy! We need buy a computer system of NASA for run Train Simulator: Long Island Rail Road: New York – Hicksville Route Add-On. I too have horrible low frame rates in this route, vast majority of people say the same too in Steam, check the comments. I'm going to debug this route to try and figure out what's causing this, but I can't guarantee anything.
     
    Last edited by a moderator: May 1, 2023
  3. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    The game is quite old and still runs on a single thread of your processor
    Having all the bells and whistles does not make a difference to TSC - at the moment.
    I can run TSC on my old Laptop which has built in graphics.

    The problem is the route not being optimised fully. And you have pointed out your other routes run OK.
    Have a look on RailWorks America as there will be more people looking in to a Solution.
     
  4. Pookeyhead

    Pookeyhead Well-Known Member

    Joined:
    Dec 7, 2018
    Messages:
    4,296
    Likes Received:
    2,699
    Are you using the experimental DX12 version? If you are... don't, it's broken. Use the standard 64bit version. As the other routes you mention are fine... probably not, but just to let you know... the DX12 version is not really working.
     
  5. wellington

    wellington Guest

    Last edited by a moderator: May 4, 2023
  6. wellington

    wellington Guest

    I love TSC 2023 because get good FPS on all routes. :o

    Left is TSC 2023 / Right is TSW 3
    (Long Island Rail Road: New York - Hicksville Route)

    [​IMG] [​IMG]

    The comparison is on the same stretch of Jamaica in both, where it requires more objects rendering.

    For those who like to watch TSC 2023 slides, it's right. :love:
     
    Last edited by a moderator: May 6, 2023
  7. 21c164fightercommand

    21c164fightercommand Well-Known Member

    Joined:
    Nov 6, 2021
    Messages:
    915
    Likes Received:
    901
    You might want to check this patch to the M7 EMU: https://www.trainsimcommunity.com/m...hes/i3231-lirr-m7-scripting-performance-patch

    I believe there also was a problem with too many lights casting shadows, which eats your FPS. Has this already been corrected in the latest update?
     
    Last edited: May 6, 2023
  8. wellington

    wellington Guest

    I'm able to simulate the scenarios for this route removing all Static and AI Trains, thus get better frame performance.

    Install process: Extract the LIRRNoAITrainsScenarios.zip file directly into the route path. (00000104-0000-0000-0000-000000002023).

    Uninstall process: Just remove the Scenarios folder directly into the route path. (00000104-0000-0000-0000-000000002023).

    Only the 7 career scenarios had all Static and AI trains removed.

    [01] Summer of Hell
    [02] Hempstead 7's
    [03] On the Clock [Part 1]
    [04] On the Clock [Part 2]
    [05] Brooklyn Baller
    [06] Too Early for Work
    [07] Saturday Stakes

    Although, I realize that there are still issues in the developer developed scenarios. Well, when I generate a new scenario, the frames go up to 50 frames and are stabilized, after adding a simple convoy it drops to around 40 frames..
     

    Attached Files:

    Last edited by a moderator: May 18, 2023
  9. torfmeister

    torfmeister Guest

    It is interesting to see what a fantastic and detailed, yeah flawless, route and stock Just Trains / UrbanTrainSim pulled off with the Frankfurt U-Bahn, one of the absolute top german DLC. This runs at (capped) steady 60 FPS. Detailed and optimized - showing what TSC is capable off.

    LIRR and its stock really really needs an overhaul.
     
    • Like Like x 1
  10. torfmeister

    torfmeister Guest

    Another fine example is JustTrains' Metropolitan Line, I just love it.

    What they did to make sure it runs well (and it surely does on my system) is to make separate script-free (or reduced) and less interiour detailed stock for the AI.

    You have separate

    S7+1Stock, S7+1StockAI, S8Stock, S8StockAI assets.

    That's just how to do it.

    I might go and duplicate the M7/M3 as AI versions, stripping off the scripts from their blueprints, remove unessential child objects and see what happens. (Also removed the passenger lights shadow cast flag, which is multiple light sources per car). It's not going to work probably as I cannot reduce the script itself (.out) - so probably all lights will be on or off and other strange stuff occurring, but worth a try anyway.

    cActUsjUiCe Hi, as you've been involved in the route making (not in the rolling stock afaik though, was it Reppo?), what do you think of the idea? Having the source files it surely wouldn't take more than an afternoon to reduce the standard stock to stripped down AI versions?

    Love the LIRR, but it's still struggling on my new system.
     
    Last edited by a moderator: Jun 15, 2023
  11. wellington

    wellington Guest

    I did this for the static and AI LIRR M7/M3 trains, if remove the scripts they all turn on all the lights and make the fraps even lown so have to remove the lights, but it's tedious to see them run without the lights, so I was trying to break the scrpit.out source code to be able to turn on only the front and rear lights, Dovetail Games could cooperate and release the script in .lua format.

    One of the script files I even converted to .lua format, the other one has many functions to translate from disassembly to .lua script, it would be much faster if Dovetail Games released it in .lua format for someone who likes to do optimization on its own.
    https://forums.dovetailgames.com/threads/tsc-it’s-train-time-on-long-island.56544/page-2#post-662217

    First of all for performance testing I also tested it without all static and AI trains, oh the result is amazing. In attached are the files.
    https://forums.dovetailgames.com/threads/tsc-it’s-train-time-on-long-island.56544/#post-654800

    For testing, I also changed my train to Class 375, included static and AI too, the result is excellent.
    https://forums.dovetailgames.com/threads/tsc-it’s-train-time-on-long-island.56544/#post-656077
     
  12. torfmeister

    torfmeister Guest

    Yes, same idea. Though I don't wanna see 375s on LIRR :D

    One thing that could be done - remove all light child objects in the AI designated engine blueprints except for the headlights? You would lose the taillights, but better than nothing until an official update comes out.

    And do set the "CastShadow" flag (bottom of blueprint) to zero for DTG\LIRR\RailVehicles\Electric\M7LIRR\Lights\PointPassViewLight.bin - this light source has 6 instances for each coach, making it 60 for a 10-car train, each needing constant shadow calculation by default. It's not realistic anyway as all these light sources are behind a diffusor in RL, never casting harsh shadows. And TS cannot cast soft, diffuse shadows. So turn them off.
     
    Last edited by a moderator: Jun 16, 2023
  13. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    A question regarding the lights
    What happens to the Frame Rates if "light Flares" are switched off in the Settings box?

    I have found poor frame rates on my computer with light flares enabled on UK and European Stock
     
  14. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    Biggest issue with that Peter is there is no "lit" light texture behind the flares, so if the headlight flares are off all lights (tail too) look as if they are off, this would obviously be the same for all the ai too.

    As for answering your question directly I'll do a comparison later when I'm on my PC.
     
  15. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    Vanilla install (only Steam DLC's and no RWE2 or Re-Shade or AP) maxed out settings I was getting 14 ~ 16 fps at New York Penn with ai coming and going with Headlight Flares ON
    On the same settings other than Headlight Flares OFF I was getting 18 ~ 20 fps same QD scenario
     
  16. ctlee#2068

    ctlee#2068 Active Member

    Joined:
    Feb 21, 2023
    Messages:
    184
    Likes Received:
    127
    Reducing Graphics Settings especially View Distance, can increase some FPS.
    Too low FPS is really bad.
     
  17. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    A shame the builders of the models use Light Flares and don't give the end user, Us, an option to have normal lights.
    Some models have been spoilt by Light Flares - The Class 76 in Woodhead in Blue and the OBB 1144 from Skyhook come to mind
     
    • Like Like x 2
  18. torfmeister

    torfmeister Guest

    Depends how the dev uses the Flares. If correctly used, it just disables the 3 circular transparent lens flare images. If incorrectly used, the lamp appears to be off when Flares are disabled. A light source itself is not visible, only its beam or sphere (spot or point light source). That's why it needs a bright texture that some devs deliver with the flares unfortunately (as there is many ways to achieve something in TSC...)
     
    Last edited by a moderator: Jun 20, 2023
  19. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    Skyhook on the left and RWA on the right - the lights are lit on both locos
    Skyhook & RWA 1144.jpg
     
  20. torfmeister

    torfmeister Guest

    RWAustria model is correctly done, Skyhook's not. By disabling Headlight Flares, you should only get rid of the lens flare effect - not the lamp light.

    I have Headlight Flares always on. Note that you can get rid of the lens flares by editing the light blueprint.
     
    Last edited by a moderator: Jun 20, 2023
  21. MAX1319

    MAX1319 Well-Known Member

    Joined:
    Jan 19, 2022
    Messages:
    2,524
    Likes Received:
    3,791
    I found out by mistake. i had to change my hardrive so i had to re-download everthing, So I didn't check the box for flare's But i did notice a huge improvement on fps which I was getting 40 FPS compare to 16 before.
     
  22. wellington

    wellington Guest

    This is because the RWA-OBB1144 has an extra spotlight texture named headlight.TgPcDx within the engine structure, in addition to the flare and lens flare texture files. The SHG-OBB1144 does not have this extra spotlight texture, because the spotlight is already the flare_nm.TgPcDx and lensflare_nm.TgPcDx textures, so everything is disabled when unchecking the headlight flares in options menu.

    The LIRR-M7 is the same as the SHG-OBB1144.
     
  23. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    If the Light Blueprint was edited would I have have the lights On the SHG locos with Lens Flare off or did I misunderstand?
     
  24. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    I guess not. As you would need to edit the loco model itself. Those extra headlight textures are applied to light nodes created during 3d modeling. If loco does not have it, you won't see the lights lit when switched on. It simply missing.
     
  25. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    I would not notice a difference as without having Light Flares switched on I don't see them anyway.
     
  26. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    749006 Short answer to your question is that you misunderstood it... :)
     
  27. wellington

    wellington Guest

    Exactly, one example is RWA's OEBB 1144 locomotive, which has its extra spotiligh texture embedded in its 3D model as the headlight.TgPcDx file is loaded into the geometry information file OEBB_1144.GeoPcDx.

    Locomotives that have this lighting format with extra spotiligh texture have better fraps with a lot of presence of the same locomotive on the route, mainly when disabling the headlight flares in options menu.

    There is a way to turn off headlight flares in the locomotives that don't have the extra texture of the spotlight and keep the lighting, but the fraps improve little yet, I'm trying to find out if it's possible to add the extra texture of the spotlight for these cases, like the M7 of the LIRR route.
     
  28. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    Maybe there is a way by adding "light" children that will contain an object with headlight texture mapped and correctly placed. Of course, with proper naming, otherwise it will need a script work which is not possible due to .out format.
     
    Last edited: Jun 25, 2023
  29. wellington

    wellington Guest

    In addition to the flares and lens flares that cause low fraps, there is something broken in the lua script file that also cause low fraps. I was even thinking about translating the .out of the disassemble, but it has many functions to translate, I even converted one of the .out with little information.
    https://forums.dovetailgames.com/threads/tsc-it’s-train-time-on-long-island.56544/page-2#post-661982
    https://forums.dovetailgames.com/threads/tsc-it’s-train-time-on-long-island.56544/page-2#post-662217
     
  30. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    Ok sorry, it keeps doing my head in and I keep saying nothing...

    I can no longer say nothing..

    FPS = Frames Per Second (also used for First Person Shooter but meh, kids..)

    Fraps = Video capture and benchmarking software ---> Image5.jpg

    Ok I've said it, you'll ignore it but I feel better for saying it nonetheless. Carry on.
     
  31. torfmeister

    torfmeister Guest

    On my system the difference is not that big, but noticeable (example Hempstead 7's scenario start, camera 2 with full train in view: Flares on: 48 FPS, Off: 52 FPS)

    But clearly the headlights are done wrong, because toggling Headlight Flares should only remove the Lens Flare texture, and the actual light texture should be part of the model itself, and I do suspect the model has too many polys as the same model shape from TSW has been used it seems.

    Most routes run between 120 and 260 FPS when I uncap the limit, there's deffo something wrong with the M7/M3 - also the heavy cab display flickering.

    We'll likely not be seeing any more fixes as the subcontractor who made the loco can't be held accountable after QA gives the OK for release - and there already has been a patch (script and some but not all M7 light shadow cast flags set to zero). Rest is good will. But as there's hardly anyone from our ever absent Community Managers looking in here unless there's quarrels again, I don't think this is on DTG's ToDo list. I can live with it.

    2.png
     
    Last edited by a moderator: Jun 26, 2023
  32. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    Definitely must be, otherwise there wouldn´t be such fps drop, if it would be only about missing light nodes. Such thing happens when somebody is constantly calling API calls in one Update tick, instead of store the value locally (or globally if needed) and work with that for one Update tick time being, or maybe some indefinite math count loop... who knows. Compiled source code give us no room for further discussion, we can only conspirate.
     
  33. wellington

    wellington Guest

    Nothing difficult, I programmed a DLL and loaded it in the RailWorks.exe process through the D3D9 (DrawIndexedPrimitive or EndScene) hook, I didn't need to change anything in the original files and all the locomotives now work correctly in terms of lights (low and high), flares and lens flares. I can also disable the Headlight Flares in menu options without losing the main flares. Wellington Wins! Fatality!

    Screenshot_Long Island Rail Road_40.76651--73.53123_21-00-09.jpg

    Screenshot_Long Island Rail Road_40.76651--73.53123_21-00-20.jpg

    Screenshot_Long Island Rail Road_40.76655--73.53112_21-01-16.jpg

    Screenshot_Long Island Rail Road_40.76655--73.53112_21-01-46.jpg

    In conclusion, can be adjusted directly in the core game, locomotive developers don't have to worry about their way of creating.
     
    Last edited by a moderator: Jun 29, 2023
    • Like Like x 2
  34. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    Is this patch going to be released?
    And what Fatality!?
     
  35. Reef

    Reef Well-Known Member

    Joined:
    Jul 27, 2018
    Messages:
    2,806
    Likes Received:
    1,817
    I hope so too

    It's a reference to Mortal Kombat, a game so old now (first release was in 1992) I'd have thought even you'd have heard of it Peter ;)
    In other words Piss poor scripting /model integration = 0 welly boot = 1
     
    Last edited: Jun 30, 2023
  36. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    wellington I remember... There was also a Babality :D Btw, perfect job you´ve done with those lights. Keep up.
     
    • Like Like x 1
  37. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    Never played a Shoot em up game or anything like that

    Having worked for two years in Signalboxs I first had Sim-Sig signalling games
    The first one ran from a command prompt with a pop-up screen and the track plan on it.

    From there to Trainz 2006 - 2009 and then Railworks3/TS2012
     
  38. wellington

    wellington Guest

    Hmm.. I can think, but my DLL has already turned into a debugger with functions, I even added today a tentative script interpreter. The most correct would be for the developer to apply the same logic in core game, what I did was not difficult.

    Thanks! Babality well remembered, my brother used to do this about me just to see my baby fighters, new versions of Mortal Kombat are powered by Unreal Engine 3, although I don't play like before, but sometimes I disassemble Mortal Kombat X and 11 for computer for modeling changes. This year they will reboot, Mortal Kombat 1 with Unreal Engine 4.

    I used the term Fatality, because around here programmers use the same term when they discover a solution. Don't be alarmed if I start decompiling scripts compileds to .out.
     
    • Like Like x 1
  39. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,072
    Likes Received:
    3,142
    I don't see the Developers updating their work for anything released thru Steam - lots of things awaiting a fix

    And the patch might not difficult to the people who understand how it and the lights work.
     
  40. kiski

    kiski Member

    Joined:
    Apr 27, 2018
    Messages:
    92
    Likes Received:
    58
    Looking forward. Not that I need that, but some script constructions would be nice to see.

    Btw, what kind of debugging you are able to do with that DLL stuff of yours?? Would be nice to try that, if it can provide more or other infos that standard LogMate.
     

Share This Page