Page 3 of 7
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Sat Apr 07, 2012 5:19 am
by finale00
Basic dtx format can now be loaded...somewhat. The offset might be off a little...not sure.
Both variations of it (I think people in the modding community refer to them as "nexon" vs "lithtech" although I don't see much of a difference besides where the width/height is stored)
eg:
Code: Select all
#width and height might be stored in different places
check = self.inFile.readUInt()
if check != 0:
self.inFile.seek(-4, 1)
width, height = self.inFile.read('2H')
self.inFile.read("2L")
else:
self.inFile.readInt()
width, height = self.inFile.read('2H')
Here's a model from MM9
Unfortunately the textures related to maps (ceiling, floors, etc) seem to have compressed pixel format...don't know how to deal with those yet. But I haven't found the UV's for the map files either so it doesn't really make much of a difference.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 5:27 am
by finale00
Started looking at world files from Might and Magic 9 cause I enjoyed the game. It was built on an earlier engine but the format is somewhat similar to the combat arms and stuff.
Really don't like the fact that the faces can be whatever they want it to be. Triangles, quads are common, but then there are 5-sides, 6-sides, 7-sides, .........
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 9:23 am
by finale00
After some hours only got the meshes out for maybe 2 or 3 models...lots of unknown structs.
Already having problems just skipping the header.

Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 6:27 pm
by Andrakann
Looks like your dtx plugin makes BGR textures instead of RGB.
I convert pallete for your samples:




Last one looks suspicious, so i google a little and find that screen:

So, problem exist.
LTB2X converter has sources on download page, not sure about posting direct link here, so google "ltb2x" and check out page with "cote-duke" in their adress.
And point me out to good manual how-to-put-your-plugins-to-noesis =)
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 6:45 pm
by finale00
Just take the script and put it in the python plugins folder.
I looked at the source but I think it is only for a specific game and not ltb in general.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 7:30 pm
by Andrakann
I try LTB2X with "Combat Arms" game and models converts fine, but without smoothing groups and materials (didn't check for UVs).
Upload sample for you
here.
Got plugins to work after reinstall Noesis with latest version, but some error pops up when i select dtx-file (no preview, but ask for convert).
I used DTXConvert v1.0 by BlackAngel and converted textures from "Nexon" type to "LithTech" type, and error gone but textures displays black.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 8:41 pm
by finale00
I don't know the dtx format I just randomly assume it is rgb. Some may be RLE compressed I don't know.
I just went to look at my plugin and noticed that I had already realized it was BGR but never uploaded it lol
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 9:09 pm
by Andrakann
I found Photoshop plugin for DTX and some info about format - "Nexon" type used only in "Combat Arms", and conversion to "LithTech" type is required for compatibility with Photoshop plugin.
http://www.blackangel-software.com/?q=lithtech
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 9:13 pm
by finale00
Unfortunately I don't have photoshop (lol only have paint.NET)
I have found the format using texture finder
Currently looking into the rest.
I've updated the plugin to load a couple DXT1 and DXT5's. There's probably some DXT3's somewhere.
Now I can properly look into map files for UV data.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 10:22 pm
by Andrakann
I figured out this format =)
It's DDS with modified header:

(
sample)
Format variations from nVidia DDS photoshop plugin:

Re: LithTech Models (.abc, .ltb, .dat)
Posted: Wed Aug 22, 2012 10:59 pm
by finale00
Well, hopefully ilthtech only used the common ones lol
The general issue I had with ltb and abc files was the fact that I didn't know how the material names worked.
Some monsters have different colors, so the textures would be named like "monster1", "monster2", etc.
Or it might be something like "monsterRed", "MonsterBlue"
Totally random, and there were no texture names inside ltb/abc files. Might have been in a string table somewhere in some archive I didn't bother looking at.
The mesh format should be ok. Skipped a bunch of stuff, but ya.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Thu Aug 23, 2012 12:48 pm
by Andrakann
Forgot save options for DTX:
finale00 wrote:Totally random, and there were no texture names inside ltb/abc files. Might have been in a string table somewhere in some archive I didn't bother looking at.
For MM9 it's in actor.txt or/and monsters.txt inside data.rez.
Standart text file separated with tabs, easy to open in excel:
For Combat Arms all text i found is encrypted...
But you can assign materials to objects with texture named same as object name, some of them correspond.
Much better than without materials / texture names.
Found some obsolete ABC format description (v6, MM9 is v13 i think):
http://www.bop-mod.com/download/docs/Li ... ormat.html
Also found that LTBtoLTA commandline tool with -debug key generates interesting files - looks like models and bones in txt format (
sample). And this tool has "-view" switch that separates models like hands or guns from others (dunno why, but must be important).
Now i downloading "Lithtech Jupiter Enterprise with NOLF2 Source" - maybe i can find some interesting sources.
Full(?) LithTech games list here:
http://www.moddb.com/engines/lithtech/games
Converted model to .X then .obj and export from Noesis same model to .ojb, add material and textures and get this:

Your variant has just one object with incorrect name and flipped UVs

Even smoothing looks wrong:

But this knife has strange normals:

(left is yours, left side of handle has inverted normals for both models)
In LithTech model "editor" smoothing looks similar to yours:

So, maybe there nothing to to, but unsmoothed result of LTB2X looks good for knife...
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Thu Aug 23, 2012 6:37 pm
by finale00
I don't actually know where the normals are. And yes my UV's are always flipped. I'm not sure how to flip them lol
But...face normals AND vertex normals...?
How does that work? I've never seen that before.
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Thu Aug 23, 2012 10:23 pm
by Andrakann
finale00 wrote:But...face normals AND vertex normals...?
How does that work? I've never seen that before.
I resolve that buggy normals:

it's modelling bug or knife handle is transparent - this normals is from rivets inside handle )
finale00 wrote:I don't actually know where the normals are. And yes my UV's are always flipped. I'm not sure how to flip them lol
Maybe rotate textures or read they backward?..
Re: LithTech Models (.abc, .ltb, .dat)
Posted: Mon Sep 10, 2012 7:52 am
by jfwfreo
For those still working on these LithTech files, there is a file floating around called nolf2_gpl_src.rar which seems to contain source code relevant to the LithTech engine and its inner workings.