Hojo's Head

All questions and discussions about file format analysis are welcome in this forum.

Moderators: Alhexx, mirex

Hojo's Head

Postby ChaosKnight » Wed Mar 15, 2006 19:11

Hi all, I'm kind of new to the FFVII formats, but not completely new to 3D; however I do seem to be having trouble with groups. Specifically I noticed that Hojo's head was a good test to render and see if you have groups working well. It seems I don't as my Hojo head looks something awful, although my single group P files (ex. chocobo head, hojo's chest) seem to be rendering beautifully.

To give a little understanding I am trying to make an OpenGL friendly file containing an entire FFVII field model (less the animation), therefore I have loaded the HRC and all of the corresponding P files into a single class (which works nicely).

Now with that out of the way I can get to som pseudo-code for what i'm doing:
Code: Select all
for each Bone in HRC.Models
{
P = Bone.P
for each Group in P
{
Store Polygon Type
for Group.FirstPolygon to Group.PolygonCount increment i
{
glColor3ubv(P.VertexColors[P.Polygons[i].Vertex[0]]));
glVertex3fv(P.Vertices[P.Polygons[i].Vertex[0]]);
...
And on for indexes 2 and 3
...
}
}
}


The summary (if you couldn't understand that very obscure pseudo-code) is that I am looping through the groups, starting with the first polygon (as defined by the group) for the length (also defined by the group) and rendering the triangles as I go.

Hopefully I described it well enough to get some help, otherwise please let me know what I need to clarify.

Thanks!
ChaosKnight
 
Posts: 4
Joined: Wed Mar 15, 2006 18:56

Postby Alhexx » Thu Mar 16, 2006 16:03

Maybe you could post a few screenshots?
I think I had a problem like this before, too, however, I'll have to see one or two renders to take a closer look at...

- Alhexx

- edit -
As far as I remember, I had problems with hojo's head, too, although most of the other models were working well...
User avatar
Alhexx
Administrator
Administrator
 
Posts: 59
Joined: Tue Jun 28, 2005 19:04
Location: Dortmund, Germany

Postby ChaosKnight » Thu Mar 16, 2006 17:47

Here they are...

[Hojo's Head]
Image

and for reference:
[Chocobo's Head]
Image

Thanks!
ChaosKnight
 
Posts: 4
Joined: Wed Mar 15, 2006 18:56

Postby Alhexx » Sun Mar 19, 2006 17:38

I have the feeling that I know what happens:

The bug is in this line:
Code: Select all
glVertex3fv(P.Vertices[P.Polygons[i].Vertex[0]]);


The Vertice Indices in the .P Groups are relative to the group's first vertice index, so it should be:

Code: Select all
glVertex3fv(P.Vertices[Group.FirstVertex + P.Polygons[i].Vertex[0]]);


I hope that's it...

- Alhexx

- edit -
Same thing for the colors, of course...
User avatar
Alhexx
Administrator
Administrator
 
Posts: 59
Joined: Tue Jun 28, 2005 19:04
Location: Dortmund, Germany

Postby ChaosKnight » Sun Mar 19, 2006 20:38

-- Edit --
Thanks, that worked perfectly. I tried it wrong and it didn't work. Now I just need to get his eyes and mouth rendering.
-- Edit --

On a side note, if you could let me know how to transform the model pieces to the right coordinates that would be great, I couldn't find it anywhere in the documents, only bone length.
ChaosKnight
 
Posts: 4
Joined: Wed Mar 15, 2006 18:56

Postby Alhexx » Tue Mar 21, 2006 18:21

As for the battle animations, which are stored in the **da files, you can find some useful info here.
And here is some information about the .a format, which is used for field animations.

- Alhexx
User avatar
Alhexx
Administrator
Administrator
 
Posts: 59
Joined: Tue Jun 28, 2005 19:04
Location: Dortmund, Germany

Postby ChaosKnight » Fri Mar 24, 2006 14:56

That has bone rotation information in it, but I couldn't find anything about positional data.

-- Edit --
Am I am idiot who doesn't understand skeletal animation... you bet. Sorry for wasting your time.
ChaosKnight
 
Posts: 4
Joined: Wed Mar 15, 2006 18:56


Return to File Format Analysis

Who is online

Users browsing this forum: No registered users and 1 guest

cron