Skip to content

RWGeometry (0x000F)

This section stores geometric data of models.

It can be seen as child of RWGeometryList sections.

Structure format

Size Type Description
4b enum format (see below)
4b uint count of triangles
4b uint count of vertices
4b uint count of morph targets (should always be 1)
4b float ambient
optional only after 0x33000
4b float specular
optional only after 0x33000
4b float diffuse
optional only after 0x33000

optional only if format does not contain Native :

Size Type Description
4b uint[] prelitcolor
optional only if format contains Prelit
TexCoord[,] texCoords (see below)
GTriangle[] triangles
MorphTarget[] not optional

MorphTarget

Size Type Description
12b Vector Center of bounding sphere
4b float Radius of bounding sphere
4b bool hasVertices
4b bool hasNormals
Vector[] vertices
Vector[] normals (1 per vertex)

TexCoord

Size Type Description
4b float u
4b float v

GTriangle

Size Type Description
2b uint v2
2b uint v3
2b uint m
2b uint v1

format enum

Name Value
Tristrip 0x00000001
Positions 0x00000002
Textured 0x00000004
Prelit 0x00000008
Normals 0x00000010
Light 0x00000020
ModulateMaterialColor 0x00000040
Textured2 0x00000080
Native 0x01000000

Bits 16-23 (mask 0x00FF0000) in the format description give the number of texture coordinate sets (numTexSets). - gtamodding If this value is 0, format decides over the number of texture coordinate sets.

Possible child sections