CGFX: Difference between revisions
Planetarian (talk | contribs) →SOBJ: mesh offsets |
Planetarian (talk | contribs) |
||
Line 427: | Line 427: | ||
|} | |} | ||
Vertex groups come in a number of different formats. Typically the first vertex group entry is of format 0x40000002 and contains the actual vertex array. | |||
Vertex group format 0x40000002: | |||
Vertex group format | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 440: | Line 439: | ||
| 0x0 | | 0x0 | ||
| 0x4 | | 0x4 | ||
| Flags ( | | Flags (0x40000002) | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| 0x4 | | 0x4 | ||
| | | ? | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
Line 475: | Line 474: | ||
|- | |- | ||
| 0x24 | | 0x24 | ||
| | | 0x4 | ||
| | | Vertex stride/size in bytes (see below) | ||
|- | |- | ||
| 0x28 | | 0x28 | ||
| 0x4 | | 0x4 | ||
| | | Unknown3 count | ||
|- | |- | ||
| 0x2C | | 0x2C | ||
| 0x4 | | 0x4 | ||
| | | Offset (self-relative) to component declaration offset array | ||
|} | |} | ||
Vertex | Each mesh's primary vertex group contains an array of vertex component declaration objects, defining the parameters for each of a vertex's components. | ||
Vertex component declaration: | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 513: | Line 498: | ||
| 0x0 | | 0x0 | ||
| 0x4 | | 0x4 | ||
| Flags ( | | Flags (0x40000001) | ||
|- | |- | ||
| 0x4 | | 0x4 | ||
| 0x4 | | 0x4 | ||
| | | Vertex component type (see below) | ||
|- | |- | ||
| 0x8 | | 0x8 | ||
Line 533: | Line 518: | ||
| 0x14 | | 0x14 | ||
| 0x4 | | 0x4 | ||
| | | ? | ||
|- | |- | ||
| 0x18 | | 0x18 | ||
| 0x4 | | 0x4 | ||
| | | ? | ||
|- | |- | ||
| 0x1C | | 0x1C | ||
Line 548: | Line 533: | ||
|- | |- | ||
| 0x24 | | 0x24 | ||
| | | 0x1 | ||
| | | Component data type (see below) | ||
|- | |||
| 0x25 | |||
| 0x1 | |||
| ? | |||
|- | |||
| 0x26 | |||
| 0x1 | |||
| ? | |||
|- | |||
| 0x27 | |||
| 0x1 | |||
| ? | |||
|- | |- | ||
| 0x28 | | 0x28 | ||
| 0x4 | | 0x4 | ||
| | | Number of values in this component (e.g. XYZ->3, UV->2) | ||
|- | |- | ||
| 0x2C | | 0x2C | ||
| 0x4 | | 0x4 | ||
| | | Multiplier for this component's values (float) | ||
|- | |||
| 0x30 | |||
| 0x4 | |||
| Position of this component within vertex stride | |||
|} | |} | ||
Observed sample vertex format sizes: | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 592: | Line 593: | ||
|} | |} | ||
Vertex | Vertex formats with bone data support multiple bone assignment. In this case, the sum of all bone weights is 0x64. | ||
== TXOB == | == TXOB == |