Porting Trainz Models

Discussion in 'PC Editor Discussion' started by nwrailway#7585, Sep 24, 2023.

  1. nwrailway#7585

    nwrailway#7585 Member

    Joined:
    Jun 23, 2022
    Messages:
    58
    Likes Received:
    51
    Would it be possible to port models from Trainz into the game? I would like to port the N&W Class J and some others but I want to know how possible that would be.
     
  2. Cygnific

    Cygnific Well-Known Member

    Joined:
    May 26, 2018
    Messages:
    248
    Likes Received:
    342
    Everything is possible with enough time and knowledge... I assume you only want to use them for yourself and not release them?
     
    • Like Like x 1
  3. raptorengineer

    raptorengineer Active Member

    Joined:
    Jan 16, 2018
    Messages:
    513
    Likes Received:
    150
    how easy is it to make locomotive in trainz then train simulator classic. i check out jointed rail fb page and they seem to be making a lot of good locomotives in like two months in trainz. and it challenge to make locomotive in train simulator classic. i hope some creative people from trainz community give it a shot making dlc for train sim world. and review pro and con of making dlc for that game. and maybe telling there view on importing from trainz as well.
     
    • Like Like x 1
  4. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    If you own the original 3d model then you can export it to UE. Texturing is pretty straight forward although the original Trainz textures will need a lot of work to make them look good with PBR - retexturing is probably a better idea. Owning a copy of Substance Painter (or equivalent) will make life 1000% times easier.
    As to "wiring" the loco up to do stuff in game - we currently wait on the editor and some tutorials to be released, so who knows how hard/easy that is.

    This is one of my TSC models updated for UE

    [​IMG]
     
    • Like Like x 2
  5. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,998
    Likes Received:
    36,628
    Yes reverse engineering is a slippery slope. I have managed to use ShapeConverter after a bit of a struggle to decompile a couple of my MSTS structures back into 3ds format. (Source files long lost). But they don't display correctly in 3D Canvas and while the model shows correctly in Blender, applying even simple textures is not something I've yet learned. Years ago there was a plug in called simport that would bring MSTS models across into 3DC complete with textures, but it didn't work in later versions and I long since lost the file anyway.

    But you do have to be very aware of copyright or author's wishes before attempting to use any models from another sim that are not yours, tempting though it might be given the 1000's of assets on the Trainz DLS.
     
    Last edited: Sep 25, 2023
  6. Cygnific

    Cygnific Well-Known Member

    Joined:
    May 26, 2018
    Messages:
    248
    Likes Received:
    342
    Not sure how the official editor will handle 3d models or whats included for 3d programs but you surely need to have the right materials added to your models for it to even work in TSW.

    It was a pain in the ass to get a model from a house into the game incl. weather and extras (editing the exported asset) due to that without official editor etc. And you need to be conservative on what and when to use which material.
     
    Last edited: Sep 25, 2023
  7. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,998
    Likes Received:
    36,628
    So what we are saying is that even a simple textured box, like most of my MSTS efforts consisted of, could be traumatic to get showing correctly in TSW?
     
  8. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,330
    Likes Received:
    2,499
    Considering how many tutorials there are for importing models to Unreal Engine, I imagine it'll be exactly the opposite.
     
    Last edited: Sep 26, 2023
  9. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    Nope. Getting a mesh into UE was simplicity itself - export to FBX, drop into game, drag into scene. Done! Texturing is pretty simple as these things go but is more dependant on how you created the textures (if you use a piece of PBR software like Substance Painter it's a doddle). I mean you could just use your basic colour texture into the RGB slot on the material and be done with it - although clearly it's probably going to look pretty meh compared to most TSW items.
    Extras like night lighting, snow layers etc, we will need to figure out when we see the TSW set up but getting a mesh into the game engine and into the scene is really simple.
     
    • Like Like x 2
    • Helpful Helpful x 1
  10. Cygnific

    Cygnific Well-Known Member

    Joined:
    May 26, 2018
    Messages:
    248
    Likes Received:
    342
    Right, the mesh import is easy. The materials needed was a bit of a problem.
     
  11. VictoryWorks

    VictoryWorks Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    263
    Likes Received:
    1,379
    A very quick material overview..

    Import your mesh (drag and drop the fbx). Import your texture/s. You will need to create a material for each texture - the mesh will need to know it needs multiple textures, probably from the model you have in your 3d editor having multiple materials assigned to it.

    Create a new material
    Add a Texture Sample to the graph and point it at your texture
    Drag the RGB output to the Base Color input
    That's it.

    As it's basic texture with no other information you will probably find that the default values for Metallic, Specular or Roughness will make it rather shiny or just not what you want. A quick way to add a fixed value to these is to drop in a Constant and wire it into each input. In the image below you can see I've set the Metallic to 0 and the Roughness to 0.8.
    A nice "realistic" PBR material will have maps for these values, often from the RGB channels of the generated texture (the standard from Substance Painter is Red = Occlusion, Green = Roughness, Blue = Metallic, so you just drag the relevant texture output pins to the input pins). You might have an AO map texture from Trainz/TSC in which case add it as a Texture Sample and stick it in the Ambient Occlusion input. The same for a normal map.
    If you want to adjust the maps, stick a multiply or divide node in the output and input "wire" and adjust to taste. You can see the material being modified live in the top left window as you do this.

    [​IMG]

    Then add your materials to the mesh's material slots (they are just listed as 0,1,2,3,etc but there is a nice feature to highlight the relevant mesh parts for the material so you can see where they need to go)

    And Bob's your Auntie's live-in-lover ;)
     
    Last edited: Sep 26, 2023
    • Like Like x 2
    • Helpful Helpful x 1
  12. OldVern

    OldVern Well-Known Member

    Joined:
    Nov 2, 2020
    Messages:
    17,998
    Likes Received:
    36,628
    Thanks Pete, useful info.
     
    • Like Like x 1
  13. Tomas9970

    Tomas9970 Well-Known Member

    Joined:
    Oct 7, 2018
    Messages:
    1,036
    Likes Received:
    1,049
    just a quick tip for converting textures into PBR. Inverting the specular map and plugging it into the roughness input should give ok-ish results. Metallic map can then be hand-painted just by designating metallic areas with pure white and keeping everything else pure black (since these are the only two physically accurate values).

    If you really want to try, you can also bake an AO map in blender. Just be sure to grab any moving part of your model and move them away from the base mesh so that they bake separately.
     
  14. mikel290

    mikel290 Member

    Joined:
    Sep 29, 2023
    Messages:
    40
    Likes Received:
    4
    It was a matter in the editor of Trin Classic found trees, from the user busy route, with the inscription "Birch Stalker", which I recall, saw a stalker in the trilogy and I suspect there there were many such objects there. Here, a port of different objects from other ... games can be possible.
    He himself actually asked such a question, but with respect to the classic simulator
     

Share This Page