I've recently been working on a Signal Station Simulator that uses MSTS routes and equipment to display trains as they pass. Signal Station is a New Haven railroad term for what others would call a signal tower or signal box. I decided to write this sim. in javascript and use three.js for rendering. It runs in nw.js. I'm building it on Linux, but it should work on Windows. I plan on putting it on github eventually.
In the first two screenshots, the user is the ball signal operator at Bellows Falls on Paul Charland's Conn. River route. In addition to the ball signal there was a small interlocking machine of some sort that controlled the single track through the tunnel.
The next few screenshots are of a model of SS44 in South Norwalk on the New Haven. This uses the Metro North New Haven line route.
This one has a 3d model of the levers and a working model board. The levers model is my first attempt to use a PBR material. The painted parts use metalness 0 and roughness .5. The unpainted parts use metalness .5, roughness .1 and an environment map that matches the sky (clouds in this case).
At SS44 you can also leave the building to deliver paper work to trains heading up the branch to Danbury.
The last two screenshots are a model of SS28 on the New haven between Cos Cob and Greenwich.
This one also has 3d levers and a working model board, although the real interlocking machine was different and my model of the building needs work.
I'm still trying to decide how best to add wire to these New Haven cases.
Doug
Page 1 of 1
Signal Station Simulator train watching sim
#2
Posted 05 February 2023 - 12:50 PM
This is a very interesting project Doug! Did you write a custom three.js loader for SIMIS shape files? I’m curious because I’m working on a Rust .s file to glTF converter with the ultimate intent of rendering models in three.js too.
#3
Posted 05 February 2023 - 01:34 PM
Yes, I wrote custom code to read .s and .ace files and turn them into three.js meshes. The code is now on github at https://github.com/dajones42/sssim.git
Doug
Doug
#4
Posted 06 February 2023 - 04:49 AM
Thank you for sharing your creation with the community! http://www.elvastower.com/forums/public/style_emoticons/default/smile.gif
Unfortunately, whenever I attempt to start the simulation (with Run > Start), I'm getting various JavaScript errors no matter what routes, consists or settings I try. Could you please share how to set up a basic scenario? Thank you!
Unfortunately, whenever I attempt to start the simulation (with Run > Start), I'm getting various JavaScript errors no matter what routes, consists or settings I try. Could you please share how to set up a basic scenario? Thank you!
#5
Posted 06 February 2023 - 05:31 AM
I added the examples I used for the screen shots to github. See the readme file in the examples directory.
For Start to work you'll need to create the equivalent of an MSTS activity. After opening the TDB file, scroll down to the map and zoom in on the location of interest. Then add a camera location, mark switches and signals that are to be controlled and locations where trains can start and end. Then import some consists for the trains and then add trains.
Doug
For Start to work you'll need to create the equivalent of an MSTS activity. After opening the TDB file, scroll down to the map and zoom in on the location of interest. Then add a camera location, mark switches and signals that are to be controlled and locations where trains can start and end. Then import some consists for the trains and then add trains.
Doug
#6
Posted 06 February 2023 - 10:01 AM
Unfortunately I'm unable to get the simulation running. I am using the BNSF Scenic starter route recommended for Open Rails as well as the consists that come with it. First, I select the route (File > New) then I add a camera and two locations.
Second, I import a consist and create a train.
Finally, as I attempt to start the simulation (Run > Start), the program fails with a vague ReferenceError. It complains before that it cannot find some textures, but the error appears after it tries to load a .w world file.
Am I doing something wrong, or is there a problem with the route (I've tried other routes with no success)? Perhaps there is a bug in the code?
Second, I import a consist and create a train.
Finally, as I attempt to start the simulation (Run > Start), the program fails with a vague ReferenceError. It complains before that it cannot find some textures, but the error appears after it tries to load a .w world file.
Am I doing something wrong, or is there a problem with the route (I've tried other routes with no success)? Perhaps there is a bug in the code?
#7
Posted 06 February 2023 - 12:46 PM
I don't have that route, but I was able to duplicate the problem using the MSTS USA1 route. It is a bug and some unfinished code. All of the routes I've tried so far have Unicode world files, so the code I wrote to handle binary world files was never tested. I'm not sure how long it will take to fix it.
Doug
Doug
#8
Posted 06 February 2023 - 01:22 PM
It was easier to fix than I thought. The fix is on github.
Doug
Doug
Page 1 of 1