Author Topic: FF7 Crisis Core - File Format and Data Investigation  (Read 113997 times)

ShinRa Inc

  • Insane poster
  • *
  • Posts: 416
  • Karma: 0
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Re: FF7 Crisis Core - File Format Investigation
« Reply #50 on: 2009-01-31 00:15:35 »
Having spent most of the day just trying to browse through the textures, a couple of notes;

I'm using Windows XP and seem to be having the same issue as the vista users on clicking the file and it not loading;  I've found that trying to switch files too quickly is what does that, mostly.  Taking a slower, deliberate approach to select better results.

Something of a dumb question, but is it possible that there can be multiple texture files inside some of the Model .raws?  Some of the larger, more detailed textures seem to only have half the character model on them.

Also, it seems that their's a few environment models/textures around 02400, then it moves back into enemy models.

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
Re: FF7 Crisis Core - File Format Investigation
« Reply #51 on: 2009-01-31 01:57:57 »
those "half-character textures" are just high qualiy face textures. that's for when the lips actualy move (close-ups) and isnt just 2 face textures alternating for speech. they dont need the rest of the body because its already as high detailed as needed. i've come across this kinda stuff before in my KHII modding days. to be honest, those model files are probably only the head.

@Koral, if you really need help, i know my way round a hex editor pretty well, enough to search for patterns in code like this. if you want, i suppose i wont mind taking a look for ya.

ShinRa Inc

  • Insane poster
  • *
  • Posts: 416
  • Karma: 0
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Re: FF7 Crisis Core - File Format Investigation
« Reply #52 on: 2009-01-31 03:31:18 »
those "half-character textures" are just high qualiy face textures. that's for when the lips actualy move (close-ups) and isnt just 2 face textures alternating for speech. they dont need the rest of the body because its already as high detailed as needed. i've come across this kinda stuff before in my KHII modding days. to be honest, those model files are probably only the head.

I thoght so too, but there's a few headless texture sets, too;

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
Re: FF7 Crisis Core - File Format Investigation
« Reply #53 on: 2009-01-31 13:28:05 »
probably for the HQ models that already have HQ head textures. thats all i can guess at...

koral

  • Guest
Re: FF7 Crisis Core - File Format Investigation
« Reply #54 on: 2009-01-31 16:07:06 »
yeesh, I just updated my first post with all the new knowledge that has been posted, and it wasn't easy. Practically working blind not being able to preview how the formatting stayed.
I might have missed some important bits, or confused other things and dumped them into the wrong section, so please be nice  :oops:

Thankyou to everyone who has helped contribute something!  :-D


ShinRa, yes the viewer has an awkard and bulky user-interface and I apologise if its too much of a pain  :-(
I'm trying to work with MSVC's Forms, but Irrlicht isn't behaving very well under the new environment, so I don't know if I will ever be able to fully get away from the irrlicht's GUI.
Just keep clicking something if it doesn't update. There are so many files I can understand the pain of unknowingly missing a few

About those "split-textures", NeoCloudstrife is right they are just higher-quality textures (and models) of the head and torso split like this to make it more efficient. No point loading a super high-quality model if only the head will be shown, right?

And I am absolutely certain that there are only the one Texture chunk inside those [!] files. None of the offsets in the header have led me to multiple textures yet


I'm beginning to believe that the Mesh data is not inside those [!] files, but maybe stored elsewhere. I can't spot any vertices at all inside [unknown-chunk-2] even though there is a lot of data present.
The other alternative is that the data is compressed, encrypted or "interpolated" for PSP-rendering-efficiency.

I wont be able to decipher this one easily, that's for sure.  :|

Maybe its time to look into other files I haven't even considered yet, and wait until I can get some solid leads before returning to these [!] files again
 :-D

spidergaby

  • Fast newbie
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
Re: FF7 Crisis Core - File Format Investigation
« Reply #55 on: 2009-01-31 16:32:41 »
I believe in you courage !!!  :-)

ShinRa Inc

  • Insane poster
  • *
  • Posts: 416
  • Karma: 0
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
Re: FF7 Crisis Core - File Format Investigation
« Reply #56 on: 2009-01-31 18:44:03 »
Not complaining really, Koral, just trying to give some useful feedback.  I'm generally just happy to see some work being done on the newer games (:

koral

  • Guest
Re: FF7 Crisis Core - File Format Investigation
« Reply #57 on: 2009-01-31 23:17:22 »
thanks spidergaby, and don't worry about it ShinRa I know you weren't complaining  :-D

ignitz can I ask you something?

I've added in the character-codes to read those [MBD] scripts and everything is working absolutely fine. But its all in one line and I can't figure out what other codes mean.
In your dumps, you used tags like "<NL>" (which obviously mean newline) and "<END>" (end of that person talking?) but I'm not sure what codes they are, how many different ones, etc, etc.

Do you have a list of those "OS" codes?
I think they all start with "40" rather than "80" but I might be wrong.

If you don't then it wont matter, I will just have to use trial-and-error to work out the important ones, so don't go out of your way or anything  :lol:



On a side note, I found that those [ATEL] files also contain [GT] and [!] file-chunks! I totally wasn't expecting them, but they are there, plain as daylight (almost).
the [GT] files are a little different from the Chapter-End images though, and look like they have a different kind of format (I think zande hinted this a LONG time ago).
[!] files will be tricky to load, because I dont think I can make the viewer view chunks in a chunk

Lots of other files might have these kinds of different files too, so I have changed how the viewer handles unknown files now. Instead of ignoring them completely, the viewer will try to find all known file-type chunk headers and list them out regardless. It might help to discover some more interesting things!

I'll upload the new version as soon as I can get these [MBD] scripts showing correctly, which should be in a day or two I think :wink:

ignitz

  • Fast newbie
  • *
  • Posts: 44
  • Karma: 0
    • View Profile
Hi Koral.
Sorry to wait.
here my my table now
Code: [Select]
0C000000=<???TEXT>
01000000=<STRING>\n
40020000=<NL>\n
40030000=<UNK1>
40040000=<END>\n\n
40050001=<M-CHOICE1>
40050002=<M-CHIOCE2>
40050003=<M-CHOICE3>
40050004=<M-CHOICE4>
40050005=<M-CHOICE5>
40050006=<M-CHOICE6>
40050007=<M-CHOICE7>
40050008=<M-CHOICE8>
40060000=<CROSS-PAD>
40070000=<CROSS-SQUARE>
402B0000=<VAR1>
402C0000=<VAR2>
402D0000=<VAR3>
40110000=<VAR4>
40120000=<VAR5>
4D424400=<MDB>
40100000=<CHOICE1>
40050101=<CHOICE2>
40360000=<FUNCTION1>
80000000=A
80000100=B
80000200=C
80000300=D
80000400=E
80000500=F
80000600=G
80000700=H
80000800=I
80000900=J
80000A00=K
80000B00=L
80000C00=M
80000D00=N
80000E00=O
80000F00=P
80001000=Q
80001100=R
80001200=S
80001300=T
80001400=U
80001500=V
80001600=W
80001700=X
80001800=Y
80001900=Z
80001A00=a
80001B00=b
80001C00=c
80001D00=d
80001E00=e
80001F00=f
80002000=g
80002100=h
80002200=i
80002300=j
80002400=k
80002500=l
80002600=m
80002700=n
80002800=o
80002900=p
80002A00=q
80002B00=r
80002C00=s
80002D00=t
80002E00=u
80002F00=v
80003000=w
80003100=x
80003200=y
80003300=z
80003400=0
80003500=1
80003600=2
80003700=3
80003800=4
80003900=5
80003A00=6
80003B00=7
80003C00=8
80003D00=9
80003E00=!
80003F00=?
80004000=
80004100="
80004200='
80004300=,
80004400=.
80004500=:
80004600=;
80004700=--
80004800=/
80004900=(
80004A00=)
80004B00=$
80004C00=<
80004D00=>
80004E00=%
80004F00=[
80005000=]
80005100=YEN
[email protected]
80005300=#
80005400=_
80005500=|
80005600=^
80005700=º
80005800=-
80005900=+
80005A00==
000000000C000000=<0TEXT>
010000000C000000=<1TEXT>
020000000C000000=<2TEXT>
030000000C000000=<3TEXT>
040000000C000000=<4TEXT>
050000000C000000=<5TEXT>
060000000C000000=<6TEXT>
070000000C000000=<7TEXT>
080000000C000000=<8TEXT>
090000000C000000=<9TEXT>
0A0000000C000000=<10TEXT>
0B0000000C000000=<11TEXT>
0C0000000C000000=<12TEXT>
0D0000000C000000=<13TEXT>
0E0000000C000000=<14TEXT>
0F0000000C000000=<15TEXT>
100000000C000000=<16TEXT>
110000000C000000=<17TEXT>
120000000C000000=<18TEXT>
130000000C000000=<19TEXT>
140000000C000000=<20TEXT>
150000000C000000=<21TEXT>
160000000C000000=<22TEXT>
170000000C000000=<23TEXT>
180000000C000000=<24TEXT>
190000000C000000=<25TEXT>
1A0000000C000000=<26TEXT>
1B0000000C000000=<27TEXT>
1C0000000C000000=<28TEXT>
1D0000000C000000=<29TEXT>
1E0000000C000000=<30TEXT>
1F0000000C000000=<31TEXT>
200000000C000000=<32TEXT>
210000000C000000=<33TEXT>
220000000C000000=<34TEXT>
230000000C000000=<35TEXT>
240000000C000000=<36TEXT>
250000000C000000=<37TEXT>
260000000C000000=<38TEXT>
270000000C000000=<39TEXT>
280000000C000000=<40TEXT>
290000000C000000=<41TEXT>
2A0000000C000000=<42TEXT>
2B0000000C000000=<43TEXT>
2C0000000C000000=<44TEXT>
2D0000000C000000=<45TEXT>
2E0000000C000000=<46TEXT>
2F0000000C000000=<47TEXT>
300000000C000000=<48TEXT>
310000000C000000=<49TEXT>
320000000C000000=<50TEXT>
330000000C000000=<51TEXT>
340000000C000000=<52TEXT>
350000000C000000=<53TEXT>
360000000C000000=<54TEXT>
370000000C000000=<55TEXT>
380000000C000000=<56TEXT>
390000000C000000=<57TEXT>
3A0000000C000000=<58TEXT>
3B0000000C000000=<59TEXT>
3C0000000C000000=<60TEXT>
3D0000000C000000=<61TEXT>
3E0000000C000000=<62TEXT>
3F0000000C000000=<63TEXT>
400000000C000000=<64TEXT>
410000000C000000=<65TEXT>
420000000C000000=<66TEXT>
430000000C000000=<67TEXT>
440000000C000000=<68TEXT>
450000000C000000=<69TEXT>
460000000C000000=<70TEXT>
470000000C000000=<71TEXT>
480000000C000000=<72TEXT>
490000000C000000=<73TEXT>
4A0000000C000000=<74TEXT>
4B0000000C000000=<75TEXT>
4C0000000C000000=<76TEXT>
4D0000000C000000=<77TEXT>
4E0000000C000000=<78TEXT>
4F0000000C000000=<79TEXT>
500000000C000000=<80TEXT>
510000000C000000=<81TEXT>
520000000C000000=<82TEXT>
530000000C000000=<83TEXT>
540000000C000000=<84TEXT>
550000000C000000=<85TEXT>
560000000C000000=<86TEXT>
570000000C000000=<87TEXT>
580000000C000000=<88TEXT>
590000000C000000=<89TEXT>
5A0000000C000000=<90TEXT>
5B0000000C000000=<91TEXT>
5C0000000C000000=<92TEXT>
5D0000000C000000=<93TEXT>
5E0000000C000000=<94TEXT>
5F0000000C000000=<95TEXT>
600000000C000000=<96TEXT>
610000000C000000=<97TEXT>
620000000C000000=<98TEXT>
630000000C000000=<99TEXT>
640000000C000000=<100TEXT>
650000000C000000=<101TEXT>
660000000C000000=<102TEXT>
670000000C000000=<103TEXT>
680000000C000000=<104TEXT>
690000000C000000=<105TEXT>
6A0000000C000000=<106TEXT>
6B0000000C000000=<107TEXT>
6C0000000C000000=<108TEXT>
6D0000000C000000=<109TEXT>
6E0000000C000000=<110TEXT>
6F0000000C000000=<111TEXT>
700000000C000000=<112TEXT>
710000000C000000=<113TEXT>
720000000C000000=<114TEXT>
730000000C000000=<115TEXT>
740000000C000000=<116TEXT>
750000000C000000=<117TEXT>
760000000C000000=<118TEXT>
770000000C000000=<119TEXT>
780000000C000000=<120TEXT>
790000000C000000=<121TEXT>
7A0000000C000000=<122TEXT>
7B0000000C000000=<123TEXT>
7C0000000C000000=<124TEXT>
7D0000000C000000=<125TEXT>
7E0000000C000000=<126TEXT>
7F0000000C000000=<127TEXT>
800000000C000000=<128TEXT>
810000000C000000=<129TEXT>
820000000C000000=<130TEXT>
830000000C000000=<131TEXT>
840000000C000000=<132TEXT>
850000000C000000=<133TEXT>
860000000C000000=<134TEXT>
870000000C000000=<135TEXT>
880000000C000000=<136TEXT>
890000000C000000=<137TEXT>
8A0000000C000000=<138TEXT>
8B0000000C000000=<139TEXT>
8C0000000C000000=<140TEXT>
8D0000000C000000=<141TEXT>
8E0000000C000000=<142TEXT>
8F0000000C000000=<143TEXT>
900000000C000000=<144TEXT>
910000000C000000=<145TEXT>
920000000C000000=<146TEXT>
930000000C000000=<147TEXT>
940000000C000000=<148TEXT>
950000000C000000=<149TEXT>
960000000C000000=<150TEXT>
970000000C000000=<151TEXT>
980000000C000000=<152TEXT>
990000000C000000=<153TEXT>
9A0000000C000000=<154TEXT>
9B0000000C000000=<155TEXT>
9C0000000C000000=<156TEXT>
9D0000000C000000=<157TEXT>
9E0000000C000000=<158TEXT>
9F0000000C000000=<159TEXT>
A00000000C000000=<160TEXT>
A10000000C000000=<161TEXT>
A20000000C000000=<162TEXT>
A30000000C000000=<163TEXT>
A40000000C000000=<164TEXT>
A50000000C000000=<165TEXT>
A60000000C000000=<166TEXT>
A70000000C000000=<167TEXT>
A80000000C000000=<168TEXT>
A90000000C000000=<169TEXT>
AA0000000C000000=<170TEXT>
AB0000000C000000=<171TEXT>
AC0000000C000000=<172TEXT>
AD0000000C000000=<173TEXT>
AE0000000C000000=<174TEXT>
AF0000000C000000=<175TEXT>
B00000000C000000=<176TEXT>
B10000000C000000=<177TEXT>
B20000000C000000=<178TEXT>
B30000000C000000=<179TEXT>
B40000000C000000=<180TEXT>
B50000000C000000=<181TEXT>
B60000000C000000=<182TEXT>
B70000000C000000=<183TEXT>
B80000000C000000=<184TEXT>
B90000000C000000=<185TEXT>
BA0000000C000000=<186TEXT>
BB0000000C000000=<187TEXT>
BC0000000C000000=<188TEXT>
BD0000000C000000=<189TEXT>
BE0000000C000000=<190TEXT>
BF0000000C000000=<191TEXT>
C00000000C000000=<192TEXT>
C10000000C000000=<193TEXT>
C20000000C000000=<194TEXT>
C30000000C000000=<195TEXT>
C40000000C000000=<196TEXT>
C50000000C000000=<197TEXT>
C60000000C000000=<198TEXT>
C70000000C000000=<199TEXT>
C80000000C000000=<200TEXT>
C90000000C000000=<201TEXT>
CA0000000C000000=<202TEXT>
CB0000000C000000=<203TEXT>
CC0000000C000000=<204TEXT>
CD0000000C000000=<205TEXT>
CE0000000C000000=<206TEXT>
CF0000000C000000=<207TEXT>
D00000000C000000=<208TEXT>
D10000000C000000=<209TEXT>
D20000000C000000=<210TEXT>
D30000000C000000=<211TEXT>
D40000000C000000=<212TEXT>
D50000000C000000=<213TEXT>
D60000000C000000=<214TEXT>
D70000000C000000=<215TEXT>
D80000000C000000=<216TEXT>
D90000000C000000=<217TEXT>
DA0000000C000000=<218TEXT>
DB0000000C000000=<219TEXT>
DC0000000C000000=<220TEXT>
DD0000000C000000=<221TEXT>
DE0000000C000000=<222TEXT>
DF0000000C000000=<223TEXT>
E00000000C000000=<224TEXT>
E10000000C000000=<225TEXT>
E20000000C000000=<226TEXT>
E30000000C000000=<227TEXT>
E40000000C000000=<228TEXT>
E50000000C000000=<229TEXT>
E60000000C000000=<230TEXT>
E70000000C000000=<231TEXT>
E80000000C000000=<232TEXT>
E90000000C000000=<233TEXT>
EA0000000C000000=<234TEXT>
EB0000000C000000=<235TEXT>
EC0000000C000000=<236TEXT>
ED0000000C000000=<237TEXT>
EE0000000C000000=<238TEXT>
EF0000000C000000=<239TEXT>
F00000000C000000=<240TEXT>
F10000000C000000=<241TEXT>
F20000000C000000=<242TEXT>
F30000000C000000=<243TEXT>
F40000000C000000=<244TEXT>
F50000000C000000=<245TEXT>
F60000000C000000=<246TEXT>
F70000000C000000=<247TEXT>
F80000000C000000=<248TEXT>
F90000000C000000=<249TEXT>
FA0000000C000000=<250TEXT>
FB0000000C000000=<251TEXT>
FC0000000C000000=<252TEXT>
FD0000000C000000=<253TEXT>
FE0000000C000000=<254TEXT>
FF0000000C000000=<255TEXT>

As you can see, after MBD header must have 01 00 00 00 hex code.
This is the start of a string. 01000000=<STRING>\n
An example in 01469.raw
in MBD files have 01000000 0E000000 0C000000
01000000 = Start String
E0000000 = Number of chars EX: 0x0e = 14 decimal
then
MBD  01000000            0E000000               0C000000
        STRING CODE          14 CHAR             UNK CODE (ALL TIME HAVE THIS SAME CODE)
      S              a            v               e       <SPACE>        f             a            i                 l            e             d              {.}       <NL>       <END>
80001200 80001A00 80002F00 80001E00 80004000 80001F00 80001A00 80002200 80002500 80001E00 80001D00 80004400 40020000 40040000
1             2              3             4             5             6             7              8             9             10             11             12             13             14

----------------------------------------------------------------
<MDB><STRING>
<14TEXT>Save failed.<NL>
<END>

----------------------------------------------------------------
01000000                 09000000               0C000000
STRING CODE             9 CHAR               UNK CODE (ALL TIME HAVE THIS SAME CODE)

<VARIABLE>      {:}      <SPACE>       O              p              e           n            <NL>     <END>
40110000     80004500 80004000 80000E00 80002900 80001E00 80002700 40020000 40040000
       1                2             3             4               5             6            7              8             9

----------------------------------------------------------------
<STRING>
<9TEXT><VAR4>: Open<NL>
<END>
----------------------------------------------------------------

In the string is this with TableLib dumper with my table.

Code: [Select]
// 01469.raw CRISISCORE - Final Fantasy VII - Script Dump [$297A0-$29AFF] - Fri Jan 30 04:10:32 2009
//Script extracted by IGNITZ
//www.cetranslators.com.br

// [$297A0]
<MDB><STRING>
<14TEXT>Save failed.<NL>
<END>

// [$297E8]
<STRING>
<9TEXT><VAR4>: Open<NL>
<END>

// [$29818]
<1TEXT><???TEXT><VAR4>: Pick up<NL>
<END>

// [$29854]
<1TEXT><???TEXT><VAR4>: Examine<NL>
<END>

// [$29890]
<STRING>
<9TEXT><VAR4>: Talk<NL>
<END>

// [$298C0]
<STRING>
<17TEXT>Obtained <VAR4> x <VAR5>!<NL>
<END>

// [$29910]
<STRING>
<17TEXT>Obtained <VAR4> gil!<NL>
<END>

// [$29960]
<STRING>
<27TEXT>SP increased by <VAR4> points!<NL>
<END>

// [$299D8]
<STRING>
<23TEXT><CROSS-PAD><FUNCTION1><FUNCTION1>: Save<NL>
<CROSS-SQUARE><FUNCTION1><FUNCTION1>: Delete<NL>
<END>

// [$29A40]
<STRING>
<24TEXT>New mission available!<NL>
<END>

// [$29AAC]
<STRING>
<18TEXT>You've got mail!<NL>
<END>


If you want I can send my files XD with tools, but with this post I cleared the struct of files MBD.
The pointers I don't find yet, it's been maybe in the initial struct Atel file
Or maybe be compressed in before MBD file

TIP: Multiple x4 for the count char to take the size of string.
« Last Edit: 2009-02-01 08:12:14 by ignitz »

spidergaby

  • Fast newbie
  • *
  • Posts: 22
  • Karma: 0
    • View Profile
...oh noooo....what's that with the viewer ?  :-P


koral

  • Guest
ignitz, THANKYOU!!!  :lol:
I have it all working properly!

spider, are you using Vista too?
It might be because of the ugly OpenGL support that Vista has, so I have now changed the renderer to Sofware instead of OGL. This should work on all OS's the same.


And here is the latest version (v0.30): http://www.mediafire.com/?y3emvodmyzi

New features and changes:

- Now shows [MBD] scripts as simple textfiles (there is no scroll-bar, but you can use the arrow keys to scroll up or down, or ctrl+A and paste into notepad)
- Export out RAW-data chunks or Textures as PNG images
- Tried to make the User-Interface a little easier on the eyes


I think file "00000.raw" is special, here is a copy of the script:
Code: [Select]
<TEXT>
Where do you want to go?
<M-CHOICE>
 Battle
 Ms. Ishibashi
 Mr. Oka
 Mr. Kitase
 Mr. Kunikata
 Mr. Shindo
 Mr. Terada
 Mr. Maeda
 Moriya kun
<END>

Its a menu which has elements named after the game producers! Maybe its a Debug-Menu?

I'm not sure what I should do next  :|
Models would be nice, but it's useless without vertices

I will just wait I suppose, step down a gear, wait until someone can spot something worth looking into.

Have fun!  :-)

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
I'm not sure what I should do next  :|
Models would be nice, but it's useless without vertices

I will just wait I suppose, step down a gear, wait until someone can spot something worth looking into.

Have fun!  :-)

Model's would be great. i'll help as much as i can  :wink:
shouldnt be long before we find something!

ultima espio

  • No life
  • *
  • Posts: 1359
  • Karma: 20
    • View Profile
i would love to help you look for the vertex data but i dont know what i'm looking for...if you kow what i mean. If someone could help me there i'd appreciate it. :-)

ignitz

  • Fast newbie
  • *
  • Posts: 44
  • Karma: 0
    • View Profile
The pointer of MBD files maybe be in teh opcodes or compressed in before of MBD header. I give up.
Without PSP is so hard.

Koral thanks for the tools. Be very cool, you make a nice JOB. :mrgreen:
The fonts work perfect now with your tool, thanks.


ultima espio

  • No life
  • *
  • Posts: 1359
  • Karma: 20
    • View Profile
I was browsing through the text files, and i happened to find this in 01859.raw. The bold bits are what you should take note of.

<TEXT>
Materia has leveled up!
<END>

<TEXT>
Nothing more to do, kupo!
<END>

<TEXT>
Load failed.
<END>

<TEXT>
Load canceled.
<END>

<TEXT>
<CHOICE1>: Open
<END>

<TEXT>
<CHOICE1>: Push
<END>

<TEXT>
<CHOICE1>: Go up
<END>

<TEXT>
<TEXT>
<CHOICE1>: Go down
<END>

<TEXT>
<CHOICE1>: Use elevator
<END>

<TEXT>
<CHOICE1>: Use gondola
<END>

<TEXT>
<CHOICE1>: Rotate
<END>

<TEXT>
<CHOICE1>: Read
<END>

<TEXT>
<CHOICE1>: Move
<END>

<TEXT>
<TEXT>
<CHOICE1>: Examine
<END>

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
Been doing some looking in the [!] files.

Seems characters models are in the second chunk, that being the largest. i've found vertex data there that is *almost* identical to that of KHII models.
Seems very familliar, particularly because of the "3F80"'s that keep appearing.

I can pretty much confirm that i have definately found 3D model data:


if picture is too small, click here

On the left is some of the data in an MDLX model from KHII, although, what's important is the right side.
now, i'm not a genious, but i have done vertex hacking before, and i THINK i've figured this out...

on the right, we have the crisis core [!] file for tifa open at the model section.
Now, i could be wrong, but this looks very promising.

Section "A" in the tifa model appears to contain information regarding parent/child/sibling verticies and what have you. we can see this by looking at their functions. they both appear to be "LUI"ing "$c123", however, the line above that is "LUI"ing something different. this brings me to (almost) understand the first twelve bytes of Code:

First four bytes: Parent vertex.
Second four bytes: Child Vertex
Third Four bytes: Sibling vertex

now, that would make sense, right? seeing as the picture you can see it at the very first of the datablocks, and it would have no parent verticies.

Section B is completely unknown to me. i have no idea what it is, i only understand that it varies quite a lot. possibly its some sort of "normal" type thing. only speculation though. Apparently, it could also be some sort of rotation information.

If anything contains coordinate information, its Section C. there are THREE two-byte things going on. X, Y, Z. c'mon, looks pretty obvious, wouldnt you say so?

So, to conclude, these datablocks DO vary a little from time to time, with random padding and such, but other than that, i appear to have somewhat deciphered this. If it's no good, koral, it'll be back to the drawing board XD

I REALLY hope this helps you render those models koral :D
« Last Edit: 2009-02-02 17:45:46 by NeoCloudstrife »

koral

  • Guest
 :-D :-D
you're right neocloud, there is definitly an obvious pattern there with 4-dwords and 4-shorts (last short always a zero)
I just tried reading a block of them, but after 10 or so "groups" the data messes up because of the unexplained padding.

But you've confirmed it: mesh data (aka vertices) are most definitly present within the [!] files in [Uknown Chunk 2]

To call them "character files" would be a bit of an understatement, because I've seen simple things like barrels too. Bones are probably optional though, but maybe what they really are Animated Model Files.

I noticed that the [&&] files-chunks (also inside [ATEL] files) are almost identical to the [!] files except the header is smaller and contains less inner-sections. So those are most likely Static-Mesh Model files (maybe the model of the Location Map itself?).

No need to go back to the drawing-board, if we can figure out how the padding seems to work then that should allow us to get have enough vertices to render out.
i think there might be some sort of tag or code (like in [MBD] files) which determines how the current or next "group" should be read.

Or maybe they are Polygons? Then the multiple-dwords could contain indices for more than 3 vertices, explaining for the strange grouping.
Or maybe the groups are intentionally split based on the data from [unknown chunk 1], linked with the bones that they're attached with?

lots of possibilities! But at least you've given me something to think about  :-P


ultimo espio I noticed that too, those MBD scripts are in almost all [ATEL] files!
For some reason, the developers decided to use a Moogle and give it politely accurate scripts?!

I can only guess that its linked with the Debug-Menu thing, an event which can optionally be switched "on" but is off by default.
I wonder if there might be a keycode associated with it, or if its something which has to run during the game bootup. Could we somehow excecute the 00000.raw MBD manually?

Interesting possibilities right there
 :lol:

koral

  • Guest
okay, I've just stumbled across a possible 4-byte "vertex" tag in [unknown-chunk-2] :
(hex) 00 00 80 3f 
(dec) 00 00 128 63 

The size of these groupings tend to vary, but there is definitly something going on here

for example, file 02192.raw (Tifa), [unknown-chunk-2] bytes read 4 at a time:
(tag shown 'underlined')

Code: [Select]
0, 0, 0, 0,
1, 0, 12, 0,
0, 0, 1, 2,
35, 7, 0, 0,
0, 0, 3, 0,
24, 0, 0, 0,
0, 0, 128, 63,
-----------------------  1 
25, 91, 1, 63,
35, 193, 67, 63,
134, 34, 0, 0,
133, 246, 42, 79,
179, 254, 0, 0,
0, 0, 128, 63,
-----------------------  2 
130, 6, 16, 63,
35, 193, 67, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  3 
57, 241, 15, 63,
15, 218, 78, 63,
172, 34, 169, 0,
83, 248, 191, 75,
40, 249, 0, 0,
0, 0, 128, 63,
-----------------------  4 
57, 241, 15, 63,
15, 218, 78, 63,
84, 34, 169, 0,
173, 7, 191, 75,
40, 249, 0, 0,
0, 0, 128, 63,
-----------------------  5 
207, 170, 37, 63,
15, 218, 78, 63,
0, 37, 135, 0,
0, 0, 123, 75,
83, 247, 0, 0,
0, 0, 128, 63,
-----------------------  6 
130, 6, 16, 63,
35, 193, 67, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  7 
252, 50, 69, 62,
88, 11, 157, 62,
61, 146, 14, 0,
226, 254, 67, 68,
124, 254, 0, 0,
0, 0, 128, 63,
-----------------------  8 
163, 201, 85, 62,
108, 110, 153, 62,
0, 134, 222, 0,
0, 0, 179, 69,
218, 250, 0, 0,
0, 0, 128, 63,
-----------------------  9 
252, 50, 69, 62,
72, 197, 150, 62,
195, 146, 14, 0,
30, 1, 67, 68,
124, 254, 0, 0,
0, 0, 128, 63,
-----------------------  10 
161, 32, 66, 62,
198, 58, 239, 62,
61, 146, 14, 0,
226, 254, 67, 68,
124, 254, 0, 0,
0, 0, 128, 63,
-----------------------  11 
155, 32, 66, 62,
38, 112, 244, 62,
195, 146, 14, 0,
30, 1, 67, 68,
124, 254, 0, 0,
0, 0, 128, 63,
-----------------------  12 
4, 232, 82, 62,
4, 199, 241, 62,
0, 151, 71, 0,
0, 0, 108, 69,
165, 2, 0, 0,
0, 0, 128, 63,
-----------------------  13 
57, 241, 15, 63,
15, 218, 78, 63,
84, 34, 169, 0,
173, 7, 191, 75,
40, 249, 0, 0,
0, 0, 128, 63,
-----------------------  14 
130, 6, 16, 63,
35, 193, 67, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  15 
25, 91, 1, 63,
35, 193, 67, 63,
122, 34, 0, 0,
123, 9, 42, 79,
179, 254, 0, 0,
0, 0, 128, 63,
-----------------------  16 
130, 6, 16, 63,
35, 193, 67, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  17 
207, 170, 37, 63,
15, 218, 78, 63,
0, 37, 135, 0,
0, 0, 123, 75,
83, 247, 0, 0,
0, 0, 128, 63,
-----------------------  18 
57, 241, 15, 63,
15, 218, 78, 63,
172, 34, 169, 0,
83, 248, 191, 75,
40, 249, 0, 0,
0, 0, 128, 63,
-----------------------  19 
130, 6, 16, 63,
35, 193, 67, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  20 
207, 170, 37, 63,
15, 218, 78, 63,
0, 37, 135, 0,
0, 0, 123, 75,
83, 247, 0, 0,
0, 0, 128, 63,
-----------------------  21 
207, 170, 37, 63,
35, 193, 67, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 128, 63,
-----------------------  22 
207, 170, 37, 63,
35, 193, 67, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 128, 63,
-----------------------  23 
207, 170, 37, 63,
15, 218, 78, 63,
0, 37, 135, 0,
0, 0, 123, 75,
83, 247, 0, 0,
0, 0, 128, 63,
-----------------------  24 
130, 6, 16, 63,
35, 193, 67, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
1, 0, 16, 0,
0, 0, 3, 2,
35, 135, 0, 0,
0, 0, 3, 0,
1, 0, 5, 0,
2, 0, 6, 0,
48, 0, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
133, 29, 255, 0,
41, 249, 108, 86,
161, 0, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
186, 21, 153, 0,
110, 251, 143, 86,
177, 252, 0, 0,
0, 0, 128, 63,
-----------------------  25 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  26 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  27 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
236, 114, 61, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
70, 21, 153, 0,
146, 4, 143, 86,
177, 252, 0, 0,
0, 0, 128, 63,
-----------------------  28 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
87, 14, 90, 0,
223, 6, 162, 78,
63, 4, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
123, 29, 255, 0,
215, 6, 108, 86,
161, 0, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
73, 253, 103, 0,
148, 4, 147, 87,
249, 4, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
133, 29, 255, 0,
41, 249, 108, 86,
161, 0, 0, 0,
0, 0, 128, 63,
-----------------------  29 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
0, 0, 128, 63,
-----------------------  30 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
120, 24, 86, 63,
134, 34, 0, 0,
133, 246, 42, 79,
179, 254, 0, 0,
0, 0, 128, 63,
-----------------------  31 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
169, 14, 90, 0,
33, 249, 162, 78,
63, 4, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
133, 29, 255, 0,
41, 249, 108, 86,
161, 0, 0, 0,
0, 0, 128, 63,
-----------------------  32 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
120, 24, 86, 63,
134, 34, 0, 0,
133, 246, 42, 79,
179, 254, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
70, 21, 153, 0,
146, 4, 143, 86,
177, 252, 0, 0,
0, 0, 128, 63,
-----------------------  33 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
236, 114, 61, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
65, 168, 157, 62,
238, 114, 61, 63,
0, 0, 130, 0,
0, 0, 147, 86,
4, 252, 0, 0,
0, 0, 128, 63,
-----------------------  34 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
120, 24, 86, 63,
122, 34, 0, 0,
123, 9, 42, 79,
179, 254, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
123, 29, 255, 0,
215, 6, 108, 86,
161, 0, 0, 0,
0, 0, 128, 63,
-----------------------  35 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
87, 14, 90, 0,
223, 6, 162, 78,
63, 4, 0, 0,
0, 0, 128, 63,
-----------------------  36 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
70, 21, 153, 0,
146, 4, 143, 86,
177, 252, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
123, 29, 255, 0,
215, 6, 108, 86,
161, 0, 0, 0,
0, 0, 128, 63,
-----------------------  37 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
3, 98, 111, 63,
0, 255, 126, 0,
0, 0, 67, 78,
207, 5, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
73, 253, 103, 0,
148, 4, 147, 87,
249, 4, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
34, 19, 149, 62,
3, 98, 111, 63,
0, 250, 126, 0,
0, 0, 145, 87,
222, 5, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
65, 168, 157, 62,
238, 114, 61, 63,
0, 0, 130, 0,
0, 0, 147, 86,
4, 252, 0, 0,
0, 0, 128, 63,
-----------------------  38 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
236, 114, 61, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
186, 21, 153, 0,
110, 251, 143, 86,
177, 252, 0, 0,
0, 0, 128, 63,
-----------------------  39 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
120, 24, 86, 63,
122, 34, 0, 0,
123, 9, 42, 79,
179, 254, 0, 0,
0, 0, 128, 63,
-----------------------  40 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
67, 52, 163, 0,
0, 7, 154, 79,
130, 250, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
123, 29, 255, 0,
215, 6, 108, 86,
161, 0, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
34, 19, 149, 62,
3, 98, 111, 63,
0, 250, 126, 0,
0, 0, 145, 87,
222, 5, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
183, 253, 103, 0,
108, 251, 147, 87,
249, 4, 0, 0,
0, 0, 128, 63,
-----------------------  41 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
3, 98, 111, 63,
0, 255, 126, 0,
0, 0, 67, 78,
207, 5, 0, 0,
0, 0, 0, 0,
51, 51, 115, 63,
205, 204, 76, 61,
203, 247, 156, 62,
39, 8, 74, 63,
186, 21, 153, 0,
110, 251, 143, 86,
177, 252, 0, 0,
0, 0, 128, 63,
-----------------------  42 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
236, 114, 61, 63,
0, 48, 139, 0,
0, 0, 204, 79,
144, 249, 0, 0,
0, 0, 128, 63,
-----------------------  43 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
6, 24, 76, 63,
189, 52, 163, 0,
0, 249, 154, 79,
130, 250, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
183, 253, 103, 0,
108, 251, 147, 87,
249, 4, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
42, 207, 154, 62,
235, 142, 87, 63,
133, 29, 255, 0,
41, 249, 108, 86,
161, 0, 0, 0,
0, 0, 128, 63,
-----------------------  44 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
169, 14, 90, 0,
33, 249, 162, 78,
63, 4, 0, 0,
0, 0, 128, 63,
-----------------------  45 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
3, 98, 111, 63,
0, 255, 126, 0,
0, 0, 67, 78,
207, 5, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
183, 253, 103, 0,
108, 251, 147, 87,
249, 4, 0, 0,
0, 0, 128, 63,
-----------------------  46 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
169, 14, 90, 0,
33, 249, 162, 78,
63, 4, 0, 0,
0, 0, 128, 63,
-----------------------  47 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
92, 22, 98, 63,
87, 14, 90, 0,
223, 6, 162, 78,
63, 4, 0, 0,
0, 0, 0, 0,
102, 102, 102, 63,
205, 204, 204, 61,
74, 132, 137, 62,
57, 65, 98, 63,
73, 253, 103, 0,
148, 4, 147, 87,
249, 4, 0, 0,
0, 0, 128, 63,
-----------------------  48 
0, 0, 0, 0,
0, 0, 0, 0,
74, 97, 186, 62,
3, 98, 111, 63,
0, 255, 126, 0,
0, 0, 67, 78,
207, 5, 0, 0,
1, 0, 14, 0,
0, 0, 2, 2,
35, 71, 0, 0,
0, 0, 3, 0,
1, 0, 76, 0,
3, 0, 0, 0,
0, 0, 128, 63,
-----------------------  49 
0, 0, 0, 0,
57, 241, 15, 63,
15, 218, 78, 63,
172, 34, 169, 0,
83, 248, 191, 75,
40, 249, 0, 0,
0, 0, 0, 0,
0, 0, 128, 63,
-----------------------  50 
25, 91, 1, 63,
28, 63, 90, 63,
132, 11, 237, 0,
193, 244, 171, 70,
122, 254, 0, 0,
0, 0, 128, 63,
-----------------------  51 
0, 0, 0, 0,
25, 91, 1, 63,
35, 193, 67, 63,
134, 34, 0, 0,
133, 246, 42, 79,
179, 254, 0, 0,


this tag is also present in other [!] files, leading to similar breaks in the data, so its definitly not a coincidence (is anything a coincidence?  :-P)

i would have thought that the first few bytes after the tag would suggest something about the length of the data-block to come (something like a header) but there doesn't appear to be any kind of differentiating data until after 6 lines (24-bytes), when the tag doesn't appear again

could someone (neoCloud?) try to examine the bytes within these tag-groups to see if they can spot an obvious pattern of data?
I will try too, but it would help if I had other possible patterns to compare against, it would definitly help speed things up!  :wink:

koral

  • Guest
yay, I think I found out roughly how the vertex data might be stored like!

Starting from the beggining of [Unknown-Chunk-2]:  (again taking 02192.raw [Tifa] as reference)
Code: [Select]
Header: 24-bytes
  - 0x12  :  SHORT = number of Vertices to follow

Vertices: 28-byte blocks (times number in header)

  - LONG      = vertex-Tag (00 00 80 3f)

  - SHORT  1  = ?
  - SHORT  2  = X
  - SHORT  3  = Y
  - SHORT  4  = Z
  - BYTE   1  = U
  - BYTE   2  = V

  - LONG     = ? 4-bytes all zeros


Other data: ?? no idea


For the Tifa model, the header only gives 24 vertices initially, so it really isn't much to play with.
Here are the exact numbers out of the file: (vertex-tags hidden)

Code: [Select]

0, 0,   1, 12,    0, 0 ,3, 0,   24, 0, 0, 0                                // 24-byte header
23321, 16129,   -16093, 16195,    179, 254 ,0, 0,   1, 0, 16, 0            // vertices: ?, X,Y,Z, U,V, ? (shown as 4 bytes instead of long)
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   0, 0, 0, 0
-3783, 16143,   -9713, 16206,    40, 249 ,0, 0,   0, 0, 0, 0
-3783, 16143,   -9713, 16206,    40, 249 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -9713, 16206,    83, 247 ,0, 0,   0, 0, 0, 0
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   0, 0, 0, 0
13052, 15941,   2904, 16029,    124, 254 ,0, 0,   0, 0, 0, 0
-13917, 15957,   28268, 16025,    218, 250 ,0, 0,   0, 0, 0, 0
13052, 15941,   -15032, 16022,    124, 254 ,0, 0,   0, 0, 0, 0
8353, 15938,   15046, 16111,    124, 254 ,0, 0,   0, 0, 0, 0
8347, 15938,   28710, 16116,    124, 254 ,0, 0,   0, 0, 0, 0
-6140, 15954,   -14588, 16113,    165, 2 ,0, 0,   0, 0, 0, 0
-3783, 16143,   -9713, 16206,    40, 249 ,0, 0,   0, 0, 0, 0
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   0, 0, 0, 0
23321, 16129,   -16093, 16195,    179, 254 ,0, 0,   0, 0, 0, 0
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -9713, 16206,    83, 247 ,0, 0,   0, 0, 0, 0
-3783, 16143,   -9713, 16206,    40, 249 ,0, 0,   0, 0, 0, 0
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -9713, 16206,    83, 247 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -16093, 16195,    144, 249 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -16093, 16195,    144, 249 ,0, 0,   0, 0, 0, 0
-21809, 16165,   -9713, 16206,    83, 247 ,0, 0,   0, 0, 0, 0
1666, 16144,   -16093, 16195,    130, 250 ,0, 0,   1, 0, 16, 0
35, 135 ,0, 0,   0, 0, 3, 0                                      // data becomes messy afterwards, new header?
2, 0 ,6, 0,   48, 0, 0, 0
102, 102 ,102, 63,   205, 204, 204, 61
235, 142 ,87, 63,   133, 29, 255, 0
161, 0 ,0, 0,   0, 0, 0, 0
205, 204 ,76, 61,   203, 247, 156, 62
186, 21 ,153, 0,   110, 251, 143, 86


Funnily enough, I couldn't get a clean output from any of the other [!] model files. A lot of stuff is still rather fishy with my findings, but its a start  :wink:

The XYZ numbers don't feel right to me though, maybe too large and slightly rectangular.
I'll try to render these vertexes and see what they throw out. For all I know, it might just be gobbledegook  :lol:

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
Hey, i've got a question:
Me and a friend are trying to hack Crisis core. and with all this info, it'd be easy. only problem is, the file dumper dumps files in .raw format. this isnt the format that they originally are in the PKG. for instance, 02123.raw, which is zack's [!] file, isn't in the actual game as 02123.raw, or 02123.[!] or anything. does anyone know what they'd be called in the actual PKG file?

G

  • Crazy poster
  • *
  • Posts: 104
  • Karma: 0
  • , kupo.
    • View Profile
Quote
does anyone know what they'd be called in the actual PKG file?
I think, they are known only to Square developers.

Anyway, I can set proper extensions/filenames for files, if anyone would provide details, which file should be which, or better propose:
I would create text map file, where there would be possibility to set them by simply modification of it, for example:
0001 - "system.dat"
0002 - "text.bin"
...
and so on...

Current numeration order is based of course on offsets order.

Besides - great work on formats, koral!

koral

  • Guest
bahahaha *spongebob impersonation* bahahaha  :-D

I was wrong! The data isn't vertex positions, its UVs!

Code: [Select]
FLOAT, FLOAT, (8 unknown bytes making up 24-byte block)
File: 02192.raw
Code: [Select]
0.000000, 0.000000,  0, 0 ,3, 0,   24, 0, 0, 0           // header
0.505296, 0.764666,  179, 254 ,0, 0,   1, 0, 16, 0       // 2 floats = UV
0.562599, 0.764666,  130, 250 ,0, 0,   0, 0, 0, 0
0.562275, 0.808015,  40, 249 ,0, 0,   0, 0, 0, 0
0.562275, 0.808015,  40, 249 ,0, 0,   0, 0, 0, 0
0.647138, 0.808015,  83, 247 ,0, 0,   0, 0, 0, 0
0.562599, 0.764666,  130, 250 ,0, 0,   0, 0, 0, 0
0.192577, 0.306727,  124, 254 ,0, 0,   0, 0, 0, 0
0.208777, 0.299671,  218, 250 ,0, 0,   0, 0, 0, 0
0.192577, 0.294474,  124, 254 ,0, 0,   0, 0, 0, 0
0.189578, 0.467245,  124, 254 ,0, 0,   0, 0, 0, 0
0.189578, 0.477418,  124, 254 ,0, 0,   0, 0, 0, 0
0.205963, 0.472221,  165, 2 ,0, 0,   0, 0, 0, 0
0.562275, 0.808015,  40, 249 ,0, 0,   0, 0, 0, 0
0.562599, 0.764666,  130, 250 ,0, 0,   0, 0, 0, 0
0.505296, 0.764666,  179, 254 ,0, 0,   0, 0, 0, 0
0.562599, 0.764666,  130, 250 ,0, 0,   0, 0, 0, 0
0.647138, 0.808015,  83, 247 ,0, 0,   0, 0, 0, 0
0.562275, 0.808015,  40, 249 ,0, 0,   0, 0, 0, 0
0.562599, 0.764666,  130, 250 ,0, 0,   0, 0, 0, 0
0.647138, 0.808015,  83, 247 ,0, 0,   0, 0, 0, 0
0.647138, 0.764666,  144, 249 ,0, 0,   0, 0, 0, 0
0.647138, 0.764666,  144, 249 ,0, 0,   0, 0, 0, 0
0.647138, 0.808015,  83, 247 ,0, 0,   0, 0, 0, 0
0.562599, 0.764666,  130, 250 ,0, 0,   1, 0, 16, 0
35, 135 ,0, 0,   0, 0, 3, 0
2, 0 ,6, 0,   48, 0, 0, 0
102, 102 ,102, 63,   205, 204, 204, 61
...

vertex positions probably folllow afterwards as another block of data until UV's start again. But now we know that there would be the same number of XYZs as UVs, so it should be a lot easier to solve!

G, this wouldn't have been possible without your extractor in the first place!  :-D

NeoCloud, just call them whatever you want (like G said before in the other thread, .RAW is there just for the sake of having an extension). As long as we agree on using the same type-extensions everywhere, it shouldn't cause a problem .
I called the [!] files "exp-files" (.exp) and [&&] "and-files" (.and) inside my program, the other file-types are simple enough to call .ATEL etc

it doesn't matter what the original developers called them as long as we know what they are  :lol:

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
 :-o
UV's!? wow :D
well at least we're gonna be able to apply textures easily now without having to re-map everything :wink:
This is going a LOT quicker than i had once thought it might :D

so, if i'm right, once the pattern i found stops being recognisable as the same pattern, (i.e once the UV maps finish), we're probably onto the vertex positions?
so i'm guessing its not going to be months and months before we're able to render these models? :D

*very happy*
alright, i'll do my best to keep looking!

koral

  • Guest
wow, I'm wrong again!  :oops:
(sorry to dash your hopes so soon neocloud)

I think my first guess was right, because when I open other [!]-files i get "better" results (still not what I expect to find, but definitly not gobbledegook).

There really shouldn't be any FLOATS at all, SHORTS are far more compact (2 bytes instead of 4).
Or maybe its using 2-Byte FLOATS?! Its worth looking into. How were vertices stored in KH2? SHORTS or FLOATS?

The simplest [!]-File I could find was File: 02450.raw, which looks like it might be a barrel.
It has 84 vertices though, which feels like too much vertices or faces if its supposed to be only a simple barrel.
But there is no doubt that the 16-byte (20 including tag) is wrong at all.

Here is the complete dump of the SHORTS making up [unknown-chunk-2] in 02450.raw:
(## = vertex-tag 3f800000)

Code: [Select]
0, 0,   1, 12,    0, 3,   84, 0 ##
2907, 16127,   -24692, 16011,    -8118, 0,   0, 0 ##
-15208, 15156,   -17924, 16127,    0, 0,   0, 0 ##
2907, 16127,   -17924, 16127,    0, 0,   0, 0 ##
2907, 16127,   -24710, 16011,    8118, 0,   0, 0 ##
-15208, 15156,   -17942, 16127,    0, 0,   0, 0 ##
2907, 16127,   -17944, 16127,    0, 0,   0, 0 ##
4361, 16177,   -24576, -17783,    11481, 0,   0, 0 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
4361, 16177,   -20260, 16187,    -11481, 0,   0, 0 ##
4361, 16177,   -20260, 16187,    -11481, 0,   0, 0 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
4361, 16177,   -24576, -17783,    11481, 0,   0, 0 ##
12793, 16175,   -24576, -17783,    11481, 0,   0, 0 ##
-2074, 16141,   3848, 15834,    8118, 0,   0, 0 ##
12793, 16175,   -20260, 16187,    -11481, 0,   0, 0 ##
12788, 16175,   -20260, 16187,    -11481, 0,   0, 0 ##
-2079, 16141,   3848, 15834,    8118, 0,   0, 0 ##
12788, 16175,   -24576, -17783,    11481, 0,   0, 0 ##
-15208, 15156,   -14022, 16254,    11481, 0,   0, 0 ##
2907, 16127,   -14022, 16254,    11481, 0,   0, 0 ##
2907, 16127,   -5578, 16185,    8118, 0,   0, 0 ##
-15208, 15156,   -5578, 16185,    8118, 0,   0, 0 ##
-15208, 15156,   -14022, 16254,    11481, 0,   0, 0 ##
2907, 16127,   -5578, 16185,    8118, 0,   0, 0 ##
-15208, 15156,   -24692, 16011,    -8118, 0,   0, 0 ##
2907, 16127,   -24692, 16011,    -8118, 0,   84, 0 ##
2907, 16127,   -17152, 15216,    -11481, 0,   904, 665 ##
-15208, 15156,   -17152, 15216,    -11481, 0,   688, 665 ##
-15208, 15156,   -24692, 16011,    -8118, 0,   472, 665 ##
2907, 16127,   -17152, 15216,    -11481, 0,   472, 665 ##
-16067, 15156,   -14023, 16254,    -11481, 0,   472, 665 ##
2907, 16127,   -14022, 16254,    -11481, 0,   472, 665 ##
2907, 16127,   -5587, 16185,    -8118, 0,   472, 665 ##
-15208, 15156,   -5587, 16185,    -8118, 0,   31, 0 ##
-15208, 15156,   -14023, 16254,    -11481, 0,   -25968, 665 ##
2907, 16127,   -5587, 16185,    -8118, 0,   -27404, 66 ##
-15208, 15156,   -18688, 15216,    11481, 0,   1, 0 ##
-15208, 15156,   -24710, 16011,    8118, 0,   20, 0 ##
2907, 16127,   -18688, 15216,    11481, 0,   31, 0 ##
-15208, 15156,   -24710, 16011,    8118, 0,   -24016, 665 ##
2907, 16127,   -24710, 16011,    8118, 0,   -27404, 66 ##
2907, 16127,   -18688, 15216,    11481, 0,   1, 0 ##
-15208, 15156,   -5578, 16185,    8118, 0,   20, 0 ##
2907, 16127,   -17924, 16127,    0, 0,   31, 0 ##
-15208, 15156,   -17924, 16127,    0, 0,   24160, 665 ##
-15208, 15156,   -5587, 16185,    -8118, 0,   -27404, 66 ##
2907, 16127,   -17944, 16127,    0, 0,   1, 0 ##
-15208, 15156,   -17942, 16127,    0, 0,   20, 0 ##
3699, 16224,   27664, 16059,    0, 0,   31, 0 ##
19232, 16210,   10801, 16160,    -8118, 0,   31488, 665 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
19232, 16210,   10801, 16160,    -8118, 0,   0, 0 ##
4361, 16177,   -20260, 16187,    -11481, 0,   0, 0 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
19232, 16210,   10801, 16160,    -8118, 0,   0, 0 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
4361, 16177,   -20260, 16187,    -11481, 0,   0, 0 ##
3699, 16224,   27664, 16059,    0, 0,   0, 0 ##
19232, 16210,   3848, 15834,    8118, 0,   0, 0 ##
19232, 16210,   10801, 16160,    -8118, 0,   0, 0 ##
13455, 16128,   27664, 16059,    0, 0,   0, 0 ##
-2074, 16141,   10794, 16160,    -8118, 0,   0, 0 ##
-2074, 16141,   3848, 15834,    8118, 0,   0, 0 ##
-2074, 16141,   10794, 16160,    -8118, 0,   0, 0 ##
12793, 16175,   -20260, 16187,    -11481, 0,   0, 0 ##
-2074, 16141,   3848, 15834,    8118, 0,   0, 0 ##
-2079, 16141,   10794, 16160,    -8118, 0,   0, 0 ##
-2079, 16141,   3848, 15834,    8118, 0,   0, 0 ##
12788, 16175,   -20260, 16187,    -11481, 0,   0, 0 ##
13455, 16128,   27664, 16059,    0, 0,   0, 0 ##
-2079, 16141,   3848, 15834,    8118, 0,   0, 0 ##
-2079, 16141,   10794, 16160,    -8118, 0,   0, 0 ##
-15208, 15156,   -24710, 16011,    8118, 0,   0, 0 ##
-15208, 15156,   -17944, 16127,    0, 0,   0, 0 ##
2907, 16127,   -24710, 16011,    8118, 0,   0, 0 ##
2907, 16127,   -5587, 16185,    -8118, 0,   0, 0 ##
2907, 16127,   -17944, 16127,    0, 0,   0, 0 ##
-15208, 15156,   -5587, 16185,    -8118, 0,   0, 0 ##
-15208, 15156,   -24692, 16011,    -8118, 0,   0, 0 ##
-15208, 15156,   -17924, 16127,    0, 0,   0, 0 ##
2907, 16127,   -24692, 16011,    -8118, 0,   0, 0 ##
2907, 16127,   -5578, 16185,    8118, 0,   31360, 665 ##
2907, 16127,   -17924, 16127,    0, 0,   7, 0 ##

The numbers feel all wrong for vertex-positions. They are too similar and far too large.
I wonder if there is a byte or two which should be ignored within each vertex-group? That would offset the data so the SHORTS would pair up with other neighbours.
I'll give it shot, but any observations and options heartily welcome!  :lol:

BlitzNCS

  • Freak
  • *
  • Posts: 891
  • Karma: 2
  • Master of nothing in particular
    • View Profile
    • My Youtube
Don't worry about the Hope-dashing :P i'm very used to it xD

The simplest [!]-File I could find was File: 02450.raw, which looks like it might be a barrel.
It has 84 vertices though, which feels like too much vertices or faces if its supposed to be only a simple barrel.

about this, i tried to recreate this "barrel" and i found out that 84 verticies is actually very reasonable for a barrel
i used the simplest cylinder i could create, and applied the texture.

the one from that actual game, i would guess, would be FAR more advanced than this, so i doubt there'd be LESS verticies.