Beiträge von Skiwee

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


    You can have a look at this files: BR 193 - Siemens Vectron (TPF)


    I created a second uv with the help of a hex editor ;)
    Not really comfortable - but working well. But don't know wether wavefront (obj) does support a second uv map saved within a single file.

    Sadly wavefront(obj) doesn't support multiple-uv's. collada(dae) and filmbox(fbx) do, they're currently the only formats I've played with and I like the .fbx flexibility so far, I'm not sure what other formats can/can't.


    Thx @mediziner I'll take a swing at it with a hex-edit (don't suppose there are any details you could pass on?).

    Ok. I will try to figure it out tonight. I don't know much about vehicle modding so perhaps I need your help.


    @Skiwee


    Could you provide a full set of mdl and material/textures so that I can test by myself easily?

    I can provide an unconverted example. Even my work-around still lacks the first uv-map and was just a means to get it working in-game (untill we get a converter that suports multi-uv), my method also causes the model-viewer to crash. I can give an example but currently the only files that have a first/second working uv-map are the ones provided with the game (which is I think every vehicle).
    If it where posible to open a .msh.blob I'ld know a lot more I think.
    I spent a few hours comparing converters and except for the indices being copy/paste from the normal = { }, your spot-on so I think the problem might be within the .msh.blob (orientation can always come later or leave it to the user).


    Also I can confirm my original thought was correct as I was e-mailed this:

    Zitat von Christian - UrbanGames

    Usually the logos are created as follows :

    • Create a submesh for the logo.
    • Assign the model’s UV to it. This will be [uv0] and specify where on the original mesh the logo lies.
    • Create a second UV set. This will be [uv1] and specify which part of the logo texture is used.
    • Export the logo mesh with the two UV sets. You need an exporter which can handle multiple UV sets.

    I'm tempted to want to figure out how to write a converter, but thats like learning to swim in the deep end of the pool. my level of skill is reading/modifying scripts not writing them from scratch.

    in "indices" section there are an error: there are two uv0s, the second should be uv1
    however, what lead to crash is the texture path, check if it's correct, currently you need to added the path by yourself

    Yea I know all that.
    I was just sharing the raw data TpFMC was generating, so you could see what it's doing. Of course I edited it before testing and it caused a crash. I didn't have time to look into it. Later tonight when I have time I'll see what I can figure out.

    I love how clean it is, has great potential 8)


    I think managing multiple uv's broke it though, as doing a regular mesh it tries to add the uv1 even when there is no second uv-map.


    But when there is (.fbx test, I've included my file below as well) generates:


    I also have to rotate the fbx z -90° > x 90° for the correct orientation, but that might just be me Blender plugin I have to rotate z-90° and when exporting .obj orientation is perfect.

    Dateien

    Yea thats for adding extra materials. So prime example are repaints (have 1 mesh with multiple textures). they get configured in the .mdl file and in the .msh file would then have the list of materials.
    Taking the v100 as an example again:



    in the .mdl when

    Code
    -- MODEL
    matConfigs = {
    	{
    		0,
    	},

    it shows: vehicle/train/db_v100.mtl


    Code
    -- MODEL
    matConfigs = {
    	{
    		1,
    	},

    it shows: vehicle/train/db_v100_second.mtl



    Submeshes are then represented like:



    Code
    -- MESH
    	matConfigs = {
    		{
    			0, 0, -- first material and first submaterial
    		}, {
    			1, 1, -- second material and second submaterial
    		}, 
    	},

    the srn6 has an example of submeshes:
    ~/res/models/mesh/vehicle/ship/srn6/lod_0_body.msh

    I do in Blender but I've not been able to successfully convert it to .msh instead I kinda frankensteined 2 meshes together and manualy edited the .msh (I'm not 100% if that even worked/mattered, and if it did it would explain the face-glitching) I've been experimenting with sub-meshes as well.
    In terms of what format supports mulitple uv's I've been able to export .dea and import it with uv's intact beyond that, I've read that .fbx supports it as well (but I don't have much experience with that format, a few tries I prolly grasp it better).

    For an example in the game files there's the db_v100:
    Mesh:
    ~/res/models/mesh/vehicle/train/db_v100/lod_0_logos.msh (~/lod_0_logos.msh.blob)
    Material:
    ~/res/models/material/vehicle/train/db_v100_logo.mtl


    To elaborate further the material type = "PHYSICAL_NRML_MAP_CBLEND_DIRT_LOGO" From what I'm assuming uses uv0 (seen in the msh file) for the vehicles textures and uv1 (seen in the msh file) for the logo texture (I could have it mixed as I've no way to confirm my methodology). I've been messing around and have got it working (able to confirm it working as the normal map gets displayed correctly).


    Is this the kind of example you where looking for?

    Yea thats correct sadly. I'm 100% sure it's the count and offset parameters. If i knew more about submeshes I might have a better understanding of how to implement it properly, but thats as far as I've got. I know there are a couple modders out there that have implamented submeshes but none have shared how (nothing I've been able to find).


    I've also wonderd if "player-logo-array" could be scripted to change the material of a mesh so you could swap out a model-specific logo/paint-job for player logo. Or even if there are other alternatives possible.

    awesome :) after a few minutes playing with the coeffs I got it.


    went from:
    coeffs = {1.0, 1.0, 0.5, 15.0,},
    to
    coeffs = {1.0, 1.0, 0, 1.0,},


    setting the 3rd value to 0 did it. the 4th value I haven't noticed much change except setting it to 0 then from the sun's pov reflection is just black emptiness. Has anyone been able to define the value's?

    Thanks for the quick responses guys, appreciate the help and confirmation! :thumbup:


    Managed to improve the grass significantly, now just to stop the sun's glare and it'll be as good as it can possibly be.
    (this is using the games grass_detail.tga, grass_detail_nrml.tga and a custom color overlay {haven't try'd every altitude yet})

    Hi everyone,


    I've got a few questions involving a new mod I'm working on but hit a snag and can't find much information about it. Which makes me fear the worst that it's unlikely possible or no one has thought of it yet, how ever I can always ask/try.


    My first question is about adding an offset between the station platforms and road entrance. In the picture below I've marked the origin with X , Y & Z and the black line (parallel to Y) is where I'd like the road to connect. How ever with the information I have so far, is that train stations are locked to Y .
    [Blockierte Grafik: https://www.train-fever.net/galerie/userImages/d3/8853-d38f8c9d-medium.jpg]


    Next question is about the grass texture, the game it self manages the grass terrain adding all sorts of filters to color it, so it doesn't have a .mtl file. What I'd like is to have the grass look just like in the game. Even better would be if it was regardless of what style (EU, USA or Nordic). Is it possible to do that? If not, how would the best way be to approach this?


    And for my final question (for now ;) ). Is it possible to make the bounding-box more complex then just boundingInfo = {bbMax = {59.456587, 78.8, 5,},bbMin = {-124.0, -0, -0,},},
    There is a lot of empty space that excessively gets flatted or otherwise with a box too small the mesh vanish's into the ground or floats.

    What part is it your having trouble with?
    As general idea it's easiest to set up your model, so each section is it's own group for fakebogies (front, center & back). If I remember Correctly the position is where you want your group / model to pivot and the off set is how far the wheel is from its pivot point.

    The trouble is not with the code (maybe my measurements), but in the mainbody appearance sways over the original bogies. In it's current state it so the body clips, but did can Easily be fixed by editing the model (making the pivot point of the coupling to body, resist). This is most noticeable with hard-corners / sharp turns. . I've uploaded'm of expansion to my mod did shows what I've done, I just waiting for it to be approved
    Edit: it's up I Realized last night I could have just added it to my locomotive sorry for the wait: New Zealand DL Class Coupling
    you need my latest version of New Zealands DL Class for it to work in TFMM.

    Thx Doc the lexicon was a great help. I used it in an attempt to animate couplings, sadly my end result didn't look any better then not animating them.