.
Results 1 to 13 of 13

Thread: Can slow assets cause jerk jerk jerk camera movement in Surveyor?

  1. #1
    Join Date
    Dec 2018
    Location
    United States of America
    Posts
    465
     

    Default Can slow assets cause jerk jerk jerk camera movement in Surveyor?

    For all you asset gurus/junkies out there...

    My particular install of TRS19+ 106618 enters a kind of jerk jerk jerk mode when I Edit Route BCSJ-555-RHR. The jerks occur when moving around in Surveyor with Surveyor lurching from one camera position to the next at about 2 or 3 lurches per second.

    However the framerate (as reported by profiler) shows between 25 and 30 frames per second. Clearly there is something happening that causes the camera movement code to take waaay more time than it should.
    Even more strange, the jerk jerk jerk behavior disappears for me when I switch (ctrl-F2) to Driver and remains gone if I return to Surveyor (ctrl-F1).

    Could this be a result of an asset with a script that uses an uninitialized global variable (do such things exist in Trainz???) Once in Driver the variable gets initialized to a useful value, which it retains when switched back to Surveyor? Pure conjecture.

    I went back into history looking for a version of the BC&SJ that did not exhibit the jerk jerk jerk I see in Surveyor when I Edit Route BCSJ-555-RHR.

    Version BCSJ-493 (not publicly released) did not exhibit the jerk jerk jerk syndrome. So I dumped recursive dependencies of the two route versions into text files then compared them looking for differences in assets that might show a possible culprit.

    Problem is, I don't know squat about assets and which ones are naughty and which ones are nice.

    I uploaded the output of the diff command to the web and if you're interested you can take a look at it.

    The command syntax for the diff command:

    diff BCSJ-493-DEPENDENCIES-RECURSIVE.txt BCSJ-555-RHR-DEPENDENCIES-RECURSIVE.txt > 555-493-differences.txt

    Download/examine the differences file here:

    555-493-differences.txt (at 65000 chars it's too long for a forum post... grrrr)


    Do any of these assets ring a bell, as in they have attached scripts which are extremely slow and buggy, enough so that they could cause TRS19+ 106618 to take 1/3 second or so to process each camera movement?

    Inquiring minds want to know,

    I've filed ticket EZD-746-44219 for this behavior,

    Horace Fithers

  2. #2

    Default

    G'day Horace,

    Yes, I've had that issue too on routes other than your BC&SJ.

    I honestly can't remember for sure, but I *think* it may have gone away after I got the Trainz Plus subscription with unified driver / surveyor? (I used to have to go into "quick drive" then out again to (usually) fix it).

    The only other thing I might suggest is, perhaps try changing the track on your route to a built-in TRS19 equivalent and see how that goes? I have had frame-rate issues with routes or sections of routes using similar types of track that you've used as well and, if it wasn't the change to Trainz Plus that fixed it then it might have been that I swapped the track for another type around the same time.

    Cheers,
    Piere.

  3. #3
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    27,528
     

    Default

    When I reviewed the route and accompanying session, I had no issues with the route its self, but did have awful stutters in the session. There's something there that's faulty. Physically the model maybe okay, but there could be a script issue, a particular freight car with too many commodities, and so on.

    The question is what was added recently to cause that because that wasn't a problem in previous versions.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 106618

  4. #4
    Join Date
    Nov 2006
    Location
    United States of America, Colorado, Colorado Springs
    Posts
    859
     

    Default

    Now that we have async, it is hard to say (IMHO) what exactly is and is not loaded. Who knows if a small change in view causes different parts of the route to be loaded? I suggest this could likely only be traced with a logic analyzer that indicates where the code is spending its time during the stutters.
    Last edited by pitkin; May 19th, 2020 at 12:14 AM.
    I7-8700K
    1070Ti
    Z370
    PCIe SSD operation ( build)

  5. #5

    Default

    Just an update for completeness, I have just loaded my mega-merged route in TRS19 for the first time in ages (which doesn't have your BC&SJ on it yet) and I've still got the same problem in surveyor of very slow refresh rates, leading to very, very jerky movement whenever I try to move, even a little. Even the asset previews in the menu tabs are jerky in their movement too.

    If I go into driver, it's all nice and smooth but stays the same (jerky) when I go back to surveyor.

    I haven't had this when I've been working on other stuff more recently, just when I've opened this one so far.

    No idea what it is.

    Cheers,
    Piere.

  6. #6
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    27,528
     

    Default

    Quote Originally Posted by Piere View Post
    Just an update for completeness, I have just loaded my mega-merged route in TRS19 for the first time in ages (which doesn't have your BC&SJ on it yet) and I've still got the same problem in surveyor of very slow refresh rates, leading to very, very jerky movement whenever I try to move, even a little. Even the asset previews in the menu tabs are jerky in their movement too.

    If I go into driver, it's all nice and smooth but stays the same (jerky) when I go back to surveyor.

    I haven't had this when I've been working on other stuff more recently, just when I've opened this one so far.

    No idea what it is.

    Cheers,
    Piere.
    That could be caching taking place. I noticed that when I've loaded a route for the first time in a long time that things are slow as this particular route's dependencies are loaded in, and even scrolling and moving around it's a bit jerky. Once things have settled down, later times things are better.

    During this loading time, I checked the logs, using show-logs on the developer menu item on the Launcher, and saw asset validation taking place. While the assets are validating, there's a faint message, sometimes white on white, showing caching and compiling scripts, at the top of the screen in Surveyor and Driver.
    Last edited by JCitron; May 29th, 2020 at 09:05 AM.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 106618

  7. #7
    Join Date
    Nov 2008
    Location
    Crewe, Cheshire, UK
    Posts
    16,093
     

    Default

    And to add just seen compiling Shaders appear on the screen as well.

    I think running the TrainzUtil prebuild command would solve a lot of this, it does for me.
    Last edited by clam1952; May 29th, 2020 at 10:49 AM.
    Malc


  8. #8
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    27,528
     

    Default

    Quote Originally Posted by clam1952 View Post
    And too add just seen compiling Shaders appear on the screen as well.

    I think running the TrainzUtil prebuild command would solve a lot of this, it does for me.
    Yeah that too. I keep forgetting to run that after updates and database repairs. There should be a button for it to make it easy for those with less technical skills. In my case, I'll create a PowerShell script and be done with it.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 106618

  9. #9

    Default

    I have found that at every stall it stops at the same message, the driver and consist may be different in each case but the general message is the same. This was from show logs while in driver.

    DriverCharacterScheduleThread> Driver GameObjectID(6:100[0,0]}(Andy) finished running schedule on train GameObjectID(2:11[0,0]Consist_16}

  10. #10

    Default

    Thanks for the info and suggestions. Although I'm certain that I've had a lot of times where it shows pre-caching at the top of the screen while loading stuff that have still been normal and smooth. Also, if it was that, wouldn't it still be jerky when I switched to driver mode (which it isn't)? And it gets jerky again if I go back to surveyor.

    Not to worry, I realise that there are just so many variables involved that it's not likely to work out what it is, and it's not a show-stopper.

    What is this "prebuild command" though? How do I run that?

    Cheers,
    Piere.

  11. #11
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    27,528
     

    Default

    Quote Originally Posted by Piere View Post
    Thanks for the info and suggestions. Although I'm certain that I've had a lot of times where it shows pre-caching at the top of the screen while loading stuff that have still been normal and smooth. Also, if it was that, wouldn't it still be jerky when I switched to driver mode (which it isn't)? And it gets jerky again if I go back to surveyor.

    Not to worry, I realise that there are just so many variables involved that it's not likely to work out what it is, and it's not a show-stopper.

    What is this "prebuild command" though? How do I run that?

    Cheers,
    Piere.
    You are correct there are many, many possible variables that can cause jerky movements. What Malc and I mentioned are the things we have experience with. It could be older scripts, a network validation of assets going on, menus loading and assets caching, etc. I have seen some of these other things occur from time to time.

    Anyway on your prebuild command.
    Make sure you have advanced developer options enabled - In the Trainz Settings on the Launcher, go to the dev tab and check that box.

    Under the Developer menu item (across the top), you'll see Run Trainzutil Command...

    Open that up and type prebuild (without the period). There are other options, but this should work fine.

    Note: This can "take some time", depending upon how much content you have installed. I recommend running this overnight and let it do its thing while you sleep.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 106618

  12. #12

    Default

    Quote Originally Posted by JCitron View Post
    Anyway on your prebuild command.
    Make sure you have advanced developer options enabled - In the Trainz Settings on the Launcher, go to the dev tab and check that box.

    Under the Developer menu item (across the top), you'll see Run Trainzutil Command...

    Open that up and type prebuild (without the period). There are other options, but this should work fine.

    Note: This can "take some time", depending upon how much content you have installed. I recommend running this overnight and let it do its thing while you sleep.
    Thanks for that info.

    What does it do? Should it be done any time before I plan to play the game or only after particular events like database rebuilds?

    Thanks again for the help.

    Cheers,
    Piere.

  13. #13
    Join Date
    Nov 2006
    Location
    United States of America, Massachusetts, Haverhill
    Posts
    27,528
     

    Default

    Quote Originally Posted by Piere View Post
    Thanks for that info.

    What does it do? Should it be done any time before I plan to play the game or only after particular events like database rebuilds?

    Thanks again for the help.

    Cheers,
    Piere.
    What it does is help speed up the loading of content by building a quick-reference table for the database to read because the database doesn't have to load up the content-indices when everything is first loaded.

    You only want to run this after you've upgraded from a previous service pack, or if you've run an EDR. Once run it's not necessary to do this every time.

    I find too that having a nicely defragmented hard drive if you have a regular hard disk. I do that daily if I'm Trainzing a lot due to the amount of data that's read, opened, closed, and moved.

    You're welcome, I'm glad I could help.
    John
    Trainz User Since: 12-2003
    Trainz User ID: 124863
    T:ANE Build: 94829
    TRS2019/Trainz-PLUS: 106618

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •