Important MessageYou are browsing the archived Lancers Reactor forums. You cannot register or login. |
Mesh/Material File Format
The general place to discuss MOD''ing Freelancer!
25 posts
• Page 1 of 2 • 1, 2
Did anybody figure it out yet or working on it?
I used Visual Studio to compile that EXE (source code along with an explaination of the compressed format can be found here, in case you're interested).
I'm planning on documenting the compression / encryption of .fl files after my work on UTF is done, unless someone does it first, of course
I'm planning on documenting the compression / encryption of .fl files after my work on UTF is done, unless someone does it first, of course
Well, i don't like giving an exact date, to avoid creating false expectations... however i'd say it won't take long to get a first version ready My approach on this will be similar to INIs: meaning, i'll release this tool first, then write a small document describing the UTF files and release the source code of the tool along with it.
In case you're interested, here's an update on how things work so far:
The UTF format is pretty much figured out now: UTF files have a tree-like structure, with data on the leaves of the tree, and the tool can load and save these UTF files without any problem i can see (FL accepts them without complaining, at least). I created an import / export feature to load / save data present on each leaf to a file, to allow easier manipulation, which i've been using these on my tests so far.
My tests consisted in playing around with textures inside MAT files (MAT files are in UTF format), and although the name suggests TGA format, images seem to be in DDS format (pic from my app, keep in mind it's incomplete yet). I haven't been able to import new textures in TGA format yet, but DDS seems to work fine, since a small test swapping DDS files seemed to work perfectly (exporting a DDS file from a MAT and importing it again, replacing the existing texture,test). I haven't yet given up on importing textures in TGA format yet, i hope some tinkering around on the "material library" branch will solve this difficulty. I haven't yet been able to figure out much regarding the mesh format yet... but with some time (and luck) i hope to be able to document it as well.
In short: there has been progress over here, although there's still work to be done until entire new models can be imported into FreeLancer. I'll keep you informed as things develop
In case you're interested, here's an update on how things work so far:
The UTF format is pretty much figured out now: UTF files have a tree-like structure, with data on the leaves of the tree, and the tool can load and save these UTF files without any problem i can see (FL accepts them without complaining, at least). I created an import / export feature to load / save data present on each leaf to a file, to allow easier manipulation, which i've been using these on my tests so far.
My tests consisted in playing around with textures inside MAT files (MAT files are in UTF format), and although the name suggests TGA format, images seem to be in DDS format (pic from my app, keep in mind it's incomplete yet). I haven't been able to import new textures in TGA format yet, but DDS seems to work fine, since a small test swapping DDS files seemed to work perfectly (exporting a DDS file from a MAT and importing it again, replacing the existing texture,test). I haven't yet given up on importing textures in TGA format yet, i hope some tinkering around on the "material library" branch will solve this difficulty. I haven't yet been able to figure out much regarding the mesh format yet... but with some time (and luck) i hope to be able to document it as well.
In short: there has been progress over here, although there's still work to be done until entire new models can be imported into FreeLancer. I'll keep you informed as things develop
JFYI Texture artists can get the Photoshop DDS plug-in here...
http://developer.nvidia.com/view.asp?IO ... ion_plugin
http://developer.nvidia.com/view.asp?IO ... ion_plugin
Thanks for the tip sc4r4b, those plugins and tools are definitely going to be useful!
Finally managed to get the game to load TGAs instead of DDSs, all i had to do was rename the leaf from MIPS to MIP0. No idea why i didn't try this before, it makes perfect sense (fwiw, in UTF-speak, MIPS is DDS, which can have any number of MIP Maps, if you're using TGAs you have to define the MIP levels yourself, MIP0, MIP1, MIP2, etc). Time to spend some time on mesh research now and get the tool completed
Mario
Finally managed to get the game to load TGAs instead of DDSs, all i had to do was rename the leaf from MIPS to MIP0. No idea why i didn't try this before, it makes perfect sense (fwiw, in UTF-speak, MIPS is DDS, which can have any number of MIP Maps, if you're using TGAs you have to define the MIP levels yourself, MIP0, MIP1, MIP2, etc). Time to spend some time on mesh research now and get the tool completed
Mario
I used Visual Studio to compile that EXE (source code along with an explaination of the compressed format can be found here, in case you're interested).
HCl, may I have a lil bit of your time. I have a question regarding your INI decompressor. Thanks to your wonderful explanation of file structure, I've been playing around with inis (trying to build my own (de)compressor in VB ) until I came to this this point.
Some entries in some INIS don't have values!?! Also my freelancer.ini contains a comment in the end, saying "bases has no filename but the key specifies the load order " and there is just bases key, no value. I assume the same can be found in compressed INIs.
Now, using your bini.exe I decompressed mission/mbases.ini (the largest INI in game) and found following line in the output:
offers_missions = mission_type = DestroyMission, 0.000000, 0.112387, 30
checked it in hex editor, offers_missions has no values! In this case, isn't it supposed to output:
offers_missions
mission_type = DestroyMission, 0.000000, 0.112387, 30
or it doesn't matter? What do you think?
Edited by - XLancer on 11-03-2003 06:05:49
DeepFish: As i said, i'm still working on documenting the mesh (3d) format. When that is finished, i'll definitely come up with a converter / exporter for the FreeLancer format.
XLancer: Hmm good catch there i must admit i never noticed that some entries had 0 values (seems to be relatively rare, from what i can tell). From what i see in freelancer.ini, it seems like you're right, and my little uncompressor isn't handling these entries correctly. It should definitely be:
entry
entry = value...
and not
entry = entry = value ...
I'll make a correction both on the document and on bini.exe as soon as i finish this post. Thanks for pointing it out
Mario
XLancer: Hmm good catch there i must admit i never noticed that some entries had 0 values (seems to be relatively rare, from what i can tell). From what i see in freelancer.ini, it seems like you're right, and my little uncompressor isn't handling these entries correctly. It should definitely be:
entry
entry = value...
and not
entry = entry = value ...
I'll make a correction both on the document and on bini.exe as soon as i finish this post. Thanks for pointing it out
Mario
Here's a quick update regarding my research on the VMS format (VMeshData chunk, in UTF files):
I now have a very good idea regarding how things work on VMeshData, so i began work on a quick and dirty converter to test my theories and i was able to import some FL meshes into Milkshape 3D (pic) I estimate VMeshData to be around 85-90% documented. However, if you look at the pic you'll see some "appendages" missing on the Defender conversion... This is because i apparently need to also document VMeshRef and VWireData (also stored inside UTF files), these appear to reference VMeshData and hold data necessary for ship components.
There's still data i haven't figured out yet... however i think converting new models into FL will be a possibility relatively soon When i have enough data to be useful, i'll be releasing a Milkshape importer / exporter, followed by file format descriptions and source code.
I now have a very good idea regarding how things work on VMeshData, so i began work on a quick and dirty converter to test my theories and i was able to import some FL meshes into Milkshape 3D (pic) I estimate VMeshData to be around 85-90% documented. However, if you look at the pic you'll see some "appendages" missing on the Defender conversion... This is because i apparently need to also document VMeshRef and VWireData (also stored inside UTF files), these appear to reference VMeshData and hold data necessary for ship components.
There's still data i haven't figured out yet... however i think converting new models into FL will be a possibility relatively soon When i have enough data to be useful, i'll be releasing a Milkshape importer / exporter, followed by file format descriptions and source code.
25 posts
• Page 1 of 2 • 1, 2
Return to Freelancer General Editing Forum