TSRE GenX - MAX OVERHAUL

Collapse
Only viewable if you're a logged in user
X
 
  • Time
  • Show
Clear All
new posts
  • scottb613
    2500 Post Veteran

    • Apr 2003
    • 2628
    • Downeast Maine (soon)
    • ORTS

    #1

    TSRE GenX - MAX OVERHAUL

    TSRE GenX

    Capture.jpg



    Hi Folks,

    Alright boys, pour yourself a strong cup of coffee and set a spell. We need to have us a plain talk about TSRE: what it does right, where it gives us fits, and what we can still do to make this old mule pull a little smoother. This is a long post, no denying that, but if you've ever spent an evening fussing track into a hillside, painting endless terrain patches one dadgum square at a time, or muttering at the editor like it ought to know better by now, I reckon it'll be worth the read.


    Purpose and Scope

    I have been working through a set of practical TSRE route-editor improvements, mainly focused on making terrain work less painful for MSTS/Open Rails route building. The work started with track cuts and embankments, then expanded into route painting, water-edge detection, texture cleanup, and some editor quality-of-life items.

    There has been talk for years about a new Open Rails route editor, and I would still welcome one, but we also have to be realistic. TSRE is what we actually have today. It can be cumbersome, awkward, and less than ideal, but it is also a working route editor with real capability. Rather than waiting indefinitely for a replacement, I think it makes sense to embrace the tool we have and keep improving it where practical.

    I do not intend this to become a separate production fork of Eric's work. This is a test branch for debugging, experimentation, and evaluation. Eric's main branch remains the upstream production code; GenX is my experimental improvement and evaluation branch. My goal is to make focused improvements in the areas I know best, then hand them back to Eric for consideration and, hopefully, eventual inclusion in the main project. As history has proven, my interest around here tends to ebb and flow, sometimes disappearing for months at a time, which makes me a poor candidate to host or maintain production code long term. I have compiled a ready-to-use TSRE GenX build, though I will spare everyone the embarrassing details of how long it took me to get a clean compile.


    Highlights

    The following major updates and fixes are included in TSRE GenX:
    • Updated code to build with current MSYS2/MinGW tooling.
    • Reworked F terrain conforming for stronger, more practical track cuts and embankments, including improved low-end track-width behavior - for Jerry.
    • Added Ctrl+F selected-object tile conforming, Shift+F non-destructive smoothing, and the F2 Conform DB brush for grade-following spot cleanup.
    • Added Alt+A selection of all 256 terrain texture patches on the selected tile.
    • Added autopaint tile-level track and road painting for faster route-wide texture work.
    • Added Water Edge detection and painting that compares terrain elevation against the tile water plane, follows the actual shoreline with a feathered texture transition, and handles shallow-water terrain breaks instead of painting coarse 16x16 patches.
    • Added F2 confirmed route-wide and current-tile TERRTEX reset tools for returning painted terrain to terrain.ace.
    • Added F2 route-local terrain paint presets covering texture, brush, intensity, shape, and rotation.
    • Added F2 full 0-360 degree terrain texture rotation for directional ground textures.
    • Rebuilt F2 seasonal textures around a visible Summer, Spring, Autumn, Winter, and Night selector instead of hidden settings-file switches.
    • Added seasonal textures active-season refresh and per-file ORTS-style fallback for terrain, route objects, transfers, Dynamic Track, forests, and polyforests, including ACE/DDS alternatives.
    • Added Terrtex: Mirror Season for paired default/snow painting, with safe opposite-side placeholder creation when matching seasonal swatches are missing.
    • Protected seasonal TERRTEX 1024x1024 files from accidental downsampling during painting and corrected transfer/material cache refresh behavior.
    • Reduced route performance stutter with forest-generation controls, a Forest Regions view toggle, and texture-cache invalidation only when material paths change.
    • Improved load reliability with single-instance protection, corrected route-table refresh, and validated editable recent MSTS/ORTS root selection.
    • Added Restore Last Session for reopening the last route and camera context, plus compact Pin controls that remember the main window, Control Panel, and Grade Helper placement between sessions.
    • Added Windows the GenX executable icon, desktop-shortcut helper, and Route > Open Route Folder command.
    • Consolidated Control Panel Status and Navi functions into a scalable F7 panel with editing-state controls, navigation, movement locks, and delayed edge snapping.
    • Improved Object Panel with category-aware search and reset, cleaner Scale Rail grouping, and 30 Recent Items in a bounded scrollable history with Clear Recent.
    • Reworked F1-F4 panels property panels, Object Panel, Control Panel, Settings Editor, and startup screens into a consistent scalable interface.
    • Substantially reorganized F2 textures around a larger selected-texture preview, a compact two-column Recent Texture bank, clearer paint/preset/brush groups, and texture-name tooltips.
    • Added global UI scaling, consistent manual-action sound feedback, cleaner square F12 boolean selectors, and coordinated state colors without false responses during passive refreshes.
    • Added Place Guard validation with automatic undo and distinct feedback for dangerous or invalid scenery, track, and interactive-object placements.
    • Reorganized F12 Settings into practical categories with direct settings saves, timestamped backups, full-sentence tooltips, and an integrated key-assignment reference.
    • Repaired F3 maps OSM Vector Map HTTPS support, hardened failed-response handling, and increased generated map imagery to 4096 resolution.
    • Preserved Dynamic Track Classic Flex while adding a Classic/NextGen selector and adapting GokuMK's work as the foundation for compound and full S-curve NextGen connections.
    • Improved Dynamic Track editing with database rebuilding after Flex, synchronized elevation data, clearer section/length information, fallback textures, and consistent naming.
    • Added splash screens runtime-discovered artwork with a persistent shuffled cycle shared by the Route Loader, Consist Loader, and About window during each session.
    • Improved track properties grade-unit presentation and added Lock Grade so newly placed track or road pieces can inherit the selected piece's physical grade.
    • Added Grade Helper for dock-friendly, validated, connected, per-piece vertical transitions to an exact target grade, with remembered placement and automatic Lock Grade handoff.
    • Added Grade Symbols connectivity-aware markers for static and Dynamic Track, including steady-grade, transition, and direct crest/gully classifications.
    • Added View and Markers reversible overlay toggling and improved marker placement, color, height, and label reliability.
    • Added Edit > Copy Info selection diagnostics for clipboard-ready troubleshooting and reporting.
    • Reduced route display overhead by rebuilding Grade Symbol connectivity only at safe tile/database boundaries, reusing unchanged pointer-depth results, and throttling unchanged Control Panel updates.
    • Refined route lighting with warmer directional sunlight and cooler sky-facing ambient light while preserving MSTS texture artwork and neutral editor overlays.
    • Added Save, Restart and Restore in F12 plus optional UI sounds for startup actions, toggles, checkboxes, dropdown selections, and menu commands.
    • Added property guidance for Detail Level, MSTS StaticFlags, and MSTS Collision, clarified Alt+A in the key reference, and corrected read-only Control Panel hover behavior.
    • Added the full-screen F4 Activity Builder and high-resolution TrackDB viewer.
    • Added standalone MSTS/ORTS path creation, editing, validation, and PAT writing.
    • Added natural-end water flow routing with live switch throwing and recalculation.
    • Added reverse points, duration and clock-time wait points, overlap visualization, and passing sidings.
    • Added selectable/deletable path controls, undo/redo, map rotation, route markers, labels, signals, stations, and service-point symbology.
    • Standardized F1-F4 and utility panels with the charcoal/orange visual system, square selectors, consistent controls, active-tool highlighting, focus restoration, and pinnable helper windows.
    • Added the pinnable Auto Place workflow and further Grade Helper, Control Panel, Object Selection, and Terrain Editor cleanup.



    F4 Activity Builder Disclaimer

    The new F4 screen currently includes a working standalone Path Editor and high-resolution TrackDB map display. Paths can be created, edited, checked, and saved independently of an activity.

    The surrounding Activity Editor controls are still under active development. Several of those functions have been pulled apart, reorganized, or exposed only as placeholders while the new workflow is being built. They should not be used to create, modify, or save production activities at this time.

    For now, please use F4 only for route viewing and path work, keep backups of route files, and continue using established tools for production activity creation. The Activity Editor will be enabled section by section as each part is completed and verified.


    Download and Test Branch

    OpenRails Editors and Tools. Contribute to scottb613/TSRE5-SCOmod development by creating an account on GitHub.


    This branch includes the current experimental code and a ready-to-use GenX release package for evaluation. Look for "RELEASES" in the right-hand sidebar and download the ZIP. In the root folder I added a small program, AddShortcutDesktop.cmd, to add a desktop shortcut for TSRE. When unzipping the folder, I suggest you keep this copy completely separate from your production copy of TSRE.

    The complete Work Detail is included in the attached text document.

    scoWorkList.txt


    Acknowledgements

    Special thanks to Piotr Gadecki (GokuMK), the original creator of TSRE5, for the enormous body of code that made this editor possible and for his willingness to publish and share that work. Every later TSRE5 fork, including TSRE GenX, stands on the foundation he created.

    Special thanks also to Eric Olesen (eric-from-trainsim) at Trainsim.Com for years of support to the train-simulation community and for continuing the development and maintenance of the Trainsim.Com TSRE5 fork. Eric's TSRE8.006 codebase is the direct starting point for TSRE GenX.


    Distribution Notes

    The test package is intended for evaluation and should be kept separate from any production TSRE install.


    Future Work: The Telephone-Pole Vendetta
    • By God, one way or another, I am going to get telephone poles to have wires on them. This has become personal.



    Overall Goal

    The general direction is to make TSRE more practical as a production route editor: better track terrain shaping, faster tile-based painting, cleaner shoreline texturing, safer texture handling, safer route database saves, and fewer repetitive manual cleanup steps.



    Regards,
    Scott
    Attached Files
    Last edited by scottb613; 08-05-2026, 17:47.
    <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models
  • eric
    Owner/Admin


    • Dec 2002
    • 9365
    • NS MP245.4 CNO&TP South District
    • English, SQL
    • General

    #2
    Thats a lot of extras.... and I'm grateful someone was willing to take on the terrain and texturing work.




    Last edited by eric; 07-23-2026, 13:31.
    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment

    • TrainSimJack
      Senior Member
      • Jul 2022
      • 517

      #3
      Wow Scott, you've been busy!
      On behalf of train sim fans everywhere, Thank You!

      Comment

      • scottb613
        2500 Post Veteran

        • Apr 2003
        • 2628
        • Downeast Maine (soon)
        • ORTS

        #4
        Originally posted by eric
        Thats a lot of extras....



        Sent from my SM-S911U using Tapatalk
        Hi Eric,

        Yeah - I've been quiet for a year or so - but not dormant - seems my train hobby turned into a code hobby - I'm not so sure that's a good thing...


        The details are in the scoWorkList - I could have glossed over in the highlights - I tried to keep a running log. The Path/Activity Editor turned into a bigger task than I thought.

        Regards,
        Scott
        <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

        Comment

        • scottb613
          2500 Post Veteran

          • Apr 2003
          • 2628
          • Downeast Maine (soon)
          • ORTS

          #5
          Hi Jack,

          Hah - a little bit - thanks.

          Regards,
          Scott
          Last edited by scottb613; 07-23-2026, 13:48.
          <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

          Comment

          • kennyeaton
            Senior Member

            • Oct 2008
            • 238
            • Stony Point, NC
            • MSOR

            #6
            Thank you Scott.

            Looking forward to diving into this tomorrow. I am currently involved in doing a major lipstick and makeup job on Don Karch's Rollins Pass. Shouldn't be much of a learning curve finding my way around in this editor.

            Since this is a work in progress, I would love to see a feature that allows the placement of consists directly to the route instead of only being able to do this in an activity. As you know, car strings are ok as long as a curve is not involved.

            Keep up the excellent work that you contribute to this community.

            Kenny

            Comment

            • scottb613
              2500 Post Veteran

              • Apr 2003
              • 2628
              • Downeast Maine (soon)
              • ORTS

              #7
              Originally posted by kennyeaton
              Thank you Scott.

              Looking forward to diving into this tomorrow. I am currently involved in doing a major lipstick and makeup job on Don Karch's Rollins Pass. Shouldn't be much of a learning curve finding my way around in this editor.

              Since this is a work in progress, I would love to see a feature that allows the placement of consists directly to the route instead of only being able to do this in an activity. As you know, car strings are ok as long as a curve is not involved.

              Keep up the excellent work that you contribute to this community.

              Kenny
              Hi Kenny,

              Sound Good - happy to help.

              To the best of my knowledge - all features work - except the actual "Activity Editor". I'd be interested to see if people have issues on other screen size/resolution - I am running a 32" 2K monitor.

              Regards,
              Scott
              <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

              Comment

              • CSRX
                10000 Post Veteran


                • Apr 2015
                • 13454
                • Lincoln, ME
                • English
                • ORTS

                #8
                Honestly, looking forward to checking this one out.

                One thing I do wish however, is that laying out rivers and what not is a little easier. Trying to lay out the Saco River from Crawfords, NH down into the final river crossing by the MEC, is a bit of a pain!
                -Shawn K-

                Comment

                • scottb613
                  2500 Post Veteran

                  • Apr 2003
                  • 2628
                  • Downeast Maine (soon)
                  • ORTS

                  #9
                  Originally posted by CSRX
                  Honestly, looking forward to checking this one out.

                  One thing I do wish however, is that laying out rivers and what not is a little easier. Trying to lay out the Saco River from Crawfords, NH down into the final river crossing by the MEC, is a bit of a pain!
                  Hi Shawn,

                  Among other massive automation tasks I’ve messed with is filling rivers from end to end with water tiles with edge to edge detection that maintains a specified height above terrain for the length of the run. It insured that water tile seams meet perfectly but still very much a WIP. Probably need my LIDEX 1m terrain for clearly defined shoreline.

                  I’ve got a dozen little science projects on the side that I’ve been rolling into the master codebase for a push to git.

                  Activity Editor needs much work - but the map I have is snappier and easier to use to make paths - than the old track viewer from ORTS - IMHO.

                  Regards,
                  Scott
                  <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                  Comment

                  • CSRX
                    10000 Post Veteran


                    • Apr 2015
                    • 13454
                    • Lincoln, ME
                    • English
                    • ORTS

                    #10
                    Scott, that would be ideal to try, I've been hung up a few times trying to get the water at the tiles to match correctly, to the point I just started painting the river in place...
                    -Shawn K-

                    Comment

                    • scottb613
                      2500 Post Veteran

                      • Apr 2003
                      • 2628
                      • Downeast Maine (soon)
                      • ORTS

                      #11
                      Hi Folks,

                      Just pushed a small cosmetic change to the interface and updated the hacks screen with a delete all interactive button for the route modelers - I forgot to include - same link - not essential - only if you want it.

                      Regards,
                      Scott
                      <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                      Comment

                      • kennyeaton
                        Senior Member

                        • Oct 2008
                        • 238
                        • Stony Point, NC
                        • MSOR

                        #12
                        Hi Scott,

                        Was looking in the editor to get familiar with it. I was going to do some auto painting but when I tried to load a texture to paint under the tracks the program crashes. Could this be something I'm doing wrong or could it be a bug?

                        Kenny

                        Comment

                        • scottb613
                          2500 Post Veteran

                          • Apr 2003
                          • 2628
                          • Downeast Maine (soon)
                          • ORTS

                          #13
                          Originally posted by kennyeaton
                          Hi Scott,

                          Was looking in the editor to get familiar with it. I was going to do some auto painting but when I tried to load a texture to paint under the tracks the program crashes. Could this be something I'm doing wrong or could it be a bug?

                          Kenny
                          Hi Kenny,

                          ACE PNG JPG DDS? Sorry - first release to anyone - I’ll double check in the morning and see if can replicate the issue. Last thing I did was recent hover over tooltips to identify the texture on the pallet.

                          Thanks so much for the feedback - only way we’ll shake out the kinks.

                          Regards,
                          Scott
                          <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                          Comment

                          • EldoradoRailroad
                            Member
                            • May 2010
                            • 199

                            #14
                            Oh boy....

                            You have been a busy guy I see!
                            A lot to digest, let alone test. Did you use Claude Code to speed up implementation of those code changes?

                            So a couple of questions, one more stupid than the next, but given the world we now live in at least it will not be as bad.

                            1. For what O/S(s) is this written for, version?
                            2. Yeah, the silly one, GenX....so damn the Boomers, GenY, GenZ, GenAlpha, and of course the Millenials?

                            My pet peeve will be of course that there is no memory management, so I assume it will crash on a 64 bit machine that does not have TONS of ram sticks. These days, RAM and SSDs are in the "haves" and "have nots" category.

                            I have a pretty powerful Win10 machine that I have been scared to use as I do not know what I would do if I needed to replace an SSD or hard disk. The price for replacements are like it is 1980, and a 640K IBM PC is $5000 in 1980s dollars, that was a LOT of cash back then!

                            I am writing this on a mini PC, and I am not using any version of windows at the moment, running mainly from a UPS backed ramdisk. Between tar melting heat and the fear of breaking stuff I have to wait for the later fall season when temps are cooler to use anything that costs a bundle to replace. Maybe in the fall there will be less of a chance of power dips eager to fry my precious hardware.

                            Scott, FANTASTIC array of upgrades, really!

                            Yours truly,
                            Steve

                            Comment

                            • scottb613
                              2500 Post Veteran

                              • Apr 2003
                              • 2628
                              • Downeast Maine (soon)
                              • ORTS

                              #15
                              Originally posted by EldoradoRailroad
                              Oh boy....

                              You have been a busy guy I see!
                              A lot to digest, let alone test. Did you use Claude Code to speed up implementation of those code changes?

                              So a couple of questions, one more stupid than the next, but given the world we now live in at least it will not be as bad.

                              1. For what O/S(s) is this written for, version?
                              2. Yeah, the silly one, GenX....so damn the Boomers, GenY, GenZ, GenAlpha, and of course the Millenials?

                              My pet peeve will be of course that there is no memory management, so I assume it will crash on a 64 bit machine that does not have TONS of ram sticks. These days, RAM and SSDs are in the "haves" and "have nots" category.

                              I have a pretty powerful Win10 machine that I have been scared to use as I do not know what I would do if I needed to replace an SSD or hard disk. The price for replacements are like it is 1980, and a 640K IBM PC is $5000 in 1980s dollars, that was a LOT of cash back then!

                              I am writing this on a mini PC, and I am not using any version of windows at the moment, running mainly from a UPS backed ramdisk. Between tar melting heat and the fear of breaking stuff I have to wait for the later fall season when temps are cooler to use anything that costs a bundle to replace. Maybe in the fall there will be less of a chance of power dips eager to fry my precious hardware.

                              Scott, FANTASTIC array of upgrades, really!

                              Yours truly,
                              Steve
                              Hi Steve,

                              Thanks — yeah, it turned into a much bigger project than I originally expected.

                              This build is for 64-bit Windows, mainly Windows 10 and 11. It may run on older versions, but I haven’t tested or packaged it for anything else yet.

                              I hear you on hardware costs.

                              Code:
                              PC Specifications
                              
                              Operating System
                              - Windows 10 Home 64-bit
                              - Version 22H2, Build 19045
                              
                              CPU
                              - Intel Core i7-7700K @ 4.20 GHz
                              - 4 cores / 8 threads
                              
                              Memory
                              - 32 GB RAM
                              - 4 × 8 GB modules @ 2133 MHz
                              
                              Graphics
                              - NVIDIA GeForce RTX 4060 Ti
                              - 8 GB VRAM
                              - NVIDIA driver 566.36
                              
                              Motherboard
                              - Gigabyte Z270X-Ultra Gaming-CF
                              - BIOS: American Megatrends F9d
                              
                              Storage
                              - Samsung SSD 860 EVO 1 TB
                              - Samsung SSD 970 EVO NVMe 1 TB
                              - Western Digital WD2003FZEX 2 TB
                              - Western Digital WD2003FZEX 2 TB

                              As for the name, I’m GenX and naturally consider us the avant-garde, so GenX seemed appropriate. The Boomers, Millennials, GenZ and the rest will just have to cope!


                              Your memory concern is fair. The 64-bit build gives TSRE more address space, but it doesn’t magically fix every memory-management issue inherited from the original code. I’ve been testing for crashes and obvious problems, but larger routes and long editing sessions still call for some caution and regular saves.

                              No rush at all on testing. Keep the hardware safe, stay cool, and give it a try whenever conditions are better.

                              Thanks again for the kind words.

                              Regards,
                              Scott
                              Last edited by scottb613; 07-23-2026, 21:36.
                              <a href=https://www.trainsim.com/forums/filedata/fetch?filedataid=80663&type=full title=thumb_80663.png >thumb_80663.png</a>​ My Blender Models

                              Comment

                              Working...