Results 1 to 8 of 8

Thread: Terrtex Terrain Shaders Updating in .t Files

  1. #1

    Default Terrtex Terrain Shaders Updating in .t Files

    Hi Goku

    I believe I found a bug in the terrain shaders portion of the .t files being updated correctly. Assuming I use the terrain texture painting feature to "paint on" riverbeds on a subtile. Occasionally, one might accidentally paint into an adjacent subtile, and in future replace the modified texture back with a default texture (in order to save space and reduce the number of tile texture definitions). Howeverm both the modified texture and the reference in the .t file are retained. If a user cleans up the terrtex directory off all these extra textures, opening the route in MSTS RE/MSTS in the future results in an error texture not found message and the entire tile becoming invisible.

    To re-produce this is easy.

    a) Take a clean blank tile
    b) Paint any texture on one of the subtiles
    c) Save
    d) Now put the default tile texture back on that tile
    e) Save
    f) Uncompress the .t file and look at the terrain shaders section, the reference to the modified subtile texture still remains. The modified texture also remains in the terrtex folder

    I would expect once a subtile is reverted to a standard unmodified terrtex, any reference to the modified terrtex should be removed from the .t file, along with any other dependencies.
    Last edited by joe_star; 02-12-2021 at 03:10 AM.

  2. #2
    Join Date
    Oct 2015
    Location
    Poland
    Posts
    646

    Default

    TSRE does not remove unused shaders. It is a not implemented feature, not a bug.

  3. #3

    Default

    Quote Originally Posted by GokuMK View Post
    TSRE does not remove unused shaders. It is a not implemented feature, not a bug.
    I would consider it a bug in the .t update routine, not a missing feature by itself. A feature should bring value, this would merely perform the .t file update as required.

    In the case of the route I am working on now, the unused textures have already been deleted from the terrtex folder, I am not sure how, perhaps during a route riter compress route routine in the past. My route cannot be opened properly in MSTS RE or MSTS anymore. I would have to manually figure out the redundant shaders and remove them from each .t file to fix the tiles, which is tedious considering there are also "valid" modified terrtex textures in each tile.

    Anyone using the terrain painting utilities in TSRE would have to retain all redundant tile texture patches for perpetuity in their terrtex folder, if they want to maintain MSTS compatibility.

  4. #4

    Default

    I found an interim workaround to anyone wishing to restore MSTS compatibility after deleting redundant subtile texture patches

    a) Open route in MSTS RE. When loading any affected tile an error showing the missing ace will be shown
    b) Using route riter uncompress the .t file, open in a text editor and in the terrain shaders section, find the mentioned .ace. REPLACE the ace name to "terrain.ace", or any other generic ace that is a part of your route.
    c) There are 2 references for each terrtex ace, a detail terrain and an alpha terrain reference. Both must be referenced this way.
    d) compress back the .t and try viewing the tile again in MSTS RE. Repeat until all subtile patches are corrected

    Do not try deleting entries and reducing the number of terrain shaders, that will mess up the tile.

    Alternately, you can also add a dummy texture for each missing ace file by copying and renaming an existing texture to the same as the missing one. It will not be used, just as a redundant copy in the terrtex folder

    I am slowly going thru my route eliminating all the redundant terrtex textures by the first approach, in order to reduce it's size for distribution.
    Last edited by joe_star; 02-14-2021 at 07:25 AM.

  5. #5

    Default

    That is a very good idea.
    But if you use Archibald you don't need to de - compress with RouteRiter.
    Archibald processes the compressed files directly.


  6. #6

    Default

    Quote Originally Posted by kapitaen View Post
    That is a very good idea.
    But if you use Archibald you don't need to de - compress with RouteRiter.
    Archibald processes the compressed files directly.

    Thanks, I have never used Archibald before, but that seems like a much easier way to change the values!

  7. #7

    Default

    That's going to be really time consuming if you need to do this for more than a couple tiles.

  8. #8

    Default

    Quote Originally Posted by eolesen View Post
    That's going to be really time consuming if you need to do this for more than a couple tiles.
    Indeed! The alternative is work very carefully with your tiles if you care about MSTS compatibility.

    I have gone thru 4 iterations with my tile / terrtex (over the 4 years working on this route)
    a) Using the Solution for real terrain utlity
    b) Using TSRE pulled terrain textures as maps
    c) Using generic textures
    d) Using generic textures painted with the TSRE texture paint utility

    On inspection, my .t files have references to a mix of all the above textures. I am trying to get rid of all the redundant ones to make the route as light as possible for sharing (currently all the redundant textures are taking up around 500MB and above).

    Everything works fine in TSRE & Open Rails, but blows up when using MSTS RE / MSTS. I am half minded to completely ditch considering MSTS compatibility for this reason.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-->