I've spent the day looking at it and I can easily determine the number of bones in the animation and where the blocks of data for each bone is but I have had no luck decyphering the blocks of data.
From what I've gathered so far:
Code: Select all
// File Header
0x00000000 char fileId[4]; // 50 41 52 20 "PAR "
0x00000004 unsigned_int16 fileVersion;
0x00000006 BYTE unknownData[10];
// Animation Details
0x00000010 unsigned_int16 boneCount;
0x00000012 float animationTime; // ?? Unsure about this ??
0x00000016 BYTE unknownData[4]; // If animationTime isn't correct this might not even be 4 bytes
// Array of Bone Animation Data
0x0000001A unsigned_int32 boneHash; // Hash value of bone, can easily get all the locations for these from using the .PAB files for reference
// Unknown layout of bone animation data
// Following data next boneHash is present
These blocks seem to be universally starting with the following data:
Code: Select all
02 00 00 00 E8 03 E8 03 E8 03
I have a bunch of bookmark files that I can upload for hex workshop if anyone is interested.
Incase anyone is curious about the bone (PAB) files, I use the following structure with Hex Workshop (load it and map the BoneFile structure to 0x0 of the file):
Code: Select all
#include "standard-types.hsl"
typedef struct FileHeader
{
CHAR fileId[4];
USHORT fileVersion;
BYTE unknown[10];
} FileHeader;
typedef struct Matrix4x4
{
FLOAT data[4][4];
} Matrix4x4;
typedef struct Vector3
{
FLOAT x;
FLOAT y;
FLOAT z;
} Vector3;
typedef struct Quaternion
{
FLOAT x;
FLOAT y;
FLOAT z;
FLOAT w;
} Quaternion;
typedef struct Bone
{
ULONG boneHash;
BYTE boneNameLength;
CHAR boneName[boneNameLength];
ULONG boneParent;
Matrix4x4 boneMatrix;
Matrix4x4 boneMatrixInverse;
Matrix4x4 boneLocalMatrix;
Matrix4x4 boneLocalMatrixInverse;
Vector3 boneScale;
Quaternion boneRotation;
Vector3 bonePosition;
BYTE unknown[2];
} Bone;
struct BoneFile
{
FileHeader fileHeader;
USHORT boneCount;
Bone bones[boneCount];
};