XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Mon Sep 25, 2017 2:10 am

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 90 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: LithTech Models (.abc, .ltb, .dat)
PostPosted: Wed Aug 24, 2011 4:03 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times

LTB script: http://db.tt/WhaVroBD
ABC script: http://db.tt/N8KeCn5o
DAT script: http://db.tt/ogpsoZNY (maps and stuff, only for files with idstring 85 for now)
DTX script: http://db.tt/jVR8Q8kr (does not work for many files. For me anyways)

Overview

Models are in .abc, .lta, or .ltb format.
lta probably stands for "lithtech ascii" while ltb stands for "lithtech binary"

I am not interested in the lta files. It is a text file and is a pain to parse. Good for reference, but that's it.

Info

Some info from Tron: http://www.ldso.net/tronwiki/doku.php?i ... htechfiles

I'm looking for any specs or tools that are already out there.

I know they have plenty of modding tools already for particular lithtech games (I think monolith even provided a set of tools themselves awhile ago).

Dtx format specs would be nice.
If not, a standalone dtx exporter would also be nice. I don't like how existing tools just rely on milkshape, photoshop, or dedit.

Samples and games

Aside from info, I'm also looking for samples from various games using LithTech engine (all versions)
So far the samples I have are from

Might and Magic 9: abc
Combat arms (LithTech jupiter)
Sudden Attack (LithTech jupiter)
Zu Online: ltb
Atlantis: Search for the Journal: abc
Crossfire Online: abc

You can make the ads go away by registering


_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Last edited by finale00 on Mon Apr 02, 2012 8:18 pm, edited 20 times in total.

Top
 Profile  
 
 Post subject: Re: Might and Magic IX
PostPosted: Sun Feb 19, 2012 12:57 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
Revisiting this format.
LithTech engine seems to be used for a lot of 3D games. At least, old ones anyways.

Someone sent me supposed specifications, but they were only for a specific game.
It is still useful, because the structure of each node should be similar.

I am looking for abc samples from a variety of games. The generic structure looks like it's a bunch of nodes with pointers to the next node. So pretty much a linked list.

One can parse the entire format by simply doing something like

Code:
node = self.read_name()
nextNode = self.inFile.readInt()
while nextNode != -1:
   print(node)           

   #go to the next node
   self.inFile.seek(nextNode)
   node = self.read_name()
   nextNode = self.inFile.readInt()           


And then just read the node name and determine which function to call.
Some people might notice a logical flaw in this code: it doesn't parse the last node.

Lol, which is true. I guess I'll probably just build a list of nodes and go back to parse each one individually.
All information is welcome and encouraged. If there are already tools for this format that would be great as well.

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Top
 Profile  
 
 Post subject: Re: LithTech Models
PostPosted: Tue Feb 21, 2012 2:12 pm 
Offline
advanced

Joined: Tue Nov 16, 2010 12:11 pm
Posts: 59
Has thanked: 9 times
Have thanks: 4 times
The contents of this post was deleted because of possible forum rules violation.


Top
 Profile  
 
 Post subject: Re: LithTech Models
PostPosted: Tue Feb 21, 2012 4:28 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
Ltb format I have a couple from Zu Online.
Would be interesting to see if there is a general data structure.

I've read that there are two dtx format (generic one from lithtech, and some version used by nexon which is basically the same thing except they just switched the first 12 bytes of the header??)

There seems to be some pascal source code for LTB format but it was only for a specific game and it hardcodes a bunch of offsets.

the ABC format was pretty easy to figure out its general structure, but the LTB not so much.

I don't know the format for the dtx files.

Here's something I quickly threw together from the zu online ltb's

I'm still stuck on which value indicates which mesh type I'm looking at, considering how there are 4 different vertex types already.

It's basically

Code:
Header
numMesh Mesh
   numSubmesh Submeshes
Bones
Animation


Code:
Struct Header {
   word
   word
   dword[4]
   dword[3]
   dword numBones
   dword[10]
   word[2]
   dword
   word len #may be 0
   len "Shadow Enable"
   float
   dword
   dword numMesh
}

Struct Vertex {

   if type ==
      32 bytes
   elif type ==
      36 bytes
   elif type ==
      40 bytes
   elif type ==
      44 bytes
}

Struct Face {
   word[3] v1, v2, v3
}

struct unk_struct {
   dword count
   count {
      12 bytes
   }
   byte

Struct submesh {
   dword 1
   dword 2
   dword 1
   dword 2
   dword 3
   dword (0, 1, 2, 3)
   byte ?
   dword
   dword sectionSize (from now until the end of unk_struct)
   dword numVerts
   dword numFaces
   dword[2]
   dword 0x13
   if type == ?
      byte[13]
   else if type == ?
      byte[12]
      dword
   endif
   numVerts Vertex
   numFaces Face
   
   unk_struct

Struct Mesh {
   word len
   char[len] meshName
   dword numSubmesh
   if numSubmesh == 1
      dword[1]
   elif numSubmesh == 3
      dword[3]
   dword
   dword
   numSubmesh Submesh
}

Struct Bone {
   word len
   len Name
   word boneIndex
   byte ?
   float[16] matrix
   dword
}

Struct Animation {
   ?
}
   

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Last edited by finale00 on Tue Feb 21, 2012 11:47 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: LithTech Models
PostPosted: Tue Feb 21, 2012 7:41 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
Got some LTB models out for Zu Online.
Freezes on some models though. Assumes textures are located in a folder called "texture"

I'm hardcoding material names and skipping a whole section in the submesh because I don't know which flag to check.
This works for Zu Online because they name their textures like "name", "name_a", "name_b", but this won't work in general.

For the dtx files, I'm also just doing some hardcoding here and there.

Model import: http://db.tt/WhaVroBD
Textures: http://db.tt/g8MZyIBy

Image Image

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Tue Feb 21, 2012 11:53 pm 
Offline
double-veteran
double-veteran
User avatar

Joined: Sun Jul 05, 2009 2:03 am
Posts: 640
Has thanked: 70 times
Have thanks: 33 times
very good job, the truth that is at work all, congratulations for your skills.


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Tue Feb 21, 2012 11:56 pm 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
Image

Here's another ltb model from a different game.
Someone sent it to me but I'm not sure which game it is.

I'm guessing lta is the ascii version while ltb is the binary version.
Neither of them seem to store the material information, or at least I don't see it (the model file is called "model67" but the textures are called "zom", which is not obvious).

The good thing about that is it becomes easier to figure out what's what. Trying to parse the lta directly is kindof annoying because text-parsing is pretty annoying in general (compared to binary anyways)

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Wed Feb 22, 2012 12:58 am 
Offline
double-veteran
double-veteran
User avatar

Joined: Sun Jul 05, 2009 2:03 am
Posts: 640
Has thanked: 70 times
Have thanks: 33 times
finale00 wrote:
Image

Here's another ltb model from a different game.
Someone sent it to me but I'm not sure which game it is.

I'm guessing lta is the ascii version while ltb is the binary version.
Neither of them seem to store the material information, or at least I don't see it (the model file is called "model67" but the textures are called "zom", which is not obvious).

The good thing about that is it becomes easier to figure out what's what. Trying to parse the lta directly is kindof annoying because text-parsing is pretty annoying in general (compared to binary anyways)
well freaky model xD, about game maybe is one of same companies of LithTech or too can ask guy who send you file :D


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Wed Feb 22, 2012 4:28 am 
Offline
advanced

Joined: Tue Nov 16, 2010 12:11 pm
Posts: 59
Has thanked: 9 times
Have thanks: 4 times
That's from crossfire online. (a mutant character called smoke, or something like that)


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Wed Feb 22, 2012 6:29 am 
Offline
advanced
User avatar

Joined: Mon Jul 05, 2010 2:37 pm
Posts: 63
Has thanked: 7 times
Have thanks: 16 times
finale00 wrote:
http://i.imgur.com/K3KLg.jpg

Here's another ltb model from a different game.
Someone sent it to me but I'm not sure which game it is.

I'm guessing lta is the ascii version while ltb is the binary version.
Neither of them seem to store the material information, or at least I don't see it (the model file is called "model67" but the textures are called "zom", which is not obvious).

The good thing about that is it becomes easier to figure out what's what. Trying to parse the lta directly is kindof annoying because text-parsing is pretty annoying in general (compared to binary anyways)


Whoa! Nice to see this. Is it can load animations yet?
textures name is "zom" for zombie. I have extracted it via Hex a long time ago. Model name is "model67" because i use ltb extractor on MPGH

.LTA lost UV because of ltb2lta tool. And .abc convert from .lta via ModelEdit Talon so it lost UV too.
I can rip all .LTB model by the way import it to "No one lives forever 2" :keke:

_________________
Galian Beast, Death Gigas, Hellmasker V.S Emerald Weapon


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Wed Feb 22, 2012 6:58 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
No unfortunately I don't really understand animations all that much aside from the fact that they use keyframes...

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2012 1:15 am 
Offline
n00b

Joined: Tue Sep 20, 2011 4:37 pm
Posts: 10
Location: USA
Has thanked: 18 times
Have thanks: 2 times
finale00 wrote:
I am looking for abc samples from a variety of games. The generic structure looks like it's a bunch of nodes with pointers to the next node. So pretty much a linked list.
Here is a sample character file from Atlantis: Search for the Journal a game I got in a cereal box years ago :P

http://db.tt/qO1wkLcU

Your plugin imports the model but its all pointy polygons and jumbled together.


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Fri Feb 24, 2012 3:38 am 
Offline
M-M-M-Monster veteran
M-M-M-Monster veteran

Joined: Sat Apr 09, 2011 1:22 am
Posts: 2387
Has thanked: 170 times
Have thanks: 277 times
Ok cool I figured out the geometry. Previously I got it all wrong lol
It now parses the atlantis model, and all the might and magic models correctly as well.

I don't know which version these abc files are, but I haven't seen any other versions either to figure out how to check.

Now the next step is to get the dtx out. I think they have tools for that already though.

Image

Code:

struct Face {
   float[2] UV1
   word v1
   float[2] UV2
   word v2
   float[2] UV3
   word v3
}

struct Vertex {
   word bone count?
   word ?
   count {
      dword bone index?
      float[4] weights?
   }
   float[3] vx, vy, vz
        float[3] nx, ny, nz
}

struct Submesh {
   dword numFaces
   numFaces Face
   dword numVerts
   numVerts Vertex
}

struct Mesh {
   word
   float[3]
   word
   word len
   char[len] meshName
   numSubmesh Submesh
}

_________________
Model Import Plugins/Scripts

Noesis Plugins | Reference files

Reference
Guide to 3D model reversal | 3D glossary


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Sun Feb 26, 2012 3:31 am 
Offline
n00b

Joined: Tue Sep 20, 2011 4:37 pm
Posts: 10
Location: USA
Has thanked: 18 times
Have thanks: 2 times
finale00 wrote:
Ok cool I figured out the geometry. Previously I got it all wrong lol
It now parses the atlantis model, and all the might and magic models correctly as well.

I don't know which version these abc files are, but I haven't seen any other versions either to figure out how to check.

Now the next step is to get the dtx out. I think they have tools for that already though.
Milkshape says that Atlantis file is version 13.


Top
 Profile  
 
 Post subject: Re: LithTech Models (.abc, .ltb)
PostPosted: Thu Mar 15, 2012 9:01 am 
Offline
n00b

Joined: Sat Feb 18, 2012 6:47 pm
Posts: 15
Has thanked: 3 times
Have thanks: 0 time
Hi!
finale00, you say it opens .abc files with Noesis, but I only found .ltb there. Could you please tell me how to
open those .abc files (Might and Magic 9).
May be I did something wrong: I put in Noesis\plugins\python these files:
fmt_ZuOnline_ltb.py
fmt_LithTech_dtx.py
rapi_model_template.py
__init__.py
Sanae.py
I don't remember what version of python I installed - probably 2.6.



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 90 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group