Author Topic: "Cracking" FFVIII model data  (Read 24341 times)

Alhexx

  • No life
  • *
  • Posts: 1899
  • Karma: 1
    • View Profile
    • http://www.alhexx.com
"Cracking" FFVIII model data
« Reply #25 on: 2004-05-05 14:03:08 »
I'm really sorry to revive this old topic, but I'm currently trying to work on that FF8 formats based on this topic, however, I've got a problem... :D

Quote from: Mirex
After table there are vertices. each is 3 * short = 6 bytes;
there ain't no number of vertices, but vertex data are 16 bytes padded, and
last 8 bytes are zeroes. before that there are numbers of 3polys and 4polys.
After that data are padded with zeroes to 16 bytes from start of vertex data.


Well, I don't want to criticize your english, since mine isn't better, however ... I don't have any idea what you're talking about... :-?
Could you, or somebody else who understood it, tell me, what you mean?

Oh, BTW: Yes, part 7 is monster information. Right at the beginning there is a 24 bytes length string telling you the name, you will just have to add 2 to every single char...

Thanx!

 - Alhexx

 - edit -
Oh, and how does that polygon data look like?

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Cracking" FFVIII model data
« Reply #26 on: 2004-05-09 12:45:03 »
I have to say I can't read DAT files properly. Vertex data look
quite promising, but polygon data look absolutely wrong.
I could not find vertices count anywhere, so I though that verts
end when vert coords are zero. But looks like its not it.
Here are structs and code I use:
Code: [Select]

struct s_FF8_dat_3poly {
short vi[3]; //vertex indexes
char texcoords1[4];
short u1;
char texcoords2[2];
short aa;
} poly3;

struct s_FF8_dat_4poly {
short vi[4]; //vertex indexes
char texcoords1[2];
short u1;
char texcoords2[2];
short aa;
char texcoords3[4];
} poly4;


for( i=0; i<polys3_count; i++ ) {
cfin->Read( 16, &poly3 );

ula[ 0 ] = poly3.vi[ 0 ] &= 0x7FFF;
ula[ 1 ] = poly3.vi[ 1 ];
ula[ 2 ] = poly3.vi[ 2 ];

StorePolygon( 3, ula );
SetPolygonMaterial( polygons_count-1, 0 );

SetPointTexCoords( GetPolygonPoint( polygons_count-1, 0 ),
(double) poly3.texcoords1[ 0 ] / 127, (double) poly3.texcoords1[ 1 ] / 127 );
SetPointTexCoords( GetPolygonPoint( polygons_count-1, 1 ),
(double) poly3.texcoords2[ 0 ] / 127, (double) poly3.texcoords2[ 1 ] / 127 );
SetPointTexCoords( GetPolygonPoint( polygons_count-1, 2 ),
(double) poly3.texcoords2[ 2 ] / 127, (double) poly3.texcoords2[ 3 ] / 127 );
}

for( i=0; i<polys4_count; i++ ) {
cfin->Read( 20, &poly4 );

ula[ 0 ] = poly4.vi[ 0 ] &= 0x7FFF;
ula[ 1 ] = poly4.vi[ 1 ];
ula[ 2 ] = poly4.vi[ 2 ];
ula[ 3 ] = poly4.vi[ 3 ];

StorePolygon( 4, ula );
SetPolygonMaterial( polygons_count-1, 0 );

SetPointTexCoords( GetPolygonPoint( polygons_count-1, 0 ),
(double) poly4.texcoords1[ 0 ] / 127, (double) poly4.texcoords1[ 1 ] / 127 );
SetPointTexCoords( GetPolygonPoint( polygons_count-1, 1 ),
(double) poly4.texcoords2[ 0 ] / 127, (double) poly4.texcoords2[ 1 ] / 127 );
SetPointTexCoords( GetPolygonPoint( polygons_count-1, 2 ),
(double) poly4.texcoords3[ 0 ] / 127, (double) poly4.texcoords3[ 1 ] / 127 );
SetPointTexCoords( GetPolygonPoint( polygons_count-1, 3 ),
(double) poly4.texcoords3[ 2 ] / 127, (double) poly4.texcoords3[ 3 ] / 127 );
}

If you want to read MCH files I can put here some code too.

Alhexx

  • No life
  • *
  • Posts: 1899
  • Karma: 1
    • View Profile
    • http://www.alhexx.com
"Cracking" FFVIII model data
« Reply #27 on: 2004-05-09 13:56:03 »
Okay, thanks. I'll see if can use that stuff in my work.
However, something I haven't been posting for a while: :D



 - Alhexx

Darkness

  • No life
  • *
  • Posts: 2184
  • Karma: 0
    • View Profile
    • http://www.x0r.net
"Cracking" FFVIII model data
« Reply #28 on: 2004-05-09 17:13:06 »
Its amazing how quickly you guys figure this stuff out... I really need to learn how to do this stuff some time.

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Cracking" FFVIII model data
« Reply #29 on: 2004-05-10 16:27:10 »
Quote from: mirex
I have to say I can't read DAT files properly. Vertex data look
quite promising, but polygon data look absolutely wrong.
I could not find vertices count anywhere, so I though that verts
end when vert coords are zero. But looks like its not it.
Here are structs and code I use:
...
If you want to read MCH files I can put here some code too.

10:27 5/10/2004
Thanks for sharing..hmmmmm I wonder if this is anything like the PSX version data time to look!

Cyb

15:20 5/10/2004
Ok after abusing the FACE information some I find it rather perplexing.
First none of the verticies are grouped as far as I can tell at least.  I'm a little puzzled about the edge information I'm 3d ignorant, why are there 2 sets of vertex  data?  All the information that doesn't make sense in the faces .. actually don't seem to do anything for moi.  (IE they are invariant).

IE I have
1 2 0
0 1 2
for one triangle polygon.
What does the second set of numbers do?

The verticies are my other problem as I said they don't appear grouped.
Or is this what the edge data is for? IE
Vertex 1 2 0 define this polygon and the remaining data does something else (useful perhaps?)  I've drawn all the faces at once and it merely gives a jumbled pile of trinagles looks funny actually but seriously ...

I think this is why I'm having trouble with FF7 polygon data as well (hmmm). Or at least finding how the skeleton information is applied at the very least.

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Cracking" FFVIII model data
« Reply #30 on: 2004-05-11 21:07:08 »
Quote from: CyberMan
Ok after abusing the FACE information some I find it rather perplexing.
First none of the verticies are grouped as far as I can tell at least. I'm a little puzzled about the edge information I'm 3d ignorant, why are there 2 sets of vertex data? All the information that doesn't make sense in the faces .. actually don't seem to do anything for moi. (IE they are invariant).

IE I have
1 2 0
0 1 2
for one triangle polygon.
What does the second set of numbers do?

please to which FACE information are you reffering to ?
sometimes 2nd set of vertex indexes is set to array texture coords, or colours.

In ff7 p files polygons there were first vertex indexes, then normal indexes and last were some edge indexes. (according to doc http://mirex.mypage.sk/FILES/pformat.txt ) I was using only vertex indexes btw.

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Cracking" FFVIII model data
« Reply #31 on: 2004-05-25 15:25:49 »
Quote from: mirex
Quote from: CyberMan
<SNIP>

please to which FACE information are you reffering to ?
sometimes 2nd set of vertex indexes is set to array texture coords, or colours.

In ff7 p files polygons there were first vertex indexes, then normal indexes and last were some edge indexes. (according to doc http://mirex.mypage.sk/FILES/pformat.txt ) I was using only vertex indexes btw.


FF8 PSX

The first 3 faces plus face 12 to see what a Quad looks like, of a small Squall model have this data
Code: [Select]

// FACE 0
// 25010607
// Polygon Flat Tri w Tex Opaque No Light
// 0001 0002 0000 0000
// 0000 0001 0002 0000
// 00,01 08,04 13,02 0E,00
// FACE 1
// 25010607
// Polygon Flat Tri w Tex Opaque No Light
// 0001 000A 0007 0000
// 0000 0003 0004 0000
// 68,1D 5F,1D 65,1A 00,00
// FACE 2
// 25010607
// Polygon Flat Tri w Tex Opaque No Light
// 000A 0001 0004 0000
// 0003 0000 0005 0000
// 68,1D 71,2A 68,27 00,00
// FACE 12
// 2D010709
// Polygon Flat Quad w Tex Opaque No Light
// 000A 0009 0007 0008
// 0003 0009 0004 000A
// 68,1D 71,2A 6D,1D 00,00

There are models with multiple tims that appear to have higher resolution in terms of polygons and textures.  However this is the structure information I am using.  I can't acertain the size of the remaining data in the model or what it's for.

Actual structure information I'm using.
Code: [Select]

typedef struct
{
   UINT32   REFS[64];
}
PSX_FF8_MDL_HDR;
typedef struct
{
   UINT32   SKJ;
   UINT32   Vert;
   UINT32   ZZ0;
   UINT32   Face;
   UINT32   ZZ1;
   UINT32   V2B;
   UINT32   ZZ2[10];
}
PSX_FF8_MDL_HDR2;

typedef struct
{
   UINT16   Parent;
   INT16    Length;//??
   UINT16   ZZ0[2];
   UINT16   FLAGS;//??
   UINT16   ZZ1[27];
}
PSX_FF8_SKJ;
typedef struct
{

   UINT8    U;
   UINT8    V;
}
PSX_FF8_UV;
typedef struct
{
   PSX_FF8_UV     UV[4];   // 8
   UINT32         ZZ0;     // 4

   UINT16         ZZ1[4];  // 8
   UINT32         Type;    // 4
   UINT32         ZZ2[2];  // 8
   UINT16         Edge[8]; // 16
   PSX_FF7_CLR    Colors[4];// 16
}
PSX_FF8_FACE;


They provide 8 edge spaces but only 6 are used for triangles and 8 for quads.
I've not bothered with the UV data yet as I just want the actual 'frame' to show first.  I'm wondering if the coordinates are relative to each other in FF8.
The Skeleton Joint information seems mostly empty it has a few things and that's about it.
I'm baffled over the edge information and how to use it at this time.
I think the second set of Index values is how the polygons are jamed together, but I can't be sure as I have no idea what I'm looking at :)


Cyb

Darkdevil

  • Freak
  • *
  • Posts: 733
  • Karma: 0
    • View Profile
    • Http://darkdevil177.5u.com
"Cracking" FFVIII model data
« Reply #32 on: 2004-05-25 15:48:15 »
Quote from: Cyberman

They provide 8 edge spaces but only 6 are used for triangles and 8 for quads.
I've not bothered with the UV data yet as I just want the actual 'frame' to show first.  I'm wondering if the coordinates are relative to each other in FF8.
The Skeleton Joint information seems mostly empty it has a few things and that's about it.
I'm baffled over the edge information and how to use it at this time.
I think the second set of Index values is how the polygons are jamed together, but I can't be sure as I have no idea what I'm looking at :)


Cyb



Oh no I've gone crosseyed :z

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Cracking" FFVIII model data
« Reply #33 on: 2004-06-07 05:35:19 »
Quote from: darkdevil

Oh no I've gone crosseyed :z

You qouted part of a long post and said you went cross eyed. I donno.. are you just posting for the heck of it?

Cyb

Darkdevil

  • Freak
  • *
  • Posts: 733
  • Karma: 0
    • View Profile
    • Http://darkdevil177.5u.com
"Cracking" FFVIII model data
« Reply #34 on: 2004-06-07 08:34:31 »
Myeah, I was having on of those days, sorry.

Creative Inc

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #35 on: 2004-07-17 19:28:15 »
Any progress? I'd really like to be able to have the ff8 character models in Milkshape 3D or 3DS Max someday.

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Cracking" FFVIII model data
« Reply #36 on: 2004-07-19 11:11:24 »
Can be done, as you see few pics in my posts ... I just have to make new release of Biturn.

Creative Inc

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #37 on: 2004-07-24 19:35:57 »
Have you updated Biturn yet. Sorry for bugging, however, I live, eat and sleep ff8 :)

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Cracking" FFVIII model data
« Reply #38 on: 2004-07-25 10:59:22 »
not yet. I'll put a reminder to upload it.

-- edit --
ok here is some raw alpha version, its buggy but it should be able to see FF8 field files with extensions .MCH. There are two mch's included in archive.
http://bin.mypage.sk/FILES/Biturn_086alpha1.rar

Creative Inc

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #39 on: 2004-07-27 17:22:22 »
Hey, thanks man. Unfortunately, I'm stuck at my cousins house for the week with a comuter that was made like 6 years ago and it can't do anything big without crashing... So I'll have to get it sometime this weekend.

Almighty_gir

  • Crazy poster
  • *
  • Posts: 242
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #40 on: 2004-07-27 18:16:20 »
i cant even find files with those extensions lol.... i wish i payed more attention to learning this kinda stuf... ive been too busy modeling :P

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Cracking" FFVIII model data
« Reply #41 on: 2004-07-28 04:11:43 »
Quote from: Almighty_gir
i cant even find files with those extensions lol.... i wish i payed more attention to learning this kinda stuf... ive been too busy modeling :P

As in playing with 3d models or the other kind of modeling? :D

As for FF8 models etc.

I should be getting to speed on fixing the myriad of bugs in TV so as odd as this sounds, I'll be visiting FF8 data after I rewrite FF7s stuff.  

I have decided the sanest way to handle everything is to have an intermediary object system to handle the rendering instead of using the original data.  This will do the following:
[list=1]
  • Eliminate the current chicken egg texturing problem and insure the textures are initialized correctly.
  • Insures the Object data doesn't need any goofy special handling and each object is treated the same.
  • Removes the need to have seperate rendering segments for each file type (IE FF7 character FF7 background FF7 field character FF7 field NPC FF7 battle scene FF8 character etc etc)
  • Reduce the over all clumsy code and make a more universal approach to generating other object formats fot output instead of dumping things to a big text object.
  • [/list:o]

    Cyb

Almighty_gir

  • Crazy poster
  • *
  • Posts: 242
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #42 on: 2004-07-28 05:13:12 »
http://www.uglypeople.com/uploaded/11711/0067.jpg

you decide which kind of modeling :P


naw, ive been busy working on a few ff7 characters, check the general section of this forum for a wallpaper i made of one of them.

also, if were on about cracking model data, would it be safe to assume, that in theory, once this is done, i could put a different character model into ff8 in place of another? i understand i would need that characters skeleton, and to rig them to it n all (worlds crappyest job appart from skinmapping)

mirex

  • No life
  • *
  • Posts: 1651
  • Karma: 1
    • View Profile
    • http://mirex.mypage.sk
"Cracking" FFVIII model data
« Reply #43 on: 2004-07-29 06:52:27 »
Creative Inc: have you tried it ? Did it work ?
Almighty_gir: you have to unpack those big .fi .fl files, inside there are field .mch files.

Almighty_gir

  • Crazy poster
  • *
  • Posts: 242
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #44 on: 2004-07-30 01:00:00 »
ahhh mirex forever my saviour. unfortunately my ff8 disks were involved in an accident recently, and i dont believe in cracks...so im trying to find somewhere that still sells it >_<

Darkdevil

  • Freak
  • *
  • Posts: 733
  • Karma: 0
    • View Profile
    • Http://darkdevil177.5u.com
"Cracking" FFVIII model data
« Reply #45 on: 2004-07-30 08:39:51 »
Quote from: Almighty_gir
ahhh mirex forever my saviour. unfortunately my ff8 disks were involved in an accident recently, and i dont believe in cracks...so im trying to find somewhere that still sells it >_<



Very commendable...I know more than a few people who would instantaneously go and download a crack from the net should that happen.

Almighty_gir

  • Crazy poster
  • *
  • Posts: 242
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #46 on: 2004-07-30 18:42:35 »
well...if i owned the cd's and didnt want to use them, thats one thing, but in this instance it would mean downloading the full game, so....i think thats wrong....

anyway, on topic, if anyone could send me the model for squall, and seifer, in 3ds format, that would be awsome :D

Cyberman

  • No life
  • *
  • Posts: 1575
  • Karma: 8
    • View Profile
"Cracking" FFVIII model data
« Reply #47 on: 2004-07-30 23:18:57 »
Quote from: Almighty_gir
well...if i owned the cd's and didnt want to use them, thats one thing, but in this instance it would mean downloading the full game, so....i think thats wrong....

anyway, on topic, if anyone could send me the model for squall, and seifer, in 3ds format, that would be awsome :D

If you are at 56K that's a pain. 256K it's less. However it's a gray area, I don't think I want to go there personally. :)

Nope wish I did though.  I suppose as soon as I finish the base model changes om TV I will start looking at export options for the models.  Right now I just have to make bone and joint objects and then create the skeleton object.  It sounds complicated, but that's because it is.  There is no easy way to do it, that seems to be my conclusion.

Cyb

Creative Inc

  • Fast newbie
  • *
  • Posts: 29
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #48 on: 2004-07-31 00:30:45 »
@Mirex: I'll let you know in the next 10 minutes. Just got back from my cousins house.

EDIT: Hey! whaddua know! It works. great job man.

sfx1999

  • No life
  • *
  • Posts: 1143
  • Karma: 0
    • View Profile
"Cracking" FFVIII model data
« Reply #49 on: 2004-07-31 01:24:33 »
At least you know where your FF8 CDs are. Mine disappered.

Wahhh!

BTW, I think you can get the publisher to replace CDs for a fee.