View Single Post
Old 10-01-11, 12:23 PM   #37
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Most Models in SH5 use 64 bytes to define the data for one vertex.
MOST but not all!!
Look at the Large Costal Gun and you'll see a 76 byte data structure!!
It has DiffuseColor0 before the first set of Texcoords.
That throws 12 bytes in but I have no idea why that's there.

Open that GR2 with your program and since your useing the granny2.dll I would expect it to render properly.
Yes it does because it only reads one texture coordinate. There is no granny vertex format defined that has this other channel:



If you use Microsoft's PE dumper and look at the exports you'll see all the granny vertex formats defined. They are kind of encrypted in their wording but you can make it out. i.e.: PNT332 would be position, normal, texture where position is 3 reals, normal is 3 reals, and texture is 2 reals.

Viewing this in wireframe is fine because I'm controlling the rendering and just setting the wireframe renderstate.

I've come to the conclusion that the game (and Goblin editor) doesn't really use the granny2.dll to 'read' the whole GR2 file. It only uses it to get information when it needs it. This would explain why it can access the other texture coordinates and other color information contained in the verticies.

Here are two vertex formats I know:
PWNT3432 - position (3 reals), Bone data (bone indicies - 4 ints, bone weights - 4 ints), normal (3 reals), texture coordinates (2 reals)
PWNGBT343332 - position (3 reals), Bone data (bone indicies - 4 ints, bone weights - 4 ints), normal (3 reals), tangent (3 reals), binormal (3 reals), texture coordinates (2 reals)

The Granny viewer is an excellent source of information. It tells you what the data type is for each value it reads right there on the screen!

Last edited by TheDarkWraith; 10-01-11 at 01:12 PM.
TheDarkWraith is offline   Reply With Quote