Author Topic: GSX Level 2 - Stutters with pax animation [SOLVED]  (Read 8539 times)

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51443
    • VIRTUALI Sagl
Re: GSX Level 2 - Stutters with pax animation
« Reply #15 on: October 11, 2018, 10:47:21 pm »
I know by experience it doesn't necessarily mean it's GSX itself however, but here I really have explored everything that came to my mind.

You might try enabling the Simconnect diagnostic mode, and see if there's something causing errors.

Open notepad, and copy the following text:


[SimConnect]
level=errors
console=1
RedirectStdOutToConsole=1
OutputDebugString=1

file=c:\simconnect%03u.txt
file_next_index=0
file_max_index=9


Save the file as SIMCONNECT.INI in this folder:

Documents And Settings\YOUR LOGIN NAME\Documents\Prepar3d v4 Files

At the next P3D launch, you should see a text window with diagnostic message, and a file named simconnect000.txt will be created on C:\

Note that, you might not be able to have access to C:\ so, change the destination folder to your liking by changing the file= line.

kmax59

  • Newbie
  • *
  • Posts: 26
Re: GSX Level 2 - Stutters with pax animation
« Reply #16 on: October 11, 2018, 11:23:31 pm »
Thanks Umberto,

I didn't remember about this.

So I tried and the real time log just says it can't get the VR path registry but that sounds normal as I don't use VR. It also checks for as_connect_64.dll and it detect activeskyrunning: 1 (even if Active sky is not started but it may be as connect and not active sky itself).
After that "the Pipe is not connected", quickly followed by "Pipe connected" and then "waiting for incoming message" an nothing else until I close P3D.

Other than that it doesn't say much and the result of the simconnect002.txt only tells :

0.00000 SimConnect version 4.3.0.0

I tried with and without my other programs which are known to use simconnect and the results are the same.

kmax59

  • Newbie
  • *
  • Posts: 26
Re: GSX Level 2 - Stutters with pax animation
« Reply #17 on: October 12, 2018, 12:02:50 am »
I think I'm finally on something, it may be related to simobjects and the order in which P3D is loading the different addon packages.
Please read my entire explanation as it's something I really experimented in the past and I know that I really know what I'm talking about here, if you're not aware of this yet, may be there's a room for improvement for you :) may be not but it may be worth checking deeper.

I had this idea as I remember how I considerably reduced the stutters in FS2004 some years ago when creating my own personnal AI Traffic:

I actually realized at that time that FS9 was searching the called aircraft title in all available aircraft.cfg until it finds the one it was searching for. However it was analyzing all aircraft folders starting by folders beginning by the letter "A" and was continuing by alphabetic order until it was finding the right aircraft title, then it started the loop again for the next ai aircraft called by the simulator.
The problem was if your AI aircraft folders were beginning by the letter "Z" for example, it was really far in the list and FS2004 had to analyze all folders that were coming first in the alphabetic order, in addition to this, if the specific title searched by FS2004 was [Fltsim.148], it had to read 148 entries before finally reading the good entry. I let you imagine how many aircraft it had to check before finding the right aircraft. As the loop was starting over and over again for each ai traffic the sim was calling, FS2004 was starting to really struggle when you had many aircraft addon and/or repaints and I remember it really became stuttery at one point, even if I had really good fps.
When I discovered this, I renamed all my Ai traffic folders by adding "AAA_" at the beginning of each folder name to make sure it was on top of the list, after that stutters were incredibly reduced.

Until now, I thought P3D had optimized this as it uses different simobjects folders for aircraft, animals, boats etc... and I never met the issue in P3D or at least not as much as in FS2004.
However I had the idea to check the position of the Addon manager package in the list created by LORBY-SI addon organizer: the Addon Manager package was actually listed at the bottom of the list, so it was under UTlive, my AI boat traffic, Tongass Fjords Traffic and Return to misty moorings traffic; and that makes quite a lot of simobjects to read first if P3D still uses the same logic.

I had the idea to move the addon manager package at the top of the list... Guess what?  :o
Stutters have been incredibly reduced, it didn't disappeared completely or as much as I've been able to do earlier today for some reason but still, it's much much less visible and it really doesn't look like a real pause anymore.
I looked at some screenshots of my addon packages settings in LORBY-SI that I took before my clean install and the addon manager package was almost at the top of the list, which may explain why I never noticed such stutters before.

Now, using this order may also create more stutters when it comes to load ai aircraft because GSX simobjects now have the priority over them, and this forces P3D to read all FSDT simobjects first before it finds a UT live aircraft. That's really possible because I remember seeing more micro-stutters in flights before my clean install, now I understand it may be linked to the install of GSX level 2.
That said, putting UTlive package under the addon manager package doesn't seem to bring huge stutters like the one generated by GSX when it's under UTlive, may be simply because you have less simobjects that UT2 has. That's definitely the first time it ever happens to me in P3D, especially at such a high level of stuttering.

I couldn't resist testing this finding using process monitor and I can confirm what I'm saying above: I clearly see P3D is analyzing all other simobjects that are registered above the GSX simobjects in the list. Meaning that for each passengers, it is analyzing all UT live aircraft first, as well as all AI shipping boats... Even with a fast CPU and SSD, P3D cannot handle so many files in less that 1 second and create a stutter during the time it's analyzing all the objects it finds.
It sounds quite unbelievable that P3D v4 still works kind of the same way as FS9 was but I think that's the only conclusion I can make about this test. The only difference is that you can simply re-order add-on packages instead of renaming objects folders, but P3D seems to still use the same logic when it comes to simobjects, and simobjects type probably aren't separated from each other in this logic.
As for why I've been able to eliminate the stutters earlier today without doing this, it's still a mistery... May be P3D is more clever than FS2004 and memorize the location of each simobjects so it can load it faster the 2nd time?

We can conclude it's not directly the fault of GSX but P3D's fault about how it handles the simobjects loading, that said may be there's some room for improvement.
May be you could force P3D to search the simobject in your own Addon manager folder when it comes to generate GSX objects instead of searching in all registered simobjects.
Also, P3D still searches for simobjects by alphabetic order inside each add-on package; as your passengers folders are named like "FSDT_Passenger_XXX", P3D has to load "baggage loader", "baggage tractor", "catering" "jetway" before finding the first passengers. In order to reduce the stutters when loading passengers it may be worth to name the folders something like "FSDT_A_Passengers" and re-order all folders by alphabetic order depending on which of your simobjects are called the most often, folders starting by A being the most often called by the sim, Z being the less often called.
You could also create a separate simobject package for passengers, it would be at the top of the list of the addons packages. The other objects like jetways etc are called much less often and could have their own simobject package that the user could put under Ai traffic package so it doesn't slow down UTlive or similar addons. Doing this could actually bring some customization options to advanced users, while "basic" users would simply leave the default values and it shouldn't hurt.
There are many things that can be done to improve/optimize the loading of simobjects if you really have to let this task to the P3D core. I hope there is some room for improvement for you :)

Hope this analyze will help you, and other users !
Other than that, I think I never had the opportunity to tell you how much I enjoy your products, it's probably the right time  ;)
« Last Edit: October 12, 2018, 01:04:36 am by kmax59 »

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51443
    • VIRTUALI Sagl
Re: GSX Level 2 - Stutters with pax animation
« Reply #18 on: October 12, 2018, 11:03:20 am »
I don't think renaming folders or making a separate addon for Passenger is a smart thing to do.

Once other developers will realize this, it will start a race which will look like the last pages of a newspaper, filled with stuff like "AAAA_good_apartment_to_rent",etc...

I'll try to ask LM if there's a way around this.
« Last Edit: October 12, 2018, 01:10:06 pm by virtuali »

kmax59

  • Newbie
  • *
  • Posts: 26
Re: GSX Level 2 - Stutters with pax animation
« Reply #19 on: October 12, 2018, 11:35:35 am »
I see what you mean  ;D

That said it seems the addon package position has priority over the folders names, so renaming folders would only change the priority inside a single package. As an example renaming your passenger simobjects folders would only change their priority over your other own simobjects like the catering etc. The order compared to other developers simobjects seems to be determined only by the position of the addon package.
If all developers rename their folder the same way, it would only change the priority inside their own package anyways, as an example the read order between UTlive and FSDT simobjects can only be changed by changing the order of the packages.

Asking LM is the best idea for now I guess, but I also bet this would be a huge rework on their side so I doubt we can see any improvement on this on a close future.

Thanks for your great support, it wasn't GSX but you didn't leave me with my issue until I found the reason :)

honanhal

  • Newbie
  • *
  • Posts: 18
Re: GSX Level 2 - Stutters with pax animation [SOLVED]
« Reply #20 on: December 07, 2018, 04:45:31 am »
Umberto, any news on whether Lockheed has a way to work around this? I'm also getting this stutter, presumably for the same reason (I use a lot of AI traffic and models) and would love to find a solution.

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 51443
    • VIRTUALI Sagl
Re: GSX Level 2 - Stutters with pax animation [SOLVED]
« Reply #21 on: December 07, 2018, 01:03:01 pm »
I'm sorry but, with all the big changes in letting PBR to happen (on LM's side) and us helping testing it (and learn to use it), this hasn't been discussed a lot. Yes, they are aware of it, but the new release was just too much new stuff to check for.

We might be able to reduce the number of Simobjects on our side, at least when introducing new P3D4-only objects, since we might use the same method used for jetway numbers (DirectX rendering) to create repaints, instead of doing real repaints. This would cut down the number of Simobjects installed quite a bit.

But we'll have to experiment it first, and it wouldn't be so effective until we could redo all the objects for P3D4, which is now finally worth it, since we could increase their visual quality a lot with PBR.

honanhal

  • Newbie
  • *
  • Posts: 18
Re: GSX Level 2 - Stutters with pax animation [SOLVED]
« Reply #22 on: December 10, 2018, 04:37:29 am »
Thanks, Umberto. Understood.