Page 2 of 4

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 3:37 am
by CriticalError
The contents of this post was deleted because of possible forum rules violation.

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 3:53 am
by finale00
You don't get any nice filenames with offzip though lol.
I want to at least keep the package name so I know where it came from.

(..without manually renaming them)

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 3:57 am
by CriticalError
finale00 wrote:You don't get any nice filenames with offzip though lol.
I want to at least keep the package name so I know where it came from.

(..without manually renaming them)
well sorry just I try help, i'm not expert in this, just learning mate, and how you get DDS? replacing header of the file? or how?

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 4:11 am
by chrrox
just make a bat file for it.

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 12:09 pm
by fatduck
I did the full format on Twelve Sky back on 2008. And the formats remain the same in Twelve Sky 2!
Here is the basic struct for the Archive! (*.mobject, *.sobject)
dword numResource
struct RES
{
<compressed model data>
<compressed Texture data>
}
Here is the bms script to help you decompress the Archive easily!
Good luck!

Code: Select all

# Game: TwelveSky & TwelveSky 2 (PC)
# by fatduck     Jul2011
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

get PRENAME basename
get NUMRES long
savepos OFS_RES
for i = 1 to NUMRES
   goto OFS_RES
   get FLAG1 long
   get USIZE long
   if FLAG1 != 1 
      math FLAG1 -= USIZE
      math FLAG1 *= -1 
   else
      math FLAG1 -= 1
   endif
   get CSIZE long
   savepos OFS_RES
   set RESNAME PRENAME
   string RESNAME += _
   if i < 10 
      string RESNAME += "0"
   endif
   string RESNAME += i
   string RESNAME += .mdl
   if USIZE > 0
      clog RESNAME OFS_RES CSIZE USIZE
   endif
   math OFS_RES += CSIZE
   math OFS_RES += FLAG1

   goto OFS_RES
   get FLAG1 long
   get USIZE long
   if FLAG1 != 1 
      math FLAG1 -= USIZE
      math FLAG1 *= -1 
   else
      math FLAG1 -= 1
   endif
   get CSIZE long
   savepos OFS_RES
   set RESNAME PRENAME
   string RESNAME += _
   if i < 10 
      string RESNAME += "0"
   endif
   string RESNAME += i
   string RESNAME += .dds
   if USIZE > 0
      clog RESNAME OFS_RES CSIZE USIZE
   endif
   math OFS_RES += CSIZE
   math OFS_RES += FLAG1
next i

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 12:44 pm
by CriticalError
fatduck wrote:I did the full format on Twelve Sky back on 2008. And the formats remain the same in Twelve Sky 2!
Here is the basic struct for the Archive! (*.mobject, *.sobject)
dword numResource
struct RES
{
<compressed model data>
<compressed Texture data>
}
Here is the bms script to help you decompress the Archive easily!
Good luck!

Code: Select all

# Game: TwelveSky & TwelveSky 2 (PC)
# by fatduck     Jul2011
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

get PRENAME basename
get NUMRES long
savepos OFS_RES
for i = 1 to NUMRES
   goto OFS_RES
   get FLAG1 long
   get USIZE long
   if FLAG1 != 1 
      math FLAG1 -= USIZE
      math FLAG1 *= -1 
   else
      math FLAG1 -= 1
   endif
   get CSIZE long
   savepos OFS_RES
   set RESNAME PRENAME
   string RESNAME += _
   if i < 10 
      string RESNAME += "0"
   endif
   string RESNAME += i
   string RESNAME += .mdl
   if USIZE > 0
      clog RESNAME OFS_RES CSIZE USIZE
   endif
   math OFS_RES += CSIZE
   math OFS_RES += FLAG1

   goto OFS_RES
   get FLAG1 long
   get USIZE long
   if FLAG1 != 1 
      math FLAG1 -= USIZE
      math FLAG1 *= -1 
   else
      math FLAG1 -= 1
   endif
   get CSIZE long
   savepos OFS_RES
   set RESNAME PRENAME
   string RESNAME += _
   if i < 10 
      string RESNAME += "0"
   endif
   string RESNAME += i
   string RESNAME += .dds
   if USIZE > 0
      clog RESNAME OFS_RES CSIZE USIZE
   endif
   math OFS_RES += CSIZE
   math OFS_RES += FLAG1
next i
wow, really awesome man thanks a lot you are my hero mate grateful.

PD: maybe now somebody can help for Max Importer :)

mdl file are same extention like valve of HL2, but ofc the importer don't work to 12Sky xD

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 5:29 pm
by Rimbros
Good Work Fatduck, something posibility of extract and run the animation files too :mrgreen:
Also i try with MDL3, MDL4 and MDL5 Import format and cant load the models.

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 6:01 pm
by fatduck
mdl is simply for a name of "model", the format is different from other game! :)
AFAIK, the format is very easy and effect use vertex animation as well!

I did record some format in my own Chinese forums
http://gameresearch.5d6d.com/viewthread.php?tid=96
use guess/guess as user/password

for the animation archive, you have to upload some samples, I don't have both games anymore!

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 6:02 pm
by finale00
I changed it to tsmdl so people wouldn't assume it's one of the common mdl formats. Plus it makes it easier for me.

Archiver also works without login: http://gameresearch.5d6d.com/archiver/tid-96.html

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 6:20 pm
by CriticalError
The contents of this post was deleted because of possible forum rules violation.

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 10:21 pm
by Rimbros
finale00 wrote:I changed it to tsmdl so people wouldn't assume it's one of the common mdl formats. Plus it makes it easier for me.

Archiver also works without login: http://gameresearch.5d6d.com/archiver/tid-96.html
Well its not a common mdl but can you write a bms or something importer to load this format? i found this code in the link you post but i cant understand how to use, its this Discuz Archiver 7.0.0 program function to save this MDL to tsmdl?, Regards.

Re: TwelveSky 2 Model Format

Posted: Thu Jul 21, 2011 11:42 pm
by finale00
The model format fatduck reference to is for the 1st Twelve Sky.
The samples uploaded here are for twelve sky 2. Same developer, so maybe that's why same format used for the files, but the model format seems difference I think.

You can get the first game http://download.mmosite.com/html/1/2252/
to save this MDL to tsmdl?,
Just modify the bms script that appends mdl to the name.

Re: TwelveSky 2 Model Format

Posted: Tue Jul 26, 2011 12:45 am
by Rimbros
finale00 wrote:The model format fatduck reference to is for the 1st Twelve Sky.
The samples uploaded here are for twelve sky 2. Same developer, so maybe that's why same format used for the files, but the model format seems difference I think.

You can get the first game http://download.mmosite.com/html/1/2252/
to save this MDL to tsmdl?,
Thanks fInale i take a look but i see a incomplete model fileformat alson in Twelve Sky 1, fatduck only make the unpacker object files and this works also in Twelve Sky 2, if you know a bms or maxscript to load this models of Twelve sky 1 can be usefull, cheers.

Re: TwelveSky 2 Model Format

Posted: Fri Aug 05, 2011 7:23 pm
by Rimbros
Code wrothed by fatduck for 12sky

Code: Select all

dword       ??          //header??
dword       ??          //header??
float       Emission
float_4     color1
float_4     color2
byte_76     ??
dword       numMatrix
dword       numVerts
dword       ??          //same as numVerts
dword       numFaceIdx
struct Animation {
  float_12  Matrix3X4
  float_4   sphereXYZR
}
struct AnimatedVert {
  float_3   posXYZ
  float_3   normatXYZ
  float_2   texUV
}
struct Face {
  word_3    index123
}
Aparently works fine,
Image

File to test:
http://gameresearch.5d6d.com/attachment ... 8852&fid=6

Any help to make this in blender or max script?
Regards.

Re: TwelveSky 2 Model Format

Posted: Sun Aug 07, 2011 12:43 am
by finale00
There are most likely different formats for different model types.
I will post up later when I figure out what the differences are.

EDIT: it appears to be the difference between sobject and mobject. Not too sure.

Also, notice that the words are mirrored. Hmm I wonder how to fix that lol

This is an SOBJECT, and I followed fatduck's format but made minor changes to make it work

Code: Select all

dword       ??          //header??
dword       ??          //model type
float       Emission
float_4     color1
float_4     color2
byte_76     ??
dword       numMatrix
dword       numVerts
dword       ??          
dword       numFaces

byte_40 ???
numVerts vertex {
  float_3   posXYZ
  float_3   normatXYZ
  float_2   texUV
}
numMatrix Animation {
  float_8 ???
}
numFaces Face {
  word_3    index123
}
mobject is different, and doesn't seem to follow what is written either. Maybe the format has changed.

Anyways twelve sky and twelve sky 2 SOBJECT are the same format.

ts2 monster:
Image

ts1 object