65
edits
Changes
From Final Fantasy Inside
m
==General==
*NOTE: Polygon is one triangle. {| border="1" cellspacing="1" cellpadding="3" align="center" styleclass="border: 1px solid black; border-collapse: collapse;wikitable"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| varies
| 4 bytes
| Padding (Always present in original file)
Block data starts with header'''Header''' (4 Bytes):
Just after header a '''polygon dataPolygon''' appears(16 bytes): {| border="1" cellspacingclass="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;wikitable"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
31 revisions imported
By MaKiPL, Updated 27.5.2016 by Halfer. 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. == 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 0x9000 or 36864 bytes long. There are 16 blocks in a segment. In theory, a segment can hold 16 blocks which each hold 0x900 bytes of data.
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 a header (consist offsets for every block). After segment's header a block blocks data appears (a 4 byte header?) and polygon data.
<br />
|-
| 0
| varies
| Block data
|}
<br />
===Header data===
{| border="1" cellspacingclass="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;wikitable"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| 0
| 4 bytes
| unknowngroup ID
|-
| 4
|}
Group ID can be one of theses values: 0: Trabia 1: Balamb + Fisherman's Horizon 2: Esthar West 3: Esthar South East + Laboratory 4: Mordor + Esthar North 5: Centra 6: Galbadia borders (Deling City, Timber, Dollet, Winhill...) 7: Galbadia middle (GGU, Prison, highlands...) 255: Seas == Block == ===Block data=== General structure of a block {| class="wikitable"! Offset! Length! Description|-| 0| 4 Bytes| Header|-| 4| Polygon count * polygon length (see header)| Polygons|-| Header + Polygons| Vertice count * vertice length (see header)| Vertices|-| Header + Polygons + Vertices| Normal count * normal length (see header)| Normals|-| Header + Polygons + Vertices + Normals| 4 Bytes| Padding|}
{| borderclass="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;wikitable"! style="background:rgb(204,204,204)" | Offset! style="background:rgb(204,204,204)" | Length! style="background:rgb(204,204,204)" | Description
|-
| 0
| 2
| Byte
| Normal Vertices Normals count
|-
| 3
| Byte
| Unknown(Padding)
|}
|-
| 0
| 3
| Byte
| N1 (Vertex Normal Indice for F1)
|-
| 4
| Byte
| N2 (Vertex Normal Indice for F2)
|-
| 5
| Byte
| N3 (Vertex Normal Indice for F3)
|-
| 6
| Ground type
|-
| 14| Byte| Unknown|-| 15| Byte| Unknown|-|} '''vertices''': {| border="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;"! style="background:rgb(204255,204255,204)" | Offset14! | style="background:rgb(204255,204255,204)" | LengthByte! | style="background:rgb(204255,204255,204)" | DescriptionUnknown
|-
| 0style="background: rgb(255,255,204)" | short15| X vertex|-| 2style="background: rgb(255,255,204)" | shortByte| Z vertex|-| 4| short| Y vertex|-| 6| short| weight style="background: rgb(unused255,255,204)" | Unknown
|}
'''NormalsVertex and Normal'''(?8 bytes) data:
{| borderclass="1" cellspacing="1" cellpadding="3" align="center" style="border: 1px solid black; border-collapse: collapse;wikitable"! 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 (unusedPadding)
|}
==Block explained==
Final Fantasy 8's world map is pretty much sea all around. One sea block or as I like to call it water block is made of 32 polygons, which are always triangles. The data is pretty straight forward to read with the above information. One thing to note is, that there is only 1 normal which points upwards in water block.
In FF8's world data, a segment location is predefined in currently unknown place (in engine or wmset.obj) and there are horizontally 32 and vertically 24 segments to form the world map. Each block in segments follows to same logic with 4x4 grid instead of 32x24. The first block starts from the upper left corner of the segment.
Each block have their own local bounding box, which the vertice values follow. A blocks origin is always predefined to start from upper left corner of its bounding box. This bounding box is always a size of 2048x2048 units (up and down limit is not known). This means that 2048 units or 0x800 is the local max for vertices coordinate before it overlaps with next blocks bounding box. There are no limitation to overlapping, you can extend a blocks geometry out of its bounding box and even out of the local segment. However, the collision is always calculated from the block which bounding box you are in, so extending a blocks geometry out of its bounding box doesn't make it collidable in overlapping block.