Author Topic: Field models.  (Read 10755 times)

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Field models.
« on: 2007-01-31 08:49:43 »
First progress. As I can't find any info about BCX - I start working on it myself.


Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #1 on: 2007-02-01 01:31:26 »
The bone structure is supposedly at the end of the file.  Have you found the bone structure information? All else fails give me a dump of the data you are getting. None of my decompressed information I can rely on anymore.  I'm so damned with wasting my time on it I don't want to break anything by trying to use it. :D

If you dump the information I will probably be able to acertain where the bone structure is, in fact the bone structure should be somewhat identical to the battle models (there might not be offsets to the bones or they will be different).  Since the textures are in the FIELD.TDB and it's easy to extract the data in that your only issue is which palette to use with the textures.  (The first texture is clouds and so is the first palette by the way).

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Field models.
« Reply #2 on: 2007-02-01 05:36:42 »
Here's a tip:

The bone information should equal, for the most part, the bone info that we already have extracted from the PC version. Keep in mid that the rotation data was designed for the GTE, so the number swill most likely be in a format that refects this.

Also remember that the 3d information was compliled for Psy-Q. So in the end we will have biniary versions of the PC data.

If I remeber correctly, the PC field animations were raw rotations, without any keyframe and delta magic like in the battle models. This may stand to be true in the PSX version as well.

Just tossing out therories.

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Field models.
« Reply #3 on: 2007-02-01 06:30:33 »
I found the bones and colored triangle and quad. I just cant understand textured quad and triangle.

This is textured quad
58 59 04 57 FF FF FF 9A FF FF FF 9A FF FF FF D6 FF FF FF B0 04 05 06 07

This is textured triangle
52 48 53 00 FF FF FF 2C FF FF FF 84 FF FF FF 79 00 01 02 20

The first four bytes are obviously vertex indexes.
Next was color in colored triangle and quad. The last block are the new one. It looks like index to something..... maybe I need to hack into FIELD.TDB first.

And I didn't work on animation at all.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #4 on: 2007-02-01 16:18:05 »
I found the bones and colored triangle and quad. I just cant understand textured quad and triangle.

This is textured quad
58 59 04 57 FF FF FF 9A FF FF FF 9A FF FF FF D6 FF FF FF B0 04 05 06 07

This is textured triangle
52 48 53 00 FF FF FF 2C FF FF FF 84 FF FF FF 79 00 01 02 20

The first four bytes are obviously vertex indexes.
Next was color in colored triangle and quad. The last block are the new one. It looks like index to something..... maybe I need to hack into FIELD.TDB first.

And I didn't work on animation at all.
FIELD.TDB is extremely simple. I can rattle it off the top of my head to you if you like.  The real meat and potatoes is in the BCX and BSX files (which are pretty much the same)
Code: [Select]
uint32 References[3]These are reverse ordered references (doh?)
The first always points to the end of the file (at least appears too)
The second points to the begining of the bone structure likely
The third points to the bones (looks like it at least :D).

Right so the format is completely different than the battle models looks like.
As far as I know they shouldn't have any colors for vertexs .. at least the battle models didn't.

Now lets think, do we have UV indices in this data? No I don't see any?
I don't think there is any UV data in the BCX and BSX files since that never changes, likely in the FIELD.TDB file somewhere.
The only thing that I can think of they need for textured quads and triangles (and there aren't many of them) are the vertex indices.
There should be only a few triangles and quads. (IE 3-4 triangles and 5-12 quads).
Remember the field models ONLY have eye textures, which are pooled in FIELD.TDB.
The numbers you are looking at though are suspicious.  I think the field models are using DIRECT PS1 GPU codes (quick look at halkun's PS1 GEEK book).

Right doesn't look like those weird long words are GPU commands Oh well :D
The 4 last numbers look like vertex numbers however what model is this? Cloud? Always be sure you say that, because it will help you identify things faster. Anyhow Cloud will use texture 0 palette 0.

Side note, likely the reason the field format has other weird stuff that isn't used with textured polygons and it's format appears to be different is that different programmers handled the field than the battle 3d. :)

Cyb

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Field models.
« Reply #5 on: 2007-02-09 09:52:52 »
2 Cyberman: did you manage to understand animation format?

If anyone have ideas:

Idle position of each bones set with this
Code: [Select]
00 00 00 00 FF 00 01 00
00 C0 00 00 FF FF FF 00
00 FA 00 00 FF FF FF 00
00 06 00 00 FF FF FF 00
00 FA E7 37 FF FF FF 00
00 DC EE 16 FF FF FF 00
00 D4 0E 30 FF FF FF 00
00 00 00 00 FF FF FF 00
00 00 00 00 FF FF FF 00
00 F9 19 C9 FF FF FF 00
00 DC 12 EA FF FF FF 00
00 D0 ED D4 FF FF FF 00
00 00 00 00 FF FF FF 00
00 00 00 00 FF FF FF 00
00 00 B3 80 FF FF FF 00
00 C6 F3 40 FF FF FF 00
00 00 00 00 FF FF FF 00
00 DD CF 39 FF FF FF 00
00 00 4D 80 FF FF FF 00
00 C6 0E C0 FF FF FF 00
00 00 00 00 FF FF FF 00
00 E2 31 C7 FF FF FF 00

It seems that frames are not define one after another. Instead of that there are blocks that contains rotation (maybe) info for one part of model. For example this looks like cloud chest when he run. But number of such blocks larger than number of bones.
Code: [Select]
21 22 22 23 23 23 23 23 22 22 23 23 23 22 21
my hacking notes can be found here http://omake.ru/bakari/q-gears/hack/anim.txt
« Last Edit: 2007-02-09 14:37:18 by Akari »

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #6 on: 2007-02-09 21:12:12 »
I am using a debugger version of  PS1 emulator to find out what's happening with the data. (I finally got the debugger working again and poof you ask this LOL.)  In any case if it's not a big deal I'll beat on it some today.

Cyb - sorry delay in reply so many crazy things going on these days.

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Field models.
« Reply #7 on: 2007-02-16 11:45:02 »
I manage to read rotation info from initial position from idle animation.

Result screens.




Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #8 on: 2007-02-16 14:22:58 »
Woo Excelent! Good job Akari.  I wish I had been able to be of more help (sadly no). Is there an extra or odd byte in the front of the animation data that you ignore or anything? That could be the packing bit count like with the battle models. 
It's likely they used the same form of delta compression they did on the battle models so you might want to look for any information that doesn't seem to have a use.  Or they may not there aren't as many animations.  Did you find any offsets also? (LOL). I ask too many questions I guess.

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Field models.
« Reply #9 on: 2007-02-16 17:34:03 »
Cloud looks a little large...

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #10 on: 2007-02-16 23:48:48 »
On the in game view? Hmmm let me check This image doesn't say that really
if anything he looks a bit smallish.

Cyb

gigaherz

  • *
  • Posts: 105
    • View Profile
    • gigaherz's shitty stuff
Re: Field models.
« Reply #11 on: 2007-02-17 00:41:03 »
Comparing cyb's image with akari's one, cloud is actually a bit bigger in akari's image, but cyb's cloud seems more "stylized", like if the x/y/z proportions were off in qgears compared to the real ff7...

btw the ff7 window is 320x224, not 320x240, and yours is 319x239 also ;)

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #12 on: 2007-02-17 01:36:04 »
Comparing cyb's image with akari's one, cloud is actually a bit bigger in akari's image, but cyb's cloud seems more "stylized", like if the x/y/z proportions were off in qgears compared to the real ff7...

btw the ff7 window is 320x224, not 320x240, and yours is 319x239 also ;)
My Image is directly from the game and is also at the right aspect ratio. Unfortunately for me it doesn't look right since I haven't corrected my X desktop resolution for the display it's on.

Cyb

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Field models.
« Reply #13 on: 2007-02-17 03:21:34 »
Not only this, but Akari's model has the feet pointing outward. You don't have the rotation data correct....

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #14 on: 2007-02-22 14:29:43 »
Akari the field models appear not to have shading like within the game. So my guess is that the PS1 does use static lighting.  Or is this an artifact os something they are all monochromed like that? :D

Cyb

Synergy Blades

  • Guest
Re: Field models.
« Reply #15 on: 2007-02-22 15:11:37 »
I don't think he's implemented the lighting triple for models yet. I don't know how the PS hardware handles it, but lighting for each object can be changed individually (various flavours of KAWAI).

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Field models.
« Reply #16 on: 2007-05-23 19:30:04 »
Animation working at last


halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
Re: Field models.
« Reply #17 on: 2007-05-23 22:26:30 »
I hear you are switching over to Ogre so that it will be easier For everyone to work with...

How is that going?

Akari

  • Moderator
  • *
  • Posts: 766
    • View Profile
Re: Field models.
« Reply #18 on: 2007-05-24 02:05:34 »
I hear you are switching over to Ogre so that it will be easier For everyone to work with...

How is that going?

Still working on it. Format revercong was done with old code.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: Field models.
« Reply #19 on: 2007-05-24 10:44:26 »
Ogre 3d? Interesting, I guess this is less an engine than anything but it does make portability less of an issue and maintaining 'the engine' less of a burden. (turn lights on as needed).  I know this won't be an easy task (because I did it with the battle models took a while to figure out how to do migrate the data using the interface etc.), however it probably will make the field lighting work by default, which will be cool.

Cyb