Blender exporter

johnwhelan

Well-known member
This project is here:

https://sourceforge.net/projects/blenderextrainz



I think we need a project team to either get something that exists working or build one.

Specifically anyone with experience of how sourceforge.net functions would be welcome as would anyone with Blender Python experience.

http://sourceforge.net/projects/jetresourceutil/

Reading through this site
http://jetresourceutil.sourceforge.net/

It appears some one managed seven years ago to get a Blender exporter working sufficiently well to export a monorail into Trainz.

This site has a number of downloads that need looking through and understanding. Also it looked like it used a C program to combine two text files into an .im file. So if some one with better C knowledge than myself could have a look through the code that might be very helpful.

We will need beta testers and people to do documentation at the appropriate level once we get something under way.

email me jwhelan0112 gmail.com or leave a message here.

Thanks

Cheerio John
 
Last edited:
John

This is interesting. I have used the Sourceforge File Viewer code to create a Delphi version of the Jet file viewer (for my own use.. I don't know whether I can share it or not ..copyright is unclear). I have noticed that Auran have made a number of changes to their .im mesh files they use in Jet (Trainz etc). Each chunk in the mesh file has its own version number and these have moved on quite a bit since the Sourceforge code was written.

I have made additions to my code to be able to add and edit attachment points, and also update .im files to later versions. You may have noticed that programs like FileViewer 3.14.2 are not able to open some mesh files. This is because the texture names in the mesh file are stored in a different way in some versions, and the viewer program cannot parse the mesh, so it refuses to open.

I don't know anything about Blender (I guess it's got to be better than GMax) so a bit of learning for me here. I have dowloaded some of the other Sourceforge material in an effort to understand the process.

regards,
 
John

This is interesting. I have used the Sourceforge File Viewer code to create a Delphi version of the Jet file viewer (for my own use.. I don't know whether I can share it or not ..copyright is unclear). I have noticed that Auran have made a number of changes to their .im mesh files they use in Jet (Trainz etc). Each chunk in the mesh file has its own version number and these have moved on quite a bit since the Sourceforge code was written.

I have made additions to my code to be able to add and edit attachment points, and also update .im files to later versions. You may have noticed that programs like FileViewer 3.14.2 are not able to open some mesh files. This is because the texture names in the mesh file are stored in a different way in some versions, and the viewer program cannot parse the mesh, so it refuses to open.

I don't know anything about Blender (I guess it's got to be better than GMax) so a bit of learning for me here. I have dowloaded some of the other Sourceforge material in an effort to understand the process.

regards,

Some how I had a feeling the worst part of this project was going to be uncovering the .im file format. Once you know that creating a file that is in the right format becomes fairly easy. Considering that GMAX has been stable for probably five or six years getting something to the same functionality as the GMAX exporter shouldn't be that difficult. There is a set of Jet 1.1 documentation and decapod. did manage to get a working exporter for 3d Canvas sorted out.

Hopefully we should be able to get the basic file structure and be able to create an exporter for scenery objects. Once that is done then by adding one feature at a time we can improve the beast.

Cheerio John
 
.im mesh file format

John,
The program I have wades through the .im file and displays the contents in english, just the same as the original file viewer program written by Jack Emmerichs in 2001. (The Sourceforge stuff) I used his original code for MSoft C and re-hashed it to work in Delphi4. Jack has claimed copyright ownership so I don't think I can distribute my program, until I can get his permission. At this point I don't know how to contact him. (Late edit.. I may have found him on Google.. I have sent an email so we'll see how we go...)

I have updated it when ever I found data that it would not parse. (and there was quite a bit of that.. and some of it I don't understand)

Most of the stuff, particularly for .im files is fairly straighforward. Mind you how .pm meshes work is beyond me.

I can also look at the contents of the .kin animation files.

In this case the code itself is the key to understanding the structure of the mesh and animation files. It would be good to have the latest from Auran on the Jet .im and .kin file formats.

regards,
 
Last edited:
Most of the stuff, particularly for .im files is fairly straighforward. Mind you how .pm meshes work is beyond me.



regards,

So it sounds like we stand a reasonable chance of getting simple scenery objects without animation through on a first cut. I think once we can get something working adding functionality to it will be easier and it might be easier to get some documentation from Auran.

Thanks John
 
As the first step could some one with Blender experience make me a cube that has a single texture file with each face numbered differently.

The reason for asking is just in case I mess it up in some way and I'd prefer to be able to start from a solid base.

Thanks John
 
As the first step could some one with Blender experience make me a cube that has a single texture file with each face numbered differently.

The reason for asking is just in case I mess it up in some way and I'd prefer to be able to start from a solid base.

Thanks John

John,If you want a UV mapped textured cube (with numbered faces on the texture), send me a PM with the address I should send it to and I'll have it as soon as I can make it (shouldn't take long).Cheers,John
 
Last edited:
.im file format

John,
I can look at my code and make a listing of the .im file format.. It's a fair sized job so will take a few days.. Please remember that anything I do is not the official line from Auran but it can be a starting point, and we can verify the result later. Since my last update I have not found a mesh file that my program will not parse so I guess I am close.

regards,
 
John,
I can look at my code and make a listing of the .im file format.. It's a fair sized job so will take a few days.. Please remember that anything I do is not the official line from Auran but it can be a starting point, and we can verify the result later. Since my last update I have not found a mesh file that my program will not parse so I guess I am close.

regards,

Let's start with just the cube. There is a process to export a blender model into 3DS thence into GMAX. Zapperjet very kindly has provided a Blender cube, I have two feelers out to get it converted via GMAX to a .im file. Any volunteers let me know.

Once we have that .im file then we can examine it and get a basic understanding of what is needed for a scenery object and build an exporter to create the same .im file directly. Possibly drawing on expertise from the blender community.

Once we have the first one done then will be the time to extend it.

With something like this my experience has been one tiny step at a time works best. Sort of nibble it to death and if we are lucky we can draw on subject specialists which might save some sort of learning curve and speed the process up.

We do have the official Auran Jet 1.1 file layouts by the way which is what decapod. started from. We can refine it later.

Cheerio John
 
Of course, there always is the problem of exporting animation files. Since TRS does not accept Blender animation methods... it could be nasty.

But of course, let's start with a cube. We'll cross that bridge when we get to it.

Cheerio,
John
 
I should have the sketchup export to .IM ready soon - that is written using ruby script so you'll be able to read all the code.

I can send over an early copy if you like?
 
I should have the sketchup export to .IM ready soon - that is written using ruby script so you'll be able to read all the code.

I can send over an early copy if you like?

May we take you up on that offer when we've progressed a bit further and are better able to digest it?

Thanks John
 
Paul, I might be interested in the Ruby version. I can't start right away but I'd I like to look at porting over the export parts of it to Python which might help John out since Python is the scripting interface to Blender. The project John referenced went belly up in late 2001. The current Python API for Blender is a lot more complete now so an export pluggin written in Python should be possible. As a start I might just try merging the export to .im part of your script with the blender export script from the jetresourceutil project (that gets a list of blender objects and writes out the data to a text file).

If you want to take this off line email me thru my username above.

Bob Pearson
 
Paul, I might be interested in the Ruby version. I can't start right away but I'd I like to look at porting over the export parts of it to Python which might help John out since Python is the scripting interface to Blender. The project John referenced went belly up in late 2001. The current Python API for Blender is a lot more complete now so an export pluggin written in Python should be possible. As a start I might just try merging the export to .im part of your script with the blender export script from the jetresourceutil project (that gets a list of blender objects and writes out the data to a text file).

If you want to take this off line email me thru my username above.

Bob Pearson

At the moment I don't have experience in Blender or Python so any assistance is more than welcome. I do have a general background in programming etc and I've been involved in conversion type projects before which I'm hoping will help.

Your thoughts of looking through the Ruby code for ideas makes a lot of sense.

Thanks John
 
I now have a project approved at sourceforge.net

Blender exporter for Trainz (blenderextrainz), it has only just been approved so it might take day before its available.

The idea of using Sourceforge.net for this project is to document and preserve the project as it goes forward.

Creeping forward one tiny step at a time.

Thanks

Cheerio John
 
Hi all,

for the last weeks I was working on a Blender Exporter for Trainz. As the script now is in early beta phase(geometry & animation should work properly, diffuse and alpha textures are possible), I want to ask if some of you want to test it. You will need Blender 2.45 to get it running. By interest leave me a short PM, than I will send you an archive with the script and some test data.

Regards
uschi
 
Back
Top