Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Mesh/Material File Format

The general place to discuss MOD''ing Freelancer!

HCl

Post Sun Mar 09, 2003 12:12 am

Working on it, i'm finishing a tool to edit UTF files. Textures and such should be possible to edit after that's done, but meshes will require extra work (documenting the VMS format). More news as soon as possible

Post Sun Mar 09, 2003 12:15 am

HCI what program did you use to make bini.exe? and are you planning to make
something for the savegame files (.fl)

HCl

Post Sun Mar 09, 2003 12:37 am

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

Post Sun Mar 09, 2003 1:33 am

Excellent!!!

Keep us posted!

Post Sun Mar 09, 2003 3:56 am

HCl, you are THE MAN. Wow. Great explanation of how it works as well. Thanks.

Btw, when editing .ini files, is it safe to add comments preceded by ;;; ?

I tried it once and it seemed to work (I am a programmer who believes HEAVILY in commenting!), but I want to know if this is a bad idea.

HCl

Post Mon Mar 10, 2003 4:29 am

I believe comments both as ; or ;;; are safe, since freelancer.ini has comments in both these formats.

Post Mon Mar 10, 2003 4:57 am

HCI, whats a approx ETA on the editor being finished? I have a copy of 3ds MAX and photoshop 7 just sitting here with no use ATM

HCl

Post Mon Mar 10, 2003 8:36 pm

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

Post Mon Mar 10, 2003 11:33 pm

JFYI Texture artists can get the Photoshop DDS plug-in here...
http://developer.nvidia.com/view.asp?IO ... ion_plugin

HCl

Post Tue Mar 11, 2003 12:34 am

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

Post Tue Mar 11, 2003 3:33 am

any possibility of giving us a tool to export new 3d objects (ships) into Freelancer format ??? I' am very interested in that !

Post Tue Mar 11, 2003 6:03 am


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

HCl

Post Tue Mar 11, 2003 6:27 pm

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

HCl

Post Wed Mar 12, 2003 10:39 pm

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.

Return to Freelancer General Editing Forum