Author Topic: FF7 PC File format hacking 'n' stuff  (Read 11910 times)

NeutopiaW

  • Guest
FF7 PC File format hacking 'n' stuff
« on: 2002-09-18 08:17:20 »
Hey all!

That's some great work you guys have done on the file formats for FF7 pc. I found out about all this stuff recently, and read everything you guys posted and started on coding my own viewers and such.

Just wanted to know if anyones come close on texture mapping? I've been able to hack support in, I'm still a little puzzled about the format of the data, but I do believe that after the Polygon data in the P files, there is a materials list. Tells you the starting polygon that uses a texture. It kinda looks like a triangle strip.

Anyways I can extract which polys need should be drawn with textures, but I can't get which polygons use which texture coordinates.

Does anyone know?

Also has anyone had any success drawing the treasure chest models? they seem to use different primitive types besides triangles, and get screwed up if you try to draw em as if the polygons were only triangles.

I'm starting on the battle models now. Have you guys figured out any more stuff, especially about AB and DA files?

Thanks!

NeutopiaW

  • Guest
P Files..
« Reply #1 on: 2002-09-18 11:08:10 »
Heh replying to my own post ;)

How bout this for the (Material/Drawing) 56 pool?

=========================
0x0 - Word - Primitive Type

1 - Triangle
2 - Triangle Strip

0x04 - Word  Starting Polygon
0x08 - Word  How many polygons
0x0C - Word  Starting Vertex
0x10 - Word  How Many Vertexes

0x1c - Word  Unknown!! (Something to do with textures probably)

0x2c - Word Starting TextureUV

0x30 - Word  Uses Texture

0 - No Texture
1 - Uses Texture

0x34 - Word  Texture Number
==========================

There's probably more info in the places that are zeros at the moment for stuff like partially blended triangles, still have to do more experimenting.

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 PC File format hacking 'n' stuff
« Reply #2 on: 2002-09-18 11:24:26 »
Quote
Also has anyone had any success drawing the treasure chest models?

What are 'treasure chest models' ? If you mean potions and stuff, i think it can be displayed allright...

btw, welcome to the board !  :D

NeutopiaW

  • Guest
FF7 PC File format hacking 'n' stuff
« Reply #3 on: 2002-09-18 13:50:17 »
Hey thanks =)

Ya I met the actual models of the treasure chests, see "awae.hrc" (Char.lgp) for a good example. Its pretty messed up, I'm totally sure it needs to be drawn differently. The box before that one is also screwed up.

Hojo's face also gets screwed up in a similiar way. Its like the right points but the wrong polygons.

Pretty weird, it only happens to a few models though.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF7 PC File format hacking 'n' stuff
« Reply #4 on: 2002-09-18 15:08:14 »
Hm ... you don't seem to have read my recent posts ... however, theoretically I'm able to view models with textures, however, I don't knwo practocally. Since I've got a 56K connection w/o flatrate, I cannot stay too long online and post a 5-pages-reply here 'bout the spec...

I'll try to release a newer version of my FF7 .p Format doc, so you'll be up-to-date...
Oh, and I'm also able to calculate the .p File size, so there are no 'unknown' blocks in my doc :D

However, it's good to see that there are more people than only me workin' on that format... that'll keep up competition ...
As I mention in other topics, I'm really busy at the moment ... so ... I'm not sure when my new doc will be uploaded...

BTW: Welcome!

 - Alhexx

 - edit -
As for the AB and DA Files: Yes, we are partially able to decode them. You should have a look at the topics in this tech forum ... you should find a lot of useful info here...

NeutopiaW

  • Guest
Uploaded it
« Reply #5 on: 2002-09-19 02:18:50 »
Hey thanks, ya I have been reading a lot of the posts. I guess some have deceptive names or whatever. I'll look through them all again.

Just wondering what major breakthroughs people have made lately.

I haven't found any specific info on the battle ab files though. Is it animation sequences?

Anyways I'll post a link to my simple viewer.

firebell.org/viewer.zip

It will view the Field Models. It has texture mapping, animations, smooth shading and vertex lighting =)  (OpenGL)

Although the textures aren't 100% correct yet, some models are screwed up. Still trying to fix it.

NeutopiaW

  • Guest
Yah!
« Reply #6 on: 2002-09-19 03:39:44 »
Sweet! I fixed the texture problems, now all textures display 100% correctly =)

Lemme know if you guys find any problems with that.

firebell.org/viewer.zip

==EDIT==

Ya I fixed the remaining poly bugs, now all models should draw correctly, treasure chests, and Hojo's face is correct!

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
FF7 PC File format hacking 'n' stuff
« Reply #7 on: 2002-09-19 08:31:14 »
Damn... You Alhexx, and mirex should compare notes...

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 PC File format hacking 'n' stuff
« Reply #8 on: 2002-09-19 11:29:42 »
currently im working on P files too, but my work goes too slow... i'll probably release something too, maybe in a week.

NeutopiaW: it does not work for me, it needs ff7 installed probably ... i'll try it asap. But if you say that you can display models correctly with textures, then its great !!
-edit-
(had to read readme) Now I tried, and yea, it looks great ! good work

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF7 PC File format hacking 'n' stuff
« Reply #9 on: 2002-09-19 13:59:06 »
Hm ... yes. I'm currently not workin' on it since I don't have any free time now ... ... :(
I'll try to do that later, 'kay?


 - Alhexx

Goku7

  • *
  • Posts: 1301
    • View Profile
Re: Uploaded it
« Reply #10 on: 2002-09-19 21:33:35 »
Quote from: NeutopiaW
Hey thanks, ya I have been reading a lot of the posts. I guess some have deceptive names or whatever. I'll look through them all again.


If it helps, use the "Search" button in the Upper right, to the left of the memberlist link.

That should speed up your work on getting "up-to-date".

Oh yes, and I also welcome you to the board! :D

Skillster/RedSarg99

  • *
  • Posts: 2286
  • Loving every Final Fantasy
    • View Profile
FF7 PC File format hacking 'n' stuff
« Reply #11 on: 2002-09-19 22:20:04 »
yo u seem like ur puttin up links to a file?

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
FF7 PC File format hacking 'n' stuff
« Reply #12 on: 2002-09-20 03:44:50 »
I've been out of touch for a while, in case no one missed me.... :weep:

I should be around to be somewhat useful for the forseeable future though.

 A bit late, but some other models that have that similar problem;
Pinball Elevator
Rufus' Car
Hojo's Battle model head has a similar problem.

It sounds like this new guy's fixed the bug...  Think anyone could take a stab at explaining what the problem was to a layman?  Just curious.

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 PC File format hacking 'n' stuff
« Reply #13 on: 2002-09-20 11:40:41 »
Shin-Ra I have missed you, really. WB !
NeutopiaW: yes, maybe you could tell us what did you discovered ! If you want to, ofcourse.

NeutopiaW

  • Guest
Here's how to draw the models correctly:
« Reply #14 on: 2002-09-20 14:50:08 »
Here we go ;)

Ok drawing just the polygons from start to end is not enough, in fact if you do this you will see the model screw ups as stated above. (Hojo's head).

Anyways what has been referred to as the 56 pool, is actually the .grp part of the file. (Group) This is very important as it tells you how to draw the model properly. You start at the first group and draw the polys in it, and go through all the groups.

Each 56 byte group contains the info (listed above), for how to draw it, what texture it uses (if it does use one), starting vertex to use, starting texture UV to use.

Now I made a small mistake, the group type should go like this:

1 - Non Textured Triangles
2 - Textured Triangles (with vertex normals)
3 - Textured Triangles (No normals used)

The 100's pool is actually a list of materials that correspond to the poly groups. IE: Use material 0 with group 0.

If ya have any questions lemme know, sometimes I am bad at explaining stuff. My english is also going from being in Japan.

PS: There is actually no small model. Those are Vertex Normals ;)
       Battle Models don't seem to use Lighting, thats why there aren't any in them, they get around it by using the Vertex colors in a creative way.

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF7 PC File format hacking 'n' stuff
« Reply #15 on: 2002-09-20 17:56:59 »
WHAA !! :o  And I thought I was the mentor of the .p format ... :D

Well, congrats to that progress ! I think I can almost hear the people crying out for a new version of Ultima ... bah, and I have 0% free time now !! However, I'll at least try to update my .p description as fast as possible (of course crediting you for the work ! )

Well, keep on that work - maybe we'll soon be able to create even new .p files that will be accepted by FF7 ! That would be a real success !

 - Alhexx

Sephiroth 3D

  • *
  • Posts: 1679
    • View Profile
    • ModCitizen 42
FF7 PC File format hacking 'n' stuff
« Reply #16 on: 2002-09-20 19:59:26 »
heh... yeah, those battle models are cheap.

Sounds like some real progress is being developed. That's good! Can't wait until I can import a FF7 model, skeleton, and animation directly into Lightwave, alter it, and dump it back into FF7. That would defiantly help the remake!

Keep up the great work!

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
FF7 PC File format hacking 'n' stuff
« Reply #17 on: 2002-09-21 02:17:12 »
Word.  I'll check and see if my edited models work in this new viewer later.  Are you intending to refine this viewer or anything along those lines?  ie; Filter the animations, control the rotation of the models, etc.  Or is Fice going to incorporate the new advances into a new Ifalna, or whatnot?

ficedula

  • *
  • Posts: 2178
    • View Profile
    • http://www.ficedula.co.uk
FF7 PC File format hacking 'n' stuff
« Reply #18 on: 2002-09-23 15:09:31 »
I'll certainly try to update Ifalna accordingly; hopefully some point this week, now I've got back to my own house again...

Update: I've updated Ifalna to include some of the new changes (thanks NeutopiaW!) It uses the new polygon display data (fixes corrupted models) and the texturing info to display (most) textures correctly...

Grab it from http://www.westroad.no-ip.com:9880/ficedula/   (I should really change ficedula.cjb.net to point there...)

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 PC File format hacking 'n' stuff
« Reply #19 on: 2002-09-25 12:54:05 »
I'll try to enter these changes into my Conv aswell, and also i'll try to release new version ASAP. News are that it can read animations now too (this far only FF7 field models and quake3 models), and textures; and also i changed its name into Biturn. To make it more unique. :)

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF7 PC File format hacking 'n' stuff
« Reply #20 on: 2002-09-25 16:02:54 »
That smells like someone's expectin' a new version of Ultima ...  :wink:

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
FF7 PC File format hacking 'n' stuff
« Reply #21 on: 2002-10-16 04:04:58 »
Quote
That smells like someone's expectin' a new version of Ultima ...  


...and the wolves circle.

 :wicked:

pointless update;

For the record, my ultima-modified models produce a Stream Error in Fice's new Ifalna.  Not that I was expecting otherwise, but I figured I'd check anyways.

Don't mind me, suffering severe medication withdrawals for the time being.

Also, out of curiousity, has there been any other progress on the battle files?  Like maybe an updated Leviathan in the works?   =o

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
FF7 PC File format hacking 'n' stuff
« Reply #22 on: 2002-10-16 11:36:34 »
Leviathan: No, not yet, but im loading battle skeletons into convertor, and strange thing happened. With the same code, all skeletons are displayed properly, no yoga positions as in leviathan. I should fix that :)

Alhexx

  • *
  • Posts: 1894
    • View Profile
    • http://www.alhexx.com
FF7 PC File format hacking 'n' stuff
« Reply #23 on: 2002-10-16 11:37:41 »
Quote from: ShinRa Inc
(...) Not that I was expecting otherwise (...)


Well, Ultima's "internal ff7 format system" is very out-of-date. So there is not a good chance that Ultima's edited models will work anywhere else :(
That *should* change in the next release (btw: it's vacation time in germany, but I still don't have any free time to work on Ultima... you'll probably have to wait until x-mas :( )

 - Alhexx

ShinRa Inc

  • *
  • Posts: 416
  • The Ascension of the Ordinary Man
    • View Profile
    • http://shinrainc.org
FF7 PC File format hacking 'n' stuff
« Reply #24 on: 2002-10-16 18:48:03 »
That's what I figured.  But there's nothing else remotely constructive I can do, so I figured I'm make sure anyway.  x.x

And will the next Ultima release possibly have some way of converting existing models that were edited on the older versions into 'fixed' models, by any chance?  For those of us impatient fools who've made too many edited .p files with the existing Ultima.  x.X