Elvas Tower: Day/night textures memory usage - Elvas Tower

Jump to content

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

Day/night textures memory usage Rate Topic: -----

#1 User is offline   Blillpers 

  • Engineer
  • Group: Status: Active Member
  • Posts: 740
  • Joined: 28-January 12
  • Gender:Male
  • Location:Fagersta, Sweden or somewhere in Borawia
  • Simulator:OpenRails
  • Country:

Posted 06 March 2017 - 01:55 PM

Hello! This is a MAJOR request from the lot of us building Stockholmsrutten V4, we’re faced with difficulties regarding memory restraint due to XNA being a 32 bit system. OpenRails loads Day as well as Night textures at once, despite night textures not being needed during day time driving as per default. Albeit there being a setting in the OpenRails experimental tab, enabling OpenRails to only load night textures when needed, when driving during night time, the memory problem becomes residual as OpenRails loads both Day and Night textures. Can OpenRails be made to only load Night textures while driving during night time - and only load day textures where no night textures are present?In that way the memory usage will be equally large during the day as during the night, and will allow us to use considerably more textures in our efforts to build. In our case about 800 megabytes worth.We sincerely hope you will pass this on as memory is one of the major shortcomings of XNA due to it being a 32 bit system.Best regards from all three of usMikban, Wase and Bonan

#2 User is offline   Mike B 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,072
  • Joined: 18-January 13
  • Gender:Not Telling
  • Location:Pacific Time
  • Simulator:Mostly ORTS these days
  • Country:

Posted 06 March 2017 - 04:39 PM

See if this experimental option helps. In the OR menu, go to: Options>Experimental tab>checkbox "Load Night Textures Only When Needed." If it does help, you might have to specify that people use it when distributing the route unless OR has a way to set that automatically when loading the route.

I leave it on all the time. Doesn't seem to hurt normal operation. I haven't tried a route with enough textures to cause a memory problem yet, so I can't tell whether it helps or not.

Running LAA-anabled 32-bit software (which OR now defaults to) in 64-bit Windows gives it the full 4GB virtual address space available in normal Windows for 32-bit Win32 apps; are you trying to run it in 32-bit Windows, which normally only grants 2GB address spaces? I *have* seen memory usage of OR (in Windows Task Manager) getting close to 2GB with routes that have complex scenery.

#3 User is offline   Blillpers 

  • Engineer
  • Group: Status: Active Member
  • Posts: 740
  • Joined: 28-January 12
  • Gender:Male
  • Location:Fagersta, Sweden or somewhere in Borawia
  • Simulator:OpenRails
  • Country:

Posted 07 March 2017 - 02:32 AM

View PostMike B, on 06 March 2017 - 04:39 PM, said:

See if this experimental option helps. In the OR menu, go to: Options>Experimental tab>checkbox "Load Night Textures Only When Needed." If it does help, you might have to specify that people use it when distributing the route unless OR has a way to set that automatically when loading the route.

I leave it on all the time. Doesn't seem to hurt normal operation. I haven't tried a route with enough textures to cause a memory problem yet, so I can't tell whether it helps or not.

Running LAA-anabled 32-bit software (which OR now defaults to) in 64-bit Windows gives it the full 4GB virtual address space available in normal Windows for 32-bit Win32 apps; are you trying to run it in 32-bit Windows, which normally only grants 2GB address spaces? I *have* seen memory usage of OR (in Windows Task Manager) getting close to 2GB with routes that have complex scenery.



Thank you for your reply! We're aware of the function, as written. We know OpenRails Terminates at 3.471 GB of memory usage. To put it short, what we're looking for is a check box labeled "Load Day Textures Only When Needed." - To use with night time driving. Add to that, OpenRails should of course load day textures during night driving, if an object does not have night textures.

I sincerely hope the OpenRails development team will look into implementing this, as it will greatly decrease memory usage and enable us to use more night textures.

#4 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,027
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 March 2017 - 05:46 AM

When I generated the feature "Load Night Textures Only When Needed" I was aware that this would have big benefits for day-only activities and no benefits for night-only or day+night activities. However to simplify my development and considering that most of the activities run only at daytime I left it so.
The two cases left out by the moment require a different handling:
-night-only activities: only the night textures should be loaded; easier
-day and night activities: at dawn and sunset one set of textures must be loaded and the other one must be unloaded from memory; a bit more complicated.
If I have time I'll have a check on extending the actual feature; anyhow only an Option checkbox would remain, with name "Load Day/Night Textures Only When Needed".

#5 User is offline   Blillpers 

  • Engineer
  • Group: Status: Active Member
  • Posts: 740
  • Joined: 28-January 12
  • Gender:Male
  • Location:Fagersta, Sweden or somewhere in Borawia
  • Simulator:OpenRails
  • Country:

Posted 07 March 2017 - 06:12 AM

View PostCsantucci, on 07 March 2017 - 05:46 AM, said:

When I generated the feature "Load Night Textures Only When Needed" I was aware that this would have big benefits for day-only activities and no benefits for night-only or day+night activities. However to simplify my development and considering that most of the activities run only at daytime I left it so.
The two cases left out by the moment require a different handling:
-night-only activities: only the night textures should be loaded; easier
-day and night activities: at dawn and sunset one set of textures must be loaded and the other one must be unloaded from memory; a bit more complicated.
If I have time I'll have a check on extending the actual feature; anyhow only an Option checkbox would remain, with name "Load Day/Night Textures Only When Needed".


That sounds wonderful! We very much look forward to that! Please do keep us apprised of your process in this matter.

With many thanks

Mikban, Wase and Bonan

#6 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,027
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 March 2017 - 08:21 AM

Here you have a patched version to test.
Replace attached .exe files in release x.3815. Name of the option has remained the same by the moment, however now only day textures are loaded if an activity starts at night (and only night textures are loaded if an activity starts at daytime). At dawn also the day textures are loaded.
Pls. test this (I've done only a short test).
Attached File  NoDayTextures.zip (629.96K)
Number of downloads: 236

P.S. To have this committed, as a first step a Trello card must be generated as explained here https://trello.com/b...n-rails-roadmap .

#7 User is offline   Blillpers 

  • Engineer
  • Group: Status: Active Member
  • Posts: 740
  • Joined: 28-January 12
  • Gender:Male
  • Location:Fagersta, Sweden or somewhere in Borawia
  • Simulator:OpenRails
  • Country:

Posted 07 March 2017 - 10:07 AM

View PostCsantucci, on 07 March 2017 - 08:21 AM, said:

Here you have a patched version to test.
Replace attached .exe files in release x.3815. Name of the option has remained the same by the moment, however now only day textures are loaded if an activity starts at night (and only night textures are loaded if an activity starts at daytime). At dawn also the day textures are loaded.
Pls. test this (I've done only a short test).
Attachment NoDayTextures.zip

P.S. To have this committed, as a first step a Trello card must be generated as explained here https://trello.com/b...n-rails-roadmap .


Hello again

Preliminary resluts are very positive. Memory usage during night time driving remains the same as during the day, which is what we were hoping for.

I'll email this idea to the email adress as stipulated in the instructions on the OR site immediately. Hopefully, they will examine this proposal and continue development on it in such way that day textures can be loaded during night-time driving - -only- when no night texture is present for an object

With many thanks

Mikban, Wase and Bonan

#8 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,027
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 07 March 2017 - 01:38 PM

Thank you, although you didn't select the right name for the Trello item (it should be "load day textures only when needed", because conditional loading of night textures is already available).
I opened a blueprint https://blueprints.l...of-day-textures .

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,027
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 13 March 2017 - 11:43 PM

Feature has been committed in x.3820. OR manual updated.

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