View Single Post
Old 10-17-11, 12:24 AM   #90
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Got tripped up with these pointers to pointers for awhile. After that was sorted out I wasn't using the correct section to read the vertex data so I was pulling my hair out for hours on that one That ate most of my time thus I'll have to finish coding the mesh class later. The mesh class does read the vertex data though:

.....
Bone 10 0xB70 (0xD38)
Bone found at 0xB70 (0xD38)
Bone name=Dmg_Col_LifeBoat
Parent index=1 0xB74 (0xD3C)
Flags=3 0xB78 (0xD40)
Origin=0.000000, -0.051135, 0.000000 0xB7C (0xD44)
Rotation (quaternion)=0.000000, 1.000000, 0.000000, 0.000000 0xB88 (0xD50)
Scale=1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 0xB98 (0xD60)
Inverse world transform=1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.051135 0.000000 1.000000 0xBBC (0xD84)
LOD error=0.999214 0xBFC (0xDC4)
Extended data found!

Mesh found at 0x149C (0x1664)
Mesh name=LifeBoat_Hull 0x149C (0x1664)

PrimaryVertexData found at 0x1138 (0x1300)
Unknown=0x0 0x1138 (0x1300)
Number of verticies=2385 0x113C (0x1304)
Verticies pointer points to 0x7440 (0x7608)
Number of vertex component names=6 0x1144 (0x130C)
VertexComponentNames pointer points to 0x1154 (0x131C)
Vertex component names:
Position 0x2F68 (0x3130)
Normal 0x2F74 (0x313C)
Tangent 0x2F7C (0x3144)
Binormal 0x2F84 (0x314C)
TextureCoordinates0 0x2F90 (0x3158)
TextureCoordinates1 0x2FA4 (0x316C)

Verticies:

Vertex 0 0x7440 (0xAC88)
Position: -0.094747 0.006515 -0.195843 0x7440 (0xAC88)
Normal: 0.000000 1.000000 0.000000 0x744C (0xAC94)
Tangent: 0.000000 0.000000 1.000000 0x7458 (0xACA0)
Binormal: -1.000000 0.000000 0.000000 0x7464 (0xACAC)
TextureCoordinates0: 0.974552 0.014070 0x7470 (0xACB8)
TextureCoordinates1: 0.000000 0.000000 0x7478 (0xACC0)

Vertex 1 0x7480 (0xACC8)
Position: -0.094747 0.006515 0.195843 0x7480 (0xACC8)
Normal: 0.000000 1.000000 0.000000 0x748C (0xACD4)
Tangent: 0.000000 0.000000 1.000000 0x7498 (0xACE0)
Binormal: -1.000000 0.000000 0.000000 0x74A4 (0xACEC)
TextureCoordinates0: 0.026402 0.014070 0x74B0 (0xACF8)
TextureCoordinates1: 0.000000 0.000000 0x74B8 (0xAD00)

Vertex 2 0x74C0 (0xAD08)
Position: 0.052104 0.025124 0.153895 0x74C0 (0xAD08)
Normal: -0.972281 0.233325 0.015127 0x74CC (0xAD14)
Tangent: 0.231642 0.952429 0.198043 0x74D8 (0xAD20)
Binormal: 0.031801 0.196058 -0.980077 0x74E4 (0xAD2C)
TextureCoordinates0: 0.845590 0.547377 0x74F0 (0xAD38)
TextureCoordinates1: 0.000000 0.000000 0x74F8 (0xAD40)

Vertex 3 0x7500 (0xAD48)
Position: 0.000000 0.006515 -0.195843 0x7500 (0xAD48)
Normal: 0.000000 1.000000 0.000000 0x750C (0xAD54)
Tangent: 0.000000 0.000000 1.000000 0x7518 (0xAD60)
Binormal: -1.000000 0.000000 0.000000 0x7524 (0xAD6C)
TextureCoordinates0: 0.974552 0.243417 0x7530 (0xAD78)
TextureCoordinates1: 0.000000 0.000000 0x7538 (0xAD80)
....

this was from the CMD_smallboat.gr2 at it's more managable to use while trying to sort this crap out.

TheDarkWraith is offline   Reply With Quote