Geometry (RW Section)

Geometry is a container section used in DFF files as child of a Geometry List section. The section itself does not store any data at all. All additional information get stored inside a struct section which directly follows this one as a child. Geometry is one of the most important sections inside a .dff model file. It stores geometry information for models (like the mesh and the texture maps).

All of those flags (except the first) are used to build up the flexible vertex format (FVF)[2].

Prelightning/Vertex colors

If flag 8 is enabled vertex color information for each vertex get stored up next:

4b - DWORD - Vertex color (RwRGBA)

San Andreas Rockstar's engine is able to change the vertex colors for ingame nights by availing of a custom section called Extra Vert Colour. This prevents the game from loading new models at different times and increments the performance of the engine. Previous games stored copies of the model with different prelightning information and defined it inside the TOBJIDE section.

Texture/UV coordinates

If flag 4 or 128 is set texture coordinates are following next. If both are set then the texture coordinates for the first texture of all vertices are listed before the texture coordinates for the second chanel of all vertices. There's a maximum of 8 sets for texture coordinates, but GTA games use only first (diffuse map) or second (reflection map) set.

4b - FLOAT - Texture coordinate U
4b - FLOAT - Texture coordinate V

Triangles

The following array holds indices and material IDs for each triangle. The number of indices is represented by the third multiple of the triangle count value. So for each triangle the following format gets used: