Bulk Replace Terrain Textures.

Discussion in 'General Discussion' started by RattenReich, Jul 29, 2025 at 12:33 PM.

  1. RattenReich

    RattenReich Active Member

    Joined:
    Dec 19, 2024
    Messages:
    101
    Likes Received:
    97
    Anyone know if it is possible to use TS Tools to bulk replace terrain textures painted under the track bed.

    The WCML Preston - Glasgow - Edinburgh merged route uses more than one ballast texture. I want to change the track types, which is easy enough using TS Tools. But i also would like to change the ballast textures to match.

    Really do not fancy painting the whole track bed manually, so is it possible to do ?
     
  2. cunningn#3154

    cunningn#3154 Well-Known Member

    Joined:
    Mar 22, 2023
    Messages:
    234
    Likes Received:
    305
    You can change the texture set that the texturemap file uses for that texture. The file is a bin file - usually under [route]/environment/terrain/ and usually called terrain.bin or texturing.bin. This has a sequence of definitions (one for each season) that point to individual texture files.

    Look at Assets\Kuju\RailSimulator\Environment\Terrain\Texturing.bin for an example. Good luck
     
    • Like Like x 1
  3. trevkiwi

    trevkiwi Active Member

    Joined:
    Jul 11, 2022
    Messages:
    484
    Likes Received:
    154
    You could try AP's Track Enhancement Pack.
     
  4. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,275
    Likes Received:
    3,190
    I'm not sure but I think that changes the track and ballast rather than the texture underneath the track
     
  5. RattenReich

    RattenReich Active Member

    Joined:
    Dec 19, 2024
    Messages:
    101
    Likes Received:
    97
    @cunningn#3154 Sorry buddy that has left me completely lost (old and senile). If i change the whole texture file, will that not change everything in a route texture wise, fields, embankments, etc ? But thank you for trying to help, much appreciated.

    trevkiwi I already use the track enhancements, but they do not change the painted terrain ballast type. Thanks anyway for replying.

     
  6. 70045

    70045 Active Member

    Joined:
    Jun 20, 2023
    Messages:
    197
    Likes Received:
    96
    The texturemap file defines which textures apply where, so what Neil is saying is that you could redefine the offending one to also use the texture allocated to the ballast you want to use.

    But a word of warning - when I did this for a route I was working on, I was warned that something about doing this might break things - nobody knew why but it did indeed break everything defined there, so I gave up on that plan. Just make sure you have a good backup to fall back on.

    So, yes, I had to re-apply the desired textures manually. Still haven't finished, actually . . .

    John
     
    • Like Like x 1
  7. RattenReich

    RattenReich Active Member

    Joined:
    Dec 19, 2024
    Messages:
    101
    Likes Received:
    97
    So best to just do it manually then from Carlisle to Glasgow and Edinburgh, John.
    Particularly in regards your own experience. Thanks very much for replying and the good advice.
     
  8. cunningn#3154

    cunningn#3154 Well-Known Member

    Joined:
    Mar 22, 2023
    Messages:
    234
    Likes Received:
    305
    You could sned me the relevant file and the name of the texture of ballast that you want and I could probably alter it for you. It's not hard to do but has some gotchas
     
    • Like Like x 1
  9. trevkiwi

    trevkiwi Active Member

    Joined:
    Jul 11, 2022
    Messages:
    484
    Likes Received:
    154
  10. 70045

    70045 Active Member

    Joined:
    Jun 20, 2023
    Messages:
    197
    Likes Received:
    96
    Do you believe in coincidences? It was my steam-era version conversion of Carlisle to Glasgow on which I wanted to change the textures and failed!

    But cunningn#3154 has offered to help. Never look a gift horse in the mouth . . .

    John
     
    • Like Like x 2
  11. 749006

    749006 Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    10,275
    Likes Received:
    3,190
    You seem to be missing the point where the OP does not wish to change the track or shoulder ballast but the ground texture.
    These track patches won't change the ground texture but just change the track.
     
    • Like Like x 1
  12. RattenReich

    RattenReich Active Member

    Joined:
    Dec 19, 2024
    Messages:
    101
    Likes Received:
    97
    Thank you everyone for replying and suggestions. I would think as it is a merged route that is must be referencing the two texturing files from each route. Even more confused now i just looked at both terrain.bin files in TS Tools and they both reference AP ballast textures. But to my eyes (no guarantee), the two sections of the merge look to be using the original track bed textures. WCML North, the orangey colour and Shap using grey ballast textures. :o :o.
     
  13. cunningn#3154

    cunningn#3154 Well-Known Member

    Joined:
    Mar 22, 2023
    Messages:
    234
    Likes Received:
    305
    The route can only have one terrain definition file AFAIK - and it is quite possible that it is ignoring both the ones you are looking at and using a 3rd (default Kuju anyone?). ;-)

    Find the routeproperties.xml file (in the root of the route folder) and see where the TerrainBlueprint section points to - that is the file the route is using.
     
    Last edited: Jul 31, 2025 at 5:29 PM
  14. RattenReich

    RattenReich Active Member

    Joined:
    Dec 19, 2024
    Messages:
    101
    Likes Received:
    97
    Understood buddy thank you. Was it you who did the excellent merge Kings X - York and Cambridge route, with the era change function ?

    EDIT: This line is it............ Kuju RailSimulator Environment\Terrain\Texturing.xml
     
    Last edited: Aug 1, 2025 at 2:14 PM
  15. cunningn#3154

    cunningn#3154 Well-Known Member

    Joined:
    Mar 22, 2023
    Messages:
    234
    Likes Received:
    305
    Yes that was me.

    Re your problem - so it isn't using any special textures at all which means that if you are seeing two different textures then one route used ballast-A and the other route used ballast-B (made up ballast names). So a solution would be to copy the kuju file to the main route asset folder of the merged route and edit it so that both ballast texture definitions use the same ballast file (having edited the routeproperties.xml file to point at your new file of course!). This will change the 'B' texture wherever it is used in the route - usually this is ok but you may want to do a fly-through afterwards just to check nothing has gone squiffy.
    Good luck.
     

Share This Page