Asset conversion from older versions to TS12

jm252485

New member
Let me here give some knowledge that I got in the transformation process of vehicles to TS2012. I must point out that it is the knowledge obtained by empirical and I cannot dare the issue is to be universally valid. It is rather to understanding what is happening in the conversion and can be an inspiration for true connoisseurs.
I have a fairly extensive home collection vehicles (Czech/Czechoslovak railways) which consists of about 1200 vehicles. With accessories it is approximately 4500 individual KUIDs. The collection includes the vehicles from the models for Trainz 2004 till to the TS12. My first Trainz was the 2006 then Trainz Classic, Trainz 2009 and now TS12.
I must say that I became interested in converting only now, because for TRS2006 was a lot of things directly determined, so I did not feel a greater need for conversion. When TS12 came, I thought it would be worth considering. The first problem was with removing the "aliases". It is relatively easy. However, increasing the quality of the models I watched constantly increasing time consumption for installation of the vehicle in the game. Namely in the moment when authors began with using very large textures (2048 * 2048 pixel). The time consumption was up to 90 second per every part, so a larger mass installations have become almost impossible or for really patient users only. (Yes, i write about really extreme model I have, but times 45-50 second are not rare) Worse was that this period is repeated at every - even minor - change - for example, only the replacement of spaces with an underscore in the username tag means long waiting...
So I started researching what is actually happening during installation.
Well, the results of my observations are here:
If I package (CDP file) contains texture TGA, JPG, BMP, then during transfer process are produced a binary forms of textures. This form consists of a binary file *. Texture that contains picture (the original source *. TGA) and accompanying file *. Texture.txt and if the alpha channel is present, also this alpha file. In the directory local / hash-XX / XXXX XXXX kuid we can find all of this.
So the question is: What is the purpose of the source textures presence.
According to my knowledge (again, just in my!) Nothing - unless you want to edit something in texture! I observed - when I deleted all TGA texture.txt etc. in the directory local / hash ... , nothing happened! (Of course, I also tested the vehicle in the game, not only in the pits). In contrast - when I deleted the *. Texture, the model became the "snowman". So for the work in the game is essential a binary model of texture, not the source texture files. When saving your Trainz does not check whether the source files were modified textures and texture transforms into the binary always. If we put here the binary files only (instead of original textures - not together bianries and TGA's), then the binaries are copied and there is no any conversion ! The final effect is clear - installation time decreases dramatically - from 90 seconds to 4 (!) seconds for tested asset. I tried delete in local directory all TGA files, all files *. Texture.txt and left there only binary textures, wireframes (*. IM), Script files, etc. .. Then all was exported to individual CDP's (without any trouble - via TrainzUtil) And tried to install. If the Trainz-build was anythig below 2.9 there was only warnings and assets are usable without problems. (Manual change in congfig from 2.9 to 2.8 solved problem quickly). But the time - from cca 120 minutes to 18 minutes!
What are the resulting conclusions:
First Trainz TS12 - perhaps for his work original textures do not use. Textures are translated into binary form which are used instaed of original TGAs.
Second If we put the binary texture files during installation instead of the original source textures, TRAINZ adopt them, nothig translate and the instalation time is MUCH shorter.
Third If in the config.txt is trainz-build higher than 2.8 fatal error will be reported, otherwise there will be just a warning.

"Fair" option would be possible: If there is need to edit something (except textures - config.txt script etc), then move the source texture to temporarily place (the easiest way is with bazch file with xcopy command for TGA, BMP, JPG), then edit and after all is done, move textures back again. Of course it is useful in the case of "massive" editing more assets at once (renaming etc.)
I want ask you - experts - are those conclusions correct and is the using models with binaries only safe ? (I know - th restoration TGA textures with Images2TGA is always possible)
I did not test the processor demands in the case of deleting the original textures.

Henry


//sorry for my simple English - it is not my mother tongue//
 
Internally TS2009 and above use DXT compression so yes I think you are correct in that the .tga file isn't used in the game. However to allow reskins etc having the .tga file available is useful. When you load the asset into the game then doing the DXT compression takes time. The advantage is assets from before TS2009 can still be used.

Once compressed then I don't think there is much difference.

Cheerio John
 
Back
Top