Page 1 of 1
Posted: 07 Jul 2013, 18:08
Kenny
Hi guys, I think I finally managed to extract all the modules of the trackunit.rtu file, check my last post there if you are interested -> http://z3.invisionfree.com/Revolt_Live/ ... topic=2466

Posted: 07 Jul 2013, 21:57
jigebren
Good job, Kenny. However I'm afraid the post you're pointing to is in a restricted area of RV live...

Posted: 07 Jul 2013, 22:25
Kenny
Oh thats right, totally forgot that the Rv labs section is not a public subforum :P

Okay then I'll just quote my post here:
Ok so I think I finally managed to extract all the contents of the rtu file.

Here's a link to the complete output -> http://www.mediafire.com/?zd7zsoju3244vhh

If anyone is wondering why there are so many files, thats because there is a 3d model stored for
- each texture set (so basically every second model is the same as the previous one but with a different uv mapping)
- each "setting" of a module (for example the straight module from the editor is not stored as a single 3d model but as 7 different 3d models, one for each grade)

I chose to export the information of the model as .prm and .ncp files because it was the first thing that came to my mind (not sure if .fin would have been better...).

The rest of the files (.fob, .fan, .lit) is a little laborious to view so I have no idea if I did those correctly (but I'm overall not sure if everything was done correctly so yeah... tongue.gif (but it should be okay for the most part))
Their main purpose is to reveal the loactions of the nodes/objects/lights in the module so the files shouldn't be used in the game anyway.

And if you are wondering why I didn't extract the pos nodes, thats because they are calculated by the Track Editor (with the help of the AI nodes information) so that would have been kind of difficult to do.

If anyone wants to have the tool I made for the extraction (or even its source, the tool is rather a "single-use" thing since there is only that one rtu file) just say it and I'll put up a link.
There's also some useful code in it for opening and saving the mentioned file extensions.


Last but not least I rather doubt that it will be easily possible to make reverse tool that convertes the mentioned file formats into a single .rtu file. Not only would that require a lot of work (again) but I also found out that there are a few things in the rtu file where I have no idea how one is supposed to figure them out with just the information from the files.

Instead I would either suggest to make a complete new editor, as already suggested by a few members, or some kind of rtu viewer with which one can directly view the modules in the rtu file, replace 3d models and edit the pickups/nodes/lights.
Probably the first thing would be better since the Track Editor could also have some unexpected problems with reading a modified rtu file.

Posted: 08 Jul 2013, 23:36
sebr
i add that reply on RVL

Code: Select all

Great job

But i think somme have wrong maping orientation (unsure)
bank_io_20.prm look good and bank_io_20_2_LH_N.prm look bad (is PRM goog for viewing it ?, W would allow us tu use more than 1 texture / lego module as it is on original lego track)
In lego track each module is a single mesh group of W file ...

The missing data may be the blue untextured vertical walls that we can see on original lego track

Look at the different shape of bank_io_20_2_LH_N.prm and bank_io_20_2_LH_N.ncp, i'm talking of all the extra NCP faces ... 

Posted: 09 Jul 2013, 00:41
Kenny
I'll do just copy&paste from here on if there's something new on RVL regarding this (and vice versa):
SebR @ Monday, Jul 8 2013, 10:01 wrote:The missing data may be the blue untextured vertical walls that we can see on original lego track

Look at the different shape of bank_io_20_2_LH_N.prm and bank_io_20_2_LH_N.ncp, i'm talking of all the extra NCP faces ...
Hmm I'm not sure what you mean when you say the texture mapping might be wrong, it looks ok to me (left is bank_io_20.prm and right bank_io_20_2_LH_N.prm): http://img38.imageshack.us/img38/9052/vs0g.jpg
Also you can load multiple textures for the prm (at least with the Blender plugin it works), the same way the .w files get them.
You just have to make sure that the bitmaps have the same same as the prm, end with a, b, c, ... and that the folder name is the same as the prm (you will have to remove the index number of the folders for that in the exported files).

And I assume you mean the lower half of the ncp files when you are talking about different shapes? In fact all the ncp files should have the same shape as the prm files with the addition of that lower half which is used in the Track Editor if you go higher with the modules.
Also as far as I can tell the prm files don't need that piece of information (not sure if .w files would require that though, I didn't really dug into its format...), I didn't take a deep look into the Track Editor code but I assume that it just uses the ncp informations to visualize that lower part. And since that part is untextured it is not needed in the prm file.

Posted: 09 Jul 2013, 02:16
sebr
my reply on RVL
ok i made some mistakes

on your picture, the right module don't have good texture, i made a tini lego track with this one and there are 4 white car in the middle (but the preview of the module is like it show on blender)

look the difference betwin [38]blank_io_22_2_LH_D and [44]blank_io_22_2_LH_N, the D one have good looking
=>the third one is not good or not used in track editor

I load a lego W file (and only W) in blender and you can see that we have 3 "layer" of blue faces
2 big identical and the last "layer" with a quite big one and 4 little

picture

So we need them, at least only the third layer is useful, but i don't know if it's on rtu file or if trackeditor.exe made them when exporting to revolt

if they are on rtu it will be fine to texture theme on new rtu to avoid this blue pooh

Posted: 09 Jul 2013, 04:30
Kenny
SebR @ Monday, Jul 8 2013, 15:33 wrote: look the difference betwin [38]blank_io_22_2_LH_D and [44]blank_io_22_2_LH_N, the D one have good looking  ^_^
=>the third one is not good or not used in track editor
You mean the third one is not looking good because the cars are missing on the texture?
Actually I just found out that in fact the track editor displays exactly this module when you place it (you can check in the original editor, simply place a bank module anywhere and it will look like that) but when you export it, it seems to use the "pretty" one with the cars.

I never noticed that until now, it seems the editor uses some 3d models exclusively for displaying and for compiling (which is strange because I can't see any advantage in that since the models are moreless the same).
I guess just another reason why there are so much models ^_^
There are probably some other modules too that only exist to be displayed in the editor (I believe only the carpet ones) but one would have to take the time to go through them all and make a screenshot or something like that to figure it out.

Regarding these "layers" of blue faces, I will look into that but I believe this is done by the Track Editor during the compile process.