Elvas Tower: Model's reload while game's running - Elvas Tower

Jump to content

Posting Rules

All new threads will be started by members of the Open Rails team, Staff, and/or Admins. Existing threads started in other forums may get moved here when it makes sense to do so.

Once a thread is started any member may post replies to it.
  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Model's reload while game's running Could it be possible to add. Rate Topic: -----

Poll: Model's reload while game's running (22 member(s) have cast votes)

Does this addition look desirable/useful?

  1. Yes (21 votes [95.45%] - View)

    Percentage of vote: 95.45%

  2. No (1 votes [4.55%] - View)

    Percentage of vote: 4.55%

Vote Guests cannot vote

#1 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,411
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 03 May 2024 - 11:33 PM

Hello.
Tweaking MSTS&ORTS models since 2002 or so, I have the same thoughts, as Ex-Rail have expressed yesterday:

Quote

Watching Runactivity loading a Route for 30 seconds just to see the results of a small change drains the energy;
With only 4 seconds of reload time, it's just paint - save image - Alt+Tab - Reload - watch results - repeat.

I've spent enormous amount of hours (far longer, than 30 seconds per load in my machine), waiting for the game to load, just to check, how recently added changes will look.

So, can "reload model" function be added to runactivity for model tweaking/modifying purposes?
Altermatively, can separate program be derived form runactivity 3D-viewer (as TrackViewer was done) to see "live model" with smoke and lights, responding to player's controls status, maybe sounds too? Actually, no need for scenery or route, or activity functions most often in such cases - so they can be ommitted.

Currently Shape viewer DDS lends a hand with a great help, showing light's and smoke/steam effect's appearance points, allowing to use position tool to define the right coordinates for placing/correction of effect's origins... But it's totally-different program, demanding specific windows libraries, which could be not inherited in later OS releases, and it looks aandoned now - depriving us the hope on future support and compatibility.

#2 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,090
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 06 May 2024 - 11:20 AM

View PostWeter, on 03 May 2024 - 11:33 PM, said:

So, can "reload model" function be added to runactivity for model tweaking/modifying purposes?

Interesting idea.

Which bits of the model would you want to update? Is it just textures, or more than that?

#3 User is offline   R H Steele 

  • Executive Vice President
  • Group: Status: R.I.P. or just Retired
  • Posts: 3,562
  • Joined: 14-March 13
  • Gender:Male
  • Location:known universe
  • Simulator:Open Rails
  • Country:

Posted 06 May 2024 - 11:31 AM

A suggestion, if the route is not that important to checking a model, why not use Peter Newell's test route, a bare bones route that loads quickly. >>> CTN Test Route

#4 User is offline   steved 

  • Vice President
  • Group: Posts: Elite Member
  • Posts: 2,318
  • Joined: 19-December 09
  • Gender:Male
  • Location:South of here
  • Simulator:ORMG
  • Country:

Posted 06 May 2024 - 12:05 PM

I have a little two tile route I use just for testing stuff like this. Just takes a few seconds to load. Useful for night textures too.

I gotta be careful, this is how the VSL started.
Randy


#5 User is offline   pschlik 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 660
  • Joined: 04-March 15
  • Gender:Male
  • Simulator:OpenRails - Unstable
  • Country:

Posted 06 May 2024 - 12:08 PM

This would be very useful in theory but it's not clear if just running the parser/initializer/copy a second time could work at all. Overwriting engine/wagon properties in real time might just not work, or even if it does the change could cause other things to break which would not be a very helpful feature. There's quite a lot of investigation that would have to be done.

#6 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,411
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 06 May 2024 - 01:00 PM

Hello, Chris.

Quote

Which bits of the model would you want to update? Is it just textures, or more than that?

If read post#1,

Quote

to see "live model" with smoke and lights, responding to player's controls status, maybe sounds too?

The texture is the last-importance point - SViewer does it well.
Some turn towards native ORTS viewers/editors...


Hello, Gerry.
Teoretically - Yes. And I thought about that many times, but it's not always handy.
If only we could have model reload - no route's reload needed, even so quick-loading, as ctn Test Route (excessive Alt+F4 and clicks Start in Menu)


Hi, Randy.
O, yeah.
It's better to have a nice route loaded - for taking some screenshots, when wanted, or to roll, when needed (with freight might be).


Hello, Phillip.
Humm... Jan have just warned me about complexity of re-parsing process.
I believe, you both do know that better, than me, who knows nothing about how program runs.

#7 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,546
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 04 August 2025 - 04:03 PM

Chris and myself discussed this in ORMT recently; in general, we think it is a good idea, which could be added to the main RunActivity program as an opt-in setting, intended for content developers and testing.

This would work by watching the files (e.g. using "FileSystemWatcher" class) and triggering an automatic reload of a file when it is changed. As mentioned in this thread already, there are some complexities, so it would likely have to start with only a few very specific things being supported but expanded over time if interest is there.

For example, if we start off with just Viewer3D data (ignoring Simulator), we could probably reload all of:

  • Textures
  • Shapes
  • World tiles
  • World terrain
  • Sounds
  • Engine/wagon files but only lights, visual effects, etc.


#8 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,546
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 11 August 2025 - 12:19 PM

View PostWeter, on 05 August 2025 - 11:06 AM, said:

James, I couldn't even imagine, this functionality could involve route files.
Since so, this is going to become the first, but significant step towards real-time route editor, proposed in Trello cards long ago.
That's fine.

Yup! I believe that all of the graphical and sound files can be accommodated moderately easily, since that's basically what the Viewer code already does as you move around the world in-game. The simulation side is certainly more complicated.

You are correct that this would represent one small step towards a route editor and other complex editors. It is certainly not the only way to do it, but it will be a useful experiment and will make using 3rd-party tools easier.

#9 User is offline   James Ross 

  • Open Rails Developer
  • Group: Posts: Elite Member
  • Posts: 5,546
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 12 August 2025 - 10:17 AM

View PostWeter, on 11 August 2025 - 03:01 PM, said:

And, can I already ask about mechanism of reload:
It was told, that is going to be opt-in and automatic (no key press to reload files, I guess), so I wonder, how it's planned to be done: constant reloading within some interval, or concrete file's reload, after it was re-saved?

There are ways to watch for changes to files, e.g. "FileSystemWatcher" class in .NET, so I hope we can do this automatically when the file is re-saved. It may need to have a small delay (a couple of seconds) but this looks achievable.

That means there is only one thing someone must do: turn on the setting in the menu. Everything else would be automatic.

#10 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,411
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 12 August 2025 - 05:58 PM

Thanks.
Sounds economic: not all files constant re-load, but only changed ones.
Seconds is much better, than minutes for exiting one session and loading a new one.

#11 User is offline   cjakeman 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 3,090
  • Joined: 03-May 11
  • Gender:Male
  • Location:Peterborough, UK
  • Simulator:Open Rails
  • Country:

Posted 02 October 2025 - 07:50 AM

View PostJames Ross, on 11 August 2025 - 12:19 PM, said:

Yup! I believe that all of the graphical and sound files can be accommodated moderately easily, since that's basically what the Viewer code already does as you move around the world in-game. The simulation side is certainly more complicated.

Open Rails has an MSTSLocomotive object with all the physics properties and, separately, an MSTSLocomotiveViewer object with all the visual properties. It is the MSTSLocomotiveViewer object which is automatically deleted and re-created if it moves too far from the camera and then back into range again. This test is done in Trains.LoadPrep() and the test could be extended as James suggests by using "FileSystemWatcher" to monitor ENG files.

I expect we would see the loco blink out for a fraction of a second and re-appear with the new visual parameters.

Such a feature would be very helpful for experimenting with the Particle Emitter Overhaul, as Weter writes:

View PostWeter, on 03 August 2025 - 05:22 AM, said:

And, IMO, letting people to play with all of them for some time would reveal many information, which could be helpful.
Isn't it right?


#12 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,839
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 02 October 2025 - 01:05 PM

As a route builder, this is a huge benefit. For certain structures, you want to test-fit to see that there is enough clearance.

I'd even take it a step further to include other files e.g. World files might see a position adjustment if TSRE is open in another window.

#13 User is offline   superheatedsteam 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 665
  • Joined: 28-June 08
  • Location:Perth, WA
  • Country:

Posted 02 October 2025 - 04:19 PM

A quick and dirty hack to reload objects is to decrease the view distance in OR to say 500 metres and place a train 3000 metres long. If you press 2 and 3 to view the front and end of the train, it should reload the shape files at either end. If not increase the train length and or decrease the view distance.

#14 User is offline   jonas 

  • Engineer
  • Group: Posts: Contributing Member
  • Posts: 619
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 03 October 2025 - 03:23 AM

View Postsuperheatedsteam, on 02 October 2025 - 04:19 PM, said:

A quick and dirty hack to reload objects is to decrease the view distance in OR to say 500 metres and place a train 3000 metres long. If you press 2 and 3 to view the front and end of the train, it should reload the shape files at either end. If not increase the train length and or decrease the view distance.
In a similar way I'm using MSTS up to today, when I want to check changes of a single scenery-shape or even a car-shape without repeatly waiting minutes from load to load of the simlator.

For example, if I model a station building shape then I start MSTS one time at this station location, then I use the external cam (key 7) and use the ‘Shift’ and ‘End’ keys to super-fast fly away from the concerning world tile of this station building-shape. Then I click on Cam 2 or 3 and the entire scenery with the shape in question will be reloaded again.

Unfortunately, I don't know of any super-fast flight option in OR (Arrow + Shift + End), otherwise I would do the entire procedure that way in OR.

EDIT: Perhaps it would be sufficient if you could jump in OR to a certain position by entering the world tile coordinates, as it is possible in the MSTS RouteEditor or in TSRE.

#15 User is offline   Weter 

  • Member, Board of Directors
  • PipPipPipPipPipPipPipPipPipPip
  • Group: ET Admin Group
  • Posts: 9,411
  • Joined: 01-June 20
  • Gender:Not Telling
  • Simulator:ORTS
  • Country:

Posted 03 October 2025 - 09:44 PM

@Eric.
Lasi1959 - the author of hi-grade content, have built gabarite-frame object to check structures clearance relative stock's loading gauge.
These can be contact wires and supports, gantries, bridges, gates, platforms, etc., etc.
The pivot point and shape of this object are set that way, they reproduce loading gauge (gabarit of structures approach), needed to obey.
In TSRE this object is placed on track with "stick to track" function enebled - then it can be slided forth and back to check clearance.

@Jonas.
In activity mode, You can jump from one train to another by Alt+F9, and if trains are being on distant tiles - world will be re-loaded.

  • 3 Pages +
  • 1
  • 2
  • 3
  • 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