PATH (File Format): Difference between revisions
Jump to navigation
Jump to search
>Aruki (Created page with "The '''PATH format''' is used to store pathfinding data in the Metroid Prime series. {{research|major|Very little is known about this format.}} Category:File Formats C...") |
imported>Jackoalan No edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
The '''PATH format''' is used to store | {{research|2|The BSP tables at the end need research}} | ||
The '''PATH format''' is used to store an area's [[wikipedia:Navigation mesh|Navigation Mesh]] in the ''Metroid Prime'' series. | |||
Like navigation meshes in many other game engines (Unreal Engine 2, Source, etc...), the PATH format represents an ''n-gon mesh'' | |||
partitioned into a BSP tree for rapid queries. | |||
'''Please Note:''' PATH meshes use the local coordinate system of the MREA. | |||
One must multiply PATH coordinates as a column-vector with the matrix at offset 0x8 in the MREA to get world coordinates. | |||
== Format == | |||
{| class="wikitable" | |||
!Data Type | |||
!Description | |||
!Notes | |||
|- | |||
|long | |||
|Version | |||
|Always 0x4 in GM8E-0-00 and Trilogy release. | |||
|- | |||
|long | |||
|Vertex count | |||
| | |||
|- | |||
|[[#Vertex Entry|Vertex Entry]] | |||
|Vertex Table | |||
| | |||
|- | |||
|long | |||
|Edge count | |||
| | |||
|- | |||
|[[#Edge Entry|Edge Entry]] | |||
|Edge Table | |||
| | |||
|- | |||
|long | |||
|Polygon count | |||
| | |||
|- | |||
|[[#Polygon Entry|Polygon Entry]] | |||
|Polygon Table | |||
| | |||
|- | |||
|Unknown | |||
|BSP Tables | |||
| | |||
|- | |||
|} | |||
=== Vertex Entry === | |||
{| class="wikitable" | |||
!Offset | |||
!Length | |||
!Data Type | |||
!Description | |||
!Notes | |||
|- | |||
|0x0 | |||
|12 | |||
|float3 | |||
|Vertex Position | |||
| | |||
|- | |||
|0xC | |||
|12 | |||
|float3 | |||
|Vertex Normal | |||
| | |||
|} | |||
=== Edge Entry === | |||
{| class="wikitable" | |||
!Offset | |||
!Length | |||
!Data Type | |||
!Description | |||
!Notes | |||
|- | |||
|0x0 | |||
|4 | |||
|long | |||
|Polygon A index | |||
|References into [[#Polygon Entry|Polygon Table]] | |||
|- | |||
|0x4 | |||
|4 | |||
|long | |||
|Polygon B index | |||
|References into [[#Polygon Entry|Polygon Table]] | |||
|- | |||
|0x8 | |||
|4 | |||
|float | |||
|Edge Length | |||
| | |||
|- | |||
|0xC | |||
|4 | |||
|float | |||
|{{unknown|Unknown Value}} | |||
|Speculation: ''Cost'' of edge traversal (i.e. edge steepness). Characters may have a set threshold when selecting edges to traverse. | |||
|} | |||
=== Polygon Entry === | |||
{| class="wikitable" | |||
!Offset | |||
!Length | |||
!Data Type | |||
!Description | |||
!Notes | |||
|- | |||
|0x0 | |||
|4 | |||
|long | |||
|Vertex Count | |||
|Specifies range of vertices | |||
|- | |||
|0x4 | |||
|4 | |||
|long | |||
|Vertex Start Index | |||
|References into [[#Vertex Entry|Vertex Table]] | |||
|- | |||
|0x8 | |||
|4 | |||
|long | |||
|Edge Count | |||
|Specifies range of edges | |||
|- | |||
|0xC | |||
|4 | |||
|long | |||
|Edge Start Index | |||
|References into [[#Edge Entry|Edge Table]] | |||
|- | |||
|0x10 | |||
|2 | |||
|short | |||
|{{unknown|Unknown meta-data}} | |||
|Range [1,7] | |||
|- | |||
|0x12 | |||
|2 | |||
|short | |||
|{{unknown|Unknown meta-data}} | |||
|Possible Values (1,2,4) | |||
|- | |||
|0x14 | |||
|4 | |||
|float | |||
|Polygon area | |||
| | |||
|- | |||
|0x18 | |||
|12 | |||
|float3 | |||
|Polygon normal | |||
| | |||
|- | |||
|0x24 | |||
|4 | |||
|long | |||
|Self-index | |||
|References polygon's own index in table | |||
|- | |||
|0x28 | |||
|12 | |||
|float3 | |||
|Polygon center position | |||
| | |||
|- | |||
|0x34 | |||
|12 | |||
|float3 | |||
|AABB-min | |||
| | |||
|- | |||
|0x40 | |||
|12 | |||
|float3 | |||
|AABB-max | |||
| | |||
|- | |||
|0x4C | |||
|4 | |||
|long | |||
|Self-index | |||
|A duplicate of the 0x24 value for some reason | |||
|} | |||
[[Category:File Formats]] | [[Category:File Formats]] | ||
[[Category:Metroid Prime]] | [[Category:Metroid Prime]] | ||
[[Category:Metroid Prime 2: Echoes]] | |||
[[Category:Metroid Prime 3: Corruption]] |
Latest revision as of 18:04, 6 March 2015
This file format needs more research The BSP tables at the end need research |
The PATH format is used to store an area's Navigation Mesh in the Metroid Prime series. Like navigation meshes in many other game engines (Unreal Engine 2, Source, etc...), the PATH format represents an n-gon mesh partitioned into a BSP tree for rapid queries.
Please Note: PATH meshes use the local coordinate system of the MREA. One must multiply PATH coordinates as a column-vector with the matrix at offset 0x8 in the MREA to get world coordinates.
Format
Data Type | Description | Notes |
---|---|---|
long | Version | Always 0x4 in GM8E-0-00 and Trilogy release. |
long | Vertex count | |
Vertex Entry | Vertex Table | |
long | Edge count | |
Edge Entry | Edge Table | |
long | Polygon count | |
Polygon Entry | Polygon Table | |
Unknown | BSP Tables |
Vertex Entry
Offset | Length | Data Type | Description | Notes |
---|---|---|---|---|
0x0 | 12 | float3 | Vertex Position | |
0xC | 12 | float3 | Vertex Normal |
Edge Entry
Offset | Length | Data Type | Description | Notes |
---|---|---|---|---|
0x0 | 4 | long | Polygon A index | References into Polygon Table |
0x4 | 4 | long | Polygon B index | References into Polygon Table |
0x8 | 4 | float | Edge Length | |
0xC | 4 | float | Unknown Value | Speculation: Cost of edge traversal (i.e. edge steepness). Characters may have a set threshold when selecting edges to traverse. |
Polygon Entry
Offset | Length | Data Type | Description | Notes |
---|---|---|---|---|
0x0 | 4 | long | Vertex Count | Specifies range of vertices |
0x4 | 4 | long | Vertex Start Index | References into Vertex Table |
0x8 | 4 | long | Edge Count | Specifies range of edges |
0xC | 4 | long | Edge Start Index | References into Edge Table |
0x10 | 2 | short | Unknown meta-data | Range [1,7] |
0x12 | 2 | short | Unknown meta-data | Possible Values (1,2,4) |
0x14 | 4 | float | Polygon area | |
0x18 | 12 | float3 | Polygon normal | |
0x24 | 4 | long | Self-index | References polygon's own index in table |
0x28 | 12 | float3 | Polygon center position | |
0x34 | 12 | float3 | AABB-min | |
0x40 | 12 | float3 | AABB-max | |
0x4C | 4 | long | Self-index | A duplicate of the 0x24 value for some reason |