Trainz 2009 content creation - No .texture file during the export (Blender 2.79)

TheFirm_

New member
Hello everyone !


I need for help about an export I made for trainz with the tools provided for blender (the plugin to export as an XML file and the program to convert it through .im and .texture files). The problem is that, whenever I export my files, the program doesn't create, for some reasons, .texture files. My textures and model were made under the latest version of blender. I imported my model into blender 2.79b to make the plugin work 'as expected'. But nothing comes out but an .im file.


Here are some specifications about the model ;


- I am using multiple objects for the model itself, such as details, main body and top part in order to make the texture better.


- I use multiple UVs (One / object) and multiple textures (1 /Uv).


inwQ9Ue.png



I named every material as following ;


(materialname).m.onetex


Then exported the body (without the bogies) as .xml with the following exporter ;
https://sourceforge.net/projects/blenderextrainz/

With this in the plugin folder
https://online.ts2009.com/mediaWiki/index.php/Downloads



This is somehow all the files I have as an output.
hzBFxca

I'm using regular tga files for textures. Textures do show in blender, but don't export as expected.

hzBFxca.png

IeYqUTa


Here are the logs of the convertion :

IeYqUTa.png


Thanks for further answers !
 
Last edited:
Your picture shows that Blender has an .001 suffix to the lights.tga texture. Its possible that is also the name identified in the XML file. That has caused problems before.

The XML files are plain text so you can open them with a simple text editor. The XML materials section is easy to read so you should see what textures have been exported.

The program that actually produces the texture.txt file(s) is TrainzMeshImporter.exe. It uses the xml file as an input.

Torsten's Trainz Blender exporter is backwards compatible to some point but I'm not sure if it works with TS09.
 
In the material section, there is no texture tag under the material tag - Is that an issue ? It seems like it is one

unknown.png
 
In the material section, there is no texture tag under the material tag - Is that an issue ? It seems like it is one
....

Try turning on autowrap in your editor or move to the extreme right as its probably off the visible page.
 
The <textures> block should be just after the two-sided tag so obviously the XML exporter isn't finding them. I never used nodes for IM creation and just allocated textures to the material. You might also try changing the texture node to color data rather than non color. I'd be surprised if that worked but worth a try. You could also just switch off nodes but then you would probably have to set up the materials again. Something like this old WiKi web page - down towards the bottom. https://online.ts2009.com/mediaWiki/index.php/M.onetex

And, finally, you could just create the texture.txt files yourself which is what I usually do anyway.
 
Thanks for your reply. I'll give a few tries. Are there any method to follow to compile the modified XML file other than saving over the modified XML ?
 
Thanks for your reply. I'll give a few tries. Are there any method to follow to compile the modified XML file other than saving over the modified XML ?

Just use the Blender exporter. It creates the xml file and then calls TrainzMeshImporter and passes the xml file to it.
 
Awesome, it partially work ! I figured out something this morning with the trainz mesh viewer ; There is a probable problem in the TGA texture itself ; Do you know how to solve this ? Or to convert in the correct format ?
unknown.png


Edit : Still have errors with the textures.

unknown.png
 
Last edited:
Be sure the .tga file is not compressed.

I like to use old texture.txt files, edited in text editor. Allows for some funny business such as directing them to a different texture file than implied by the name ;)
 
Back
Top