Elvas Tower: Low Framerate Due to Precipitation at Activity Start - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Low Framerate Due to Precipitation at Activity Start Rate Topic: -----

#1 User is offline   pschlik 

  • Conductor
  • Group: Status: Active Member
  • Posts: 350
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 24 March 2024 - 01:35 PM

Whenever I start any activity with precipitation, for the first few seconds of the activity I get awful framerates unless the sim is paused. Once the initial set of precipitation particles hit the ground and are destroyed, the framerate recovers to something sensible. It seems to me that far too many precipitation particles are being spawned at the start of an activity, more than would be allowed normally, and this causes that temporary adverse effect on performance. This problem is not new at all, but I'm finding this drop in FPS is enough to force the adhesion model to use the old code, rather than the new Polach model (and then there's no way to change back to Polach, making it impossible to test how Polach behaves in rain/snow).

Looking at the debug output, the frametime plot clearly shows the moment where I unpaused the sim and the moment where enough snow particles had despawned to return to normal. Curiously, in this time none of the threads are overloaded, and the thread busy time actually decreases. This seems to indicate there's severe inefficiency in the way precipitation is handled.
https://i.imgur.com/PeHN7bL.png

This issue is independent of simulation speed. In fact, lower simulation speed results in a longer (real time) period of lag as it takes longer for the precipitation to reach the ground and despawn. Manually forcing extreme levels of precipitation with Alt + - keybind also hurts performance, but this is consistent rather than temporary.


This might not happen with different precipitation box settings (I recall setting my box quite large to make precipitation look better), but those settings are no longer in the options menu so it's not so easy to experiment with changing that. In any case, the performance impact of precipitation should not change this dramatically. Id appreciate if anyone could look into this

#2 User is online   ExRail 

  • Fireman
  • Group: Status: Active Member
  • Posts: 169
  • Joined: 31-December 21
  • Gender:Male
  • Simulator:ORNYMG
  • Country:

Posted 25 March 2024 - 05:34 PM

View Postpschlik, on 24 March 2024 - 01:35 PM, said:

Whenever I start any activity with precipitation, for the first few seconds of the activity I get awful framerates unless the sim is paused. Once the initial set of precipitation particles hit the ground and are destroyed, the framerate recovers to something sensible.


I know what you are referring too and have experiences it many times, but it seams like it's no longer accruing in Unstable or ORNYMG,

I was surprised to see the default particle count was only 0.050 with a max of 0.350,
for every time I started Snow or Rain there was initially a huge bunch, that then dropped to nothing and then I had to use the debug keys to brig it back.

I'm now running ORYNMG with a max of 0.950 and a Snow/rain particle count of 0.350 and Zero problems on my developer machine an I3-34xx 8Gb DDR3 1600 GTX750ti 2GB.
Default ORYNMG particle box size 100H 1000x1000 witch it's in the menu under ORNYMG only

Time is used in the particle functions so it get called with some time has past and it's not been called since initialization so it's trying to compensate by throwing a huge bunch in at the beginning or something related
I'm having the exact same thing/problem in my SFML Thor particle systems with also uses time.
But if you don't use time you might get particle oscillation or something, I remember having to compensate in my own rain system witch don't use time in some way to avoid it when pausing it in some way, as loading resources does.

The app I posted in Diesel smoke does it very visually if you pause it by clicking and holding the mouse on the title bar:
Attached Image: Time_Particle.jpg

Solution right now, it properly to use ORYNMG.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users