TpFMC Advanced model convertor

Willkommen in der Transport Fever Community

Wir begrüßen euch in der Fan-Community zu den Spielen Transport Fever und Train Fever, den Wirtschaftssimulatoren von Urban Games. Die Community steht euch kostenlos zur Verfügung damit ihr euch über das Spiel austauschen und informieren könnt. Wir pflegen hier einen freundlichen und sachlichen Umgang untereinander und unser Team steht euch in allen Fragen gerne beiseite.

 

Die Registrierung und Nutzung ist selbstverständlich kostenlos.

 

Wir wünschen euch viel Spaß und hoffen auf rege Beteiligung.

Das Team der Transport-Fever Community


  • It's quite strange even I copy the hex data directly from UV0 to UV1, it crashes.


    @Skiwee


    ASE support it too, I found it interesting since it's uses the same coordinate system as the game, and exported with pivot, so no axis flipping/translation work need to be done.


    This convertor may read blender's own format.

    This guy is too lazy to create a signature. 8o

    Gefällt mir 1
  • @Skiwee


    Have just get to have a working code, it produces blob that doesn't crash in the game. (I added 2nd UV to one of my model from my station and tested it)


    Interesting the game seems not fully using the information given in indices section of mtl files since the order of vertieces, normals, uvs and tangent in blob should be strictly respected.


    I have tried also the ModelViewer, it crashes anyway, even with only UV0, I don't know what's going wrong but it seems to more related to material not the model.


    I am waiting for you evaluation.


    The conversion from FBX have some problems, in fact I am looking for a universal way to put the coordinates in correction(each format has it's more coordinate system, z-up or y-up, even -/+). It won't bother you too much if you just test with it, just change a little the transform section in mdl file, by changing Y and Z (1, 0, 0, 0; 0, 0, -1, 0; 0, 1, 0, 0; 0, 0, 0, 1) something like this(I am not sure if it's correct, but it's easy to discover). You can also try ASE format (if blender support it)

    This guy is too lazy to create a signature. 8o

  • I am adding a GUI to the convertor.


    I suppose to list and the models to generate, then a preview window for the result.


    And add an option to configure transforms and axis flipping.


    The parameters can be saved.


    The console mode will always be there, and it will be able to read the saved configuration to start conversion immediately.


    This guy is too lazy to create a signature. 8o

    Einmal editiert, zuletzt von Enzojz ()

    Gefällt mir 1
  • I have loaded the version with GUI.


    @Skiwee Could you test the uv1 function? If possible with ASE format to avoid extra displacement. If no one supports me, I may probably pause here.

    This guy is too lazy to create a signature. 8o

  • Hi,


    I would like to help as i'm also interested in proper logo support, but i'm not sure how to export to ASE format from blender. I will give it a look.

  • @Anachron13


    Ok. It seems the ASE is not supported by blender by default


    So I will be working on some translate/axis flipping support for the next version.

    This guy is too lazy to create a signature. 8o

  • For Blender I've looked for a exporter but all thats available is an importer (which doesn't help me here).
    I've managed to get my hands on a copy of Max but I'm so new to it, I may as well be chasing cheese in a maze. I think (not sure where I can see uvmaps) I've managed to import a mesh with both uv's, but exporting it to .ase I've had zero luck (end result only gives me 1 uv).
    I've tried .dae but the mesh gets distorted in crazy ways by the converter.


    I've had far more succes with hex-editing and almost works like a charm. I say almost because "ModelViewer" still crashes and I don't know why or whats missing. But works ingame.


    edit: I accualy found my "almost" problem was just a copy/paste mistake using map_albedo_opacity insted of map_albedo what it should be.

    Einmal editiert, zuletzt von Skiwee ()

  • @Skiwee


    Yes, I have the same experience of crash of modelview, don't know what's missing.


    I am currently working on a transform option so that I adapts more universally formats


    (I have been using max since 15 years, for me Blender is the maze :P )

    This guy is too lazy to create a signature. 8o

    Gefällt mir 1
  • @Skiwee @Anachron13


    I have made some progress on the version, now FBX import works with world transforms so objects should be in good place.


    I have leave options to disable world transforms so that only local coordinate is always possible. For 3dsmax exported FBX, uncheck the 2nd last transforms, then the local pivot will be placed at 0,0,0. Don't know the case of blender, should be tested.


    I will be working on customized scale/displacement and rotation. But now I think it's ok to test with.


    For blender format, I did little test, it doesn't work for the latest format, perhaps it will work for previous ones.


    You can export some models at a time, my convector reads all and will separate the meshes into blob/mesh files.



    This is the completed world transform



    This is the local coordinate, so pivot is at 0,0,0, this will be helpful to avoid extra calculates on translate etc..


    This guy is too lazy to create a signature. 8o

    2 Mal editiert, zuletzt von Enzojz ()

  • hi,


    I will give it a try tomorrow and keep you posted with the results.

  • I have uploaded a new version, now user defined transforms is working, but the rotation accepts only radians, no degrees


    Also I give names to world transforms.

    This guy is too lazy to create a signature. 8o

  • :)


    This topic is for modders


    As you can see I am slowing on new station, I was working on my own model converter to resolve some problems I met during the mod.


    Particularly for station modding, lot's of part objects will be generated, with TFC or TFMC, we need to export each mesh by hand then convert, it result in lot's of hand work and the time is passing by.


    So the new feature of my convert: you read a model file at once and produce all meshes into single files, so that can be batch processing.


    It gives options to cancel transformation between local coordiantes and world coordiantes, so you don't need to calculate the translate values anymore, just place the pivot at the desired place and find out what transforms to cancel to have local coordinate export.


    It also gives a GUI (there is always console mode, but exports only local coordinates) so you can preview.


    The convertor accepts all formats listed here , except for obj format there's naming and normal issue. I have tested with ASE and FBX(2011, 2012, 2013), these two formats are working.


    I post this post here since
    1. The convertor is in usable state, I hope more modder come to use it so I can improve it.
    2. Station modder need this.



    The discussion topic is here:
    TpFMC Advanced model convertor


    The download like is here
    TpFMC

    This guy is too lazy to create a signature. 8o

    2 Mal editiert, zuletzt von Enzojz ()

  • Hello,


    I tried to use your converter from a blender model without success so far. I exported into fbx format my model, but when i try to import it into the converter, it just crash :


  • @Anachron13


    Yes, you are right, there are files(external libs) missing.


    I have just re-uploaded the completed pack

    This guy is too lazy to create a signature. 8o

  • The fbx file work fine now, but there is this small scale issue that i need to figure out (i only replaced the door .msh file) :rolleyes:


    The logo msh file with two uv doesn't seems to make the model viewer crash, but i can't see the logo right now (may be related to the scale issue ^^).


    I will do some more tests.

    Bilder

  • @Anachron13


    Ok. Minding that what you have seen on the preview window should be what you get in the games, I mean the coordiantes.

    This guy is too lazy to create a signature. 8o

  • I finally got the logo to work. So while it's easier for blender users to use the blender plugin, thanks to you, we know have a solution for proper logo support that does not involve hex editor :thumbsup:


    @Enzojz : There seems to be an issue with manual rotation. As you can see from rotation behavior screenshots, i just added -90 in the X Roll Rotations transform, and for some reason i end with a weird angle (it become -5156.62 in the model transforms block).

  • @Anachron13


    Yes, as I have written, the rotation is in radius, not degree, so 90 means about 28.6 rounds...you need to input about 1.5707963 (so pi * 0.5) to have 90 degree


    I am working on this but it seems some problem with my code, I will upload the new version as soon as finished.


    It seems the thing exported from Blender is scaled by 100x?

    This guy is too lazy to create a signature. 8o

  • Ah yes i have read that, but the fact that the unit is different in the model transforms box than in the entry field misled me and i forgot, sorry :)

  • @Anachron13


    Have updated, they come now in degrees.


    I am currently working on applying textures onto the model, screwing me since no native DDS and TGA support in .net :(

    This guy is too lazy to create a signature. 8o