Blender exporter

An issue has been raised as to whether or not the project should be available under GPL or if Auran may object.

Given the present difficulty in getting any response from Auran getting Auran's blessing maybe difficult at the moment.

However there is another project at Sourceforge that is slightly more general in nature http://sourceforge.net/projects/jetresourceutil/ which was referenced in the Auran Jet forums that is GPL and has been there for some seven years that includes python code for a Blender exporter.

On that basis I would suggest that GPL is appropriate and if the code and documentation is available in Sourceforge should either Blender or Trainz get updated in the future then the code can also be updated.

Thoughts ladies and gentlemen please.

Thanks John
 
Hello John just reading your thread out of interest as regards Blender.
I would image only Auran can answer whether OK or not.
There is a page of python scripts on the Blender site or associated and many of these are in Blender itself to convert file types for obj, 3ds or whatever.

Just needs someone with the skills required to see if feasible .

However not my problem as no longer use trainz, but just making the castles around North Wales with Blender at present and on the 5th one Caernarvon.

Anybody using Blender don't forget to click "texface" tab when exporting to a file type or the texture wont show and mesh will just be white.
 
Last edited:
Just finished the first test.

Two creations didn't export but one scenery creation did correctly from Blender into Trainz without going through GMAX.

Now we start to test and refine.

Note to Barry thanks for the info.

Cheerio John
 
Animation seems to work in that I have a loco running around and the bogey exported from Blender has the wheels going around as the loco moves.

Currently they do not point in the same direction as the loco.

I think we also have a house with windows done in alpha texture which appears correctly as well.

This looks like a good initial start.

Cheerio John
 
Hello John

Which version of Blender are you using? to test the beta blender exporter.

Regards

Ahsan:)
ATW Team
 
Last edited:
Blender Exporter

I am now in a position to publish my work on deciphering the indexed mesh files used in Trainz.

Thanks to the original work by Jack Emmerichs (the sourceforge code) I have been able to put the code into a platform I understand and make a mesh viewer. Please note this is not a graphical display program.

My program reads the contents of the file, parses it, and displays the file in english with names and values for each of the fields in the file. Additionally it can simultaneously display the file in Hex, so you can see what's happening at the raw data level, especially if it does not parse correctly. I have checked my program on lots of meshes from Trainz and so far have not found one it will not parse, so I think it is reasonably robust.

The program also has some editing functions...so take care....

The program Help has an explanation of the contents on both the .im and the .kin files used in Trainz.

The program can be downloaded from

http://www.members.optusnet.com.au/~villaump/pevsoft.htm

Hope this helps in the development of any exporters for Trainz.

Have fun!
 
Last edited:
Once TC3 is out of the way I'd like to get involved in this project. I'm not a Blender expert by any means, but I've got plenty of test meshes...

Paul
 
Once TC3 is out of the way I'd like to get involved in this project. I'm not a Blender expert by any means, but I've got plenty of test meshes...

Paul

I look forward to the TC3 release.

At the moment I see the major needs as being to define the functionality possible, to create test packs and test the functionality, and to document what can be done and how to do it.

Cheerio John
 
Blender Exporter for Trainz 0.6

The next version of exporter is available at SoureForge, there you find also some examples. With this version all planned features except PM export are realised. At wikibooks you find a description of all currently supported features. If you find English grammar that hurts, please leave a message or correct it(I swear my German is much better ;) )

Ciao
Torsten
 
I think its coming to gether slowly. Might be faster if I haven't just reloaded my operating system and so have to set the machine up again.

The nice thing about wiki is anyone can correct the grammer if need be.

Thanks for the hard work.

Cheerio John
 
I think its coming to gether slowly. Might be faster if I haven't just reloaded my operating system and so have to set the machine up again.

The nice thing about wiki is anyone can correct the grammer if need be.

Thanks for the hard work.

Cheerio John

Hello John

Download Blender installed and Installed Exporter

any blender tutorials for Trainz?

Willing to give this project a try and also feedback to you Guys.

Regards

Ahsan:)
 
Hello John

Download Blender installed and Installed Exporter

any blender tutorials for Trainz?

Willing to give this project a try and also feedback to you Guys.

Regards

Ahsan:)

Blender started life as an in house tool for commercial artists so the emphis is on being productive. The interface is quite different to anything else with lots of single key stroke short cuts. It was not designed for Windows so you need to get past the interface.

I suggest starting with the first few of these.

http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro to get you past the interface.


It comes with a default box, as a first step to make a basic wagon or coach you need to make it a particular size and height off the ground. Then add attachment points for bogeys, a.limfront, a.limback etc.

http://en.wikibooks.org/wiki/Trainz/Tutorial_for_Blender gives you the basic information but not in the simplest order.

The first step would be to make the box the correct length and width and height off the track. For that you'll need the first part of the Precision modelling guide here.

http://rab3d.com/

Note this tutorial covers a lot of ground that you don't need.


There are some very good video tutorials.

http://www.blender.org/education-help/video-tutorials/getting-started/

http://www.ibiblio.org/bvidtute/

Texturing I haven't got to yet. There seems to be two methods and the UV mapping appears to be recent.

The exporter comes with some sample blender items you can modify. The scenery house has an attachment point for example that is use for smoke, change the name and it can become a bogey attachment point.

Cheerio John
 
Default opening screen of 2 metre cube press F.
Buttons window below (2 bars) open UV image editor.
Image/Open and go to where you have your image.
Right click on cube face.
Then A for all and all faces selected.
Open image.
Alt plus Z puts image on all faces.
If image disappears click up/down arrows and click on image name. X at the side deletes.
To put an image on one face. RIGHT CLICK on face. Rotate mesh. Alt plus left mouse.
Repeat on another face. Two faces with images of your choice.
To progress. Mouse OVER MESH WINDOW. click U and you get a list of options.
Best way is just to try them out.
Select a few faces. Hold down shift to select a few using left mouse, then Unwrap makes the exact shape.
Project from View exactly what is seen in window. Window tilted image tilted.
If with bounds limits the shape to within the bounds of image.
To scale an image Select all the vertices. Either use A for All. or B for Box B twice to run circle over IMAGE VERTICES.
+ - on numpad to adjust size.
You can pull the vertices around any part of image.
RIGHT CLICK TO SELECT IN BLENDER. Then G to Grab.
Alt plus Z will put image on.

A all, B Box, B twicE circle, C centre, Shift plus D duplicate, E extrude ( Select vertices or right click face then Tab then E for extrude)
G grab, H Hide, Alt plus H restore, Control plus J to join Parts .P to seperate part in edit mode I think.
W with mouse over mesh in edit mode gives the options.
U undo in edit mode. Control plus Z also undo. X to delete.
Alt plus left mouse rotate.
Numpad 7 top, 1 and 3 side/front or vice versa.
Hold down control and its the opposites.
Scale in one direction S followed by X or y or z. do not hold S down.
As no longer using trainz but make ALL my content for the sailing simulator with it.
END

B
p.s. May be errors as written quickly.
RIGHT CLICK TO select in Blender.



 
Last edited:
Blender started life as an in house tool for commercial artists so the emphis is on being productive. The interface is quite different to anything else with lots of single key stroke short cuts. It was not designed for Windows so you need to get past the interface.

I suggest starting with the first few of these.

http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro to get you past the interface.


It comes with a default box, as a first step to make a basic wagon or coach you need to make it a particular size and height off the ground. Then add attachment points for bogeys, a.limfront, a.limback etc.

http://en.wikibooks.org/wiki/Trainz/Tutorial_for_Blender gives you the basic information but not in the simplest order.

The first step would be to make the box the correct length and width and height off the track. For that you'll need the first part of the Precision modelling guide here.

I'll study these very closely.:)
 
Default opening screen of 2 metre cube press F.
Buttons window below (2 bars) open UV image editor.
Image/Open and go to where you have your image.
Right click on cube face.
Then A for all and all faces selected.
Open image.
Alt plus Z puts image on all faces.
If image disappears click up/down arrows and click on image name. X at the side deletes.
To put an image on one face. RIGHT CLICK on face. Rotate mesh. Alt plus left mouse.
Repeat on another face. Two faces with images of your choice.
To progress. Mouse OVER MESH WINDOW. click U and you get a list of options.
Best way is just to try them out.
Select a few faces. Hold down shift to select a few using left mouse, then Unwrap makes the exact shape.
Project from View exactly what is seen in window. Window tilted image tilted.
If with bounds limits the shape to within the bounds of image.
To scale an image Select all the vertices. Either use A for All. or B for Box B twice to run circle over IMAGE VERTICES.
+ - on numpad to adjust size.
You can pull the vertices around any part of image.
RIGHT CLICK TO SELECT IN BLENDER. Then G to Grab.
Alt plus Z will put image on.

A all, B Box, B twicE circle, C centre, Shift plus D duplicate, E extrude ( Select vertices or right click face then Tab then E for extrude)
G grab, H Hide, Alt plus H restore, Control plus J to join Parts .P to seperate part in edit mode I think.
W with mouse over mesh in edit mode gives the options.
U undo in edit mode. Control plus Z also undo. X to delete.
Alt plus left mouse rotate.
Numpad 1 top, 1 and 3 side/front or vice versa.
Hold down control and its the opposites.
Scale in one direction S followed by X or y or z. do not hold S down.
As no longer using trainz but make ALL my content for the sailing simulator with it.
END

B
p.s. May be errors as written quickly.
RIGHT CLICK TO select in Blender.




Maybe Barry you should assist in this project because you have a great knowledge in using blender in the past and any ship tutorials on your site?:D
 
Hello Ahsan no longer using trainz or rather cmp no longer using me as impossible to make anything unless commit with cmp which locks up with Vista.
Nothing to do with download station.

But that is just to explain.
 
Last edited:
Back
Top