View Single Post
Old 10-01-11, 11:10 AM   #36
skwasjer
The Old Man
 
Join Date: Apr 2007
Location: Netherlands
Posts: 1,547
Downloads: 26
Uploads: 3
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.

I had to add to my script to export the vertex data to account for this extra info.
Basiclly I just ignore it for now.

Also, if you open the gun with Goblin and click to view wireframe?
Only the base will show in wireframe mode.
The Barrel and Turret won't. So the DiffuseColor0 is doing something at least in Goblin.
It can indeed be simply for editting/viewing/debugging purposes. Remember that SH3/4 had many 'dev-leftovers' too in the game files. But it can also be a base color for lighting. I really have no idea why so I'm just throwing out ideas I know from memory/earlier experience. You might get a clue from the shader files. Just check all vertex shaders and their input structures and see if you can 'match' the input with the vertex data that you get from GR2. If it's somewhere in there you can deduce what it's for by interpreting the shader code. If it's nowhere to be found you can probably simply ditch it... It's how I learned that uv3/4 in DAT-files are obsolete data.

Last edited by skwasjer; 10-01-11 at 11:24 AM.
skwasjer is offline   Reply With Quote