Skip to content

FBX File Doc Geometry Mesh Data

JoshuaKlaser edited this page Jun 9, 2014 · 4 revisions

This is where you will find the data:

  • Vertices
  • Vertex indices
  • Edges
  • Normals
  • UVs
  • UV indices
  • Material indicies

This section is found within the Object Properties, with the heading:

Geometry: 227408672, "Geometry::", "Mesh" {

The first part 'Geometry:' is the name of the object property.
The second part '227408672' is the id of this object property.
The third part 'Geometry::' is the name of this object property. This has no name as the actual name is located to the right of the '::'.
The fourth part 'Mesh' is the type of this object property.

The vertices are found within:

Vertices: *48 {
}

This is a list of floats separated by commas and when imported form a list of Vector3.
This format string of this section goes - x,y,z,x,y,z,x,y,z.
The amount is provided next to the title and is 48 in this example, however due to the format of the data it is actually 48 divided by 3 (since 3 parts of the string make 1 part of the Vector3 list).

The vertex indices are found within:

PolygonVertexIndex: *48 {
}

This is a list integers separated by commas and when imported form a list of integers.
This format string of this section goes - face1ind1, face1ind2, face1ind3, -face1ind4last, face2ind1, etc. , which means the indices are saved as a triangle fan, per face. You will notice that there are negative numbers in this list, these numbers refer to the final index of the current face. These numbers have been XOR'd by -1 which means that in order to convert them back you must use the algorithm AI = ((I x -1) - 1), where I is the index value; Ex. -4 would convert to AI = ((-4 x -1) - 1) : AI = (4 - 1) : AI = 3.
The amount is provided next to the title and is 48 in this example, however keep in mind that 48 is the number of indices in this format. If you wish to convert this list to a triangle strip or something else, then the number may or may not be different.

The edges are found within:

Edges: *24 {
}

This is a list of integers separated by commas and when imported form a list of integers.
No research has been done on the edges to state what the format string is.
The amount is provided next to the title and is 24 in this example. This number reflects the amount of integers in the string, and also reflects the amount of edges on the model (excluding extra ones made by triangle rendering).

The normals are found within:

LayerElementNormal: 0 {
MappingInformationType: "ByPolygonVertex"
Normals: *144 {
}
}

This example has been set so the normals are bound to the vertex and this can be seen by the 'MappingInformationType' property. The information provided will be based upon vertex normals only as no research has been done on other normal types.
This is a list of integers separated by commas and when imported form a list of Vector3.
This format string of this section goes - x,y,z,x,y,z.
The amount provided is next to the title and is 144 in this example. Since this number needs to be reduced by a division of 3, you will notice that the actual list is 48. Given that there are 48 normals while only having 16 vertices, it's quite obvious the normals are based upon something else to reflect on the vertices. So they reflect on the vertex indices to direct them to the vertex in which they need to be applied, where the first normal of the list uses the first vertex index, and the second normal uses the second vertex index, and so on (normal1ListPosition -> vertexIndex1 -> vertex, normal2ListPosition -> vertexIndex2 -> vertex).

The Uv data is found within:

LayerElementUV: 0 {
MappingInformationType: "ByPolygonVertex"
UV: *56 {
}
UVIndex: *48 {
}
}

This example has been set so the uvs are bound to the vertex and this can be seen by the 'MappingInformationType' property. The information provided will be based upon vertex uvs only as no research has been done on other uv types.

'UV:' Section:
This is a list of floats/doubles separated by commas and when imported form a list of Vector2. These Vector2's point to a position in an image file.
The format string of this section goes - x,y,x,y,x,y.
The amount provided is next to the title and is 56 in this example. Since this number needs to be reduced by a division of 2, you will notice the actual list is 28. Even though these uvs are based on vertices they do not directly match with the vertex list, which is shown by the vertex amount being 24 and the uv amount being 28. The uvs are based on the vertices that are used on an unfolded/cut mesh, which can be easily seen in the 'UV Texture Editor' in Maya.

'UVIndex:' Section:
This is a list of integers separated by commas and when imported form a list of integers.
The format string of this section goes - uvArrayIndex0, uvArrayIndex1, uvArrayIndex2, etc. There are 2 indexing methods used in this list; the first being the actual integer values matching with the list index position of the UV Vector 2 list; the second being the list index position matching with the list index position of the vertex index list. Combining these 2 indexing methods will link a UV to a vertex (uvVecValue : uvVecIndexPosition <- uvIndexValue : uvIndexPosition -> vertexIndexPosition : vertexIndexValue -> vertex)
The amount provided is next to the title and is 48 in this example. This number should always match the vertex index list amount.

The Material data is found within:

LayerElementMaterial: 0 {
Materials: *12 {
}
}

This is a list of integers separated by commas and when imported form a list of integers.
The format string of this section goes - face0, face1, face2, face3, etc. Since each face can have a different material, it saves materials in terms of which face indices they apply to. There are 2 indexing methods used in this list; the first being the actual integer values matching with the material list index position; the second being the list index position matching with the face index position (face indices are the separate faces marked by the negative number in the vertex index list. So those vertices index in a face within the vertex index list is mapped to a material, and the material changes after the negative number when a new face begins.)
The amount provided is next to the title and is 12 in this example. If no custom materials have been made and/or applied, then this number would be 1, and the value in the list would be a '0'. If any custom material has been applied, then each face is organised in this list. This number should always match with the number of faces

Clone this wiki locally