Difference between revisions of "FF8/WorldMap wmx"
my_wiki>Halfer (→Block data) |
my_wiki>Halfer (→Block data) |
||
Line 172: | Line 172: | ||
|- | |- | ||
| 6 | | 6 | ||
− | | | + | | short |
| weight (unused) | | weight (unused) | ||
|} | |} | ||
− | ''' | + | '''Normals'''(?) data: |
− | + | ||
+ | {| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;" | ||
+ | ! style="background:rgb(204,204,204)" | Offset | ||
+ | ! style="background:rgb(204,204,204)" | Length | ||
+ | ! style="background:rgb(204,204,204)" | Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | short | ||
+ | | X vertex normal | ||
+ | |- | ||
+ | | 2 | ||
+ | | short | ||
+ | | Z vertex normal | ||
+ | |- | ||
+ | | 4 | ||
+ | | short | ||
+ | | Y vertex normal | ||
+ | |- | ||
+ | | 6 | ||
+ | | short | ||
+ | | W vertex normal (unused) | ||
+ | |} |
Revision as of 12:18, 27 May 2016
By MaKiPL. All thanks goes to Halfer, for rich research progress on world map file. This wiki page is also based on Blue's wmx2obj source code.
Contents
General
Wmx.obj is world map geometry model only. Contains 835 segments, does not contain textures nor additional info like general header or pointers. Collision is calculated directly from faces. Towns and places on map are part of world map and are created the same way as mountains, ground etc. File size is 0x9000*835. Every 0x9000 a next segments starts.
Segment = contains 16 blocks Block = contains geometry
One segment is 8192 sized (512*16) + header. There is 16 blocks in a segment.
1-768 segments are final world map. 769-835 are story based segments like Balamb garden stationary, no Esthar, No cities in DISC4.
Segment
Segment starts with header (consist offsets for every block). After header a block data appears (a 4 byte header?) and polygon data.
- NOTE: Polygon is one triangle.
Offset | Length | Description |
---|---|---|
0 | 68 bytes | Header data |
68 | varies | Block data |
varies | varies | Padding (00) |
Header data
Offset | Length | Description |
---|---|---|
0 | 4 bytes | unknown |
4 | 64 (16 * uint32) | Offsets to blocks position. 4 bytes every offset! |
Block data
Block data starts with header:
Offset | Length | Description |
---|---|---|
0 | Byte | Polygon count |
1 | Byte | Vertices count |
2 | Byte | Normal Vertices count |
3 | Byte | Unknown |
Just after header a polygon data appears:
Offset | Length | Description |
---|---|---|
0 | Byte | F1 (Triangle 1) |
1 | Byte | F2 (Triangle 1) |
2 | Byte | F3 (Triangle 1) |
3 | Byte | N1 (Vertex Indice for F1) |
4 | Byte | N2 (Vertex Indice for F2) |
5 | Byte | N3 (Vertex Indice for F3) |
6 | Byte | U1 |
7 | Byte | V1 |
8 | Byte | U2 |
9 | Byte | V2 |
10 | Byte | U3 |
11 | Byte | V3 |
12 | 4 BIT/4 BIT | Texture Page/CLUT id |
13 | Byte | Ground type |
14 | Byte | Unknown |
15 | Byte | Unknown |
vertices:
Offset | Length | Description |
---|---|---|
0 | short | X vertex |
2 | short | Z vertex |
4 | short | Y vertex |
6 | short | weight (unused) |
Normals(?) data:
Offset | Length | Description |
---|---|---|
0 | short | X vertex normal |
2 | short | Z vertex normal |
4 | short | Y vertex normal |
6 | short | W vertex normal (unused) |