08-18-2015, 02:36 AM
I think I've figured out a lot of the animation data, though I'm still not too sure on everything. I've mainly looked at fighter data (a small subset of it), other model types might have additional data that I haven't looked at yet.
.omo
List of all animType fixed and frame data sizes (calculated by doing size = channel[i+i].offset - channel[i].offset):
.mta
.omo
Header:
char magic[4] - "OMO "
uint16 unknown[2]
uint32 unknown
uint16 unknown
uint16 channelCount
uint16 frameCount
uint16 frameSize
uint32 channelTableOffset
uint32 fixedDataOffset
uint32 frameDataOffset
Channel Table Entries:
uint32 animType
uint32 boneId // matches id in vbn (2 bytes after bone parent index in vbn)
uint32 offsetInFixedData
uint32 offsetInFrame
Fixed data size and frame data size for a channel is determined by it's animType - can be empty
Types:
Constant - 1x Vector3f (constant on all frames, no frame data)
Interpolated - 2x Vector3f (frame has interpolation value for each coordinate)
There are others I haven't figured out
Frame Data:
buffer frameData[frameCount][frameSize]
Channel frame data starts at: frameData[frameNum] + frameDataOffset
Seems to be uint16 interpolation values (i.e. 0x0000-0xffff for 0.0 - 1.0)
Eyeballing translation and scale values looks based on this looks sane, I'm not sure about rotation.
animType bit field guesses:
0x04000000 - has scale
0x02000000 - has rotation
0x01000000 - has translation
0x00200000 - translation constant
0x00080000 - translation interpolated
0x00007000 - rotation constant
0x00005000 - rotation interpolated
0x00000200 - scale constant
0x00000080 - scale interpolated
char magic[4] - "OMO "
uint16 unknown[2]
uint32 unknown
uint16 unknown
uint16 channelCount
uint16 frameCount
uint16 frameSize
uint32 channelTableOffset
uint32 fixedDataOffset
uint32 frameDataOffset
Channel Table Entries:
uint32 animType
uint32 boneId // matches id in vbn (2 bytes after bone parent index in vbn)
uint32 offsetInFixedData
uint32 offsetInFrame
Fixed data size and frame data size for a channel is determined by it's animType - can be empty
Types:
Constant - 1x Vector3f (constant on all frames, no frame data)
Interpolated - 2x Vector3f (frame has interpolation value for each coordinate)
There are others I haven't figured out
Frame Data:
buffer frameData[frameCount][frameSize]
Channel frame data starts at: frameData[frameNum] + frameDataOffset
Seems to be uint16 interpolation values (i.e. 0x0000-0xffff for 0.0 - 1.0)
Eyeballing translation and scale values looks based on this looks sane, I'm not sure about rotation.
animType bit field guesses:
0x04000000 - has scale
0x02000000 - has rotation
0x01000000 - has translation
0x00200000 - translation constant
0x00080000 - translation interpolated
0x00007000 - rotation constant
0x00005000 - rotation interpolated
0x00000200 - scale constant
0x00000080 - scale interpolated
AnimType: 0x0004a081 FixedSize: 0 FrameSize: 0
AnimType: 0x00085081 FixedSize: 0 FrameSize: 0
AnimType: 0x01000081 FixedSize: 0 FrameSize: 16
AnimType: 0x01040081 FixedSize: 0 FrameSize: 12
AnimType: 0x01045081 FixedSize: 0 FrameSize: 12
AnimType: 0x0104a081 FixedSize: 0 FrameSize: 12
AnimType: 0x01084081 FixedSize: 24 FrameSize: 6
AnimType: 0x01085081 FixedSize: 24 FrameSize: 6
AnimType: 0x01089081 FixedSize: 24 FrameSize: 6
AnimType: 0x0108a081 FixedSize: 24 FrameSize: 6
AnimType: 0x01200081 FixedSize: 12 FrameSize: 0
AnimType: 0x01203081 FixedSize: 12 FrameSize: 0
AnimType: 0x01205081 FixedSize: 12 FrameSize: 0
AnimType: 0x01209081 FixedSize: 12 FrameSize: 0
AnimType: 0x0120a081 FixedSize: 12 FrameSize: 0
AnimType: 0x0204a081 FixedSize: 0 FrameSize: 8
AnimType: 0x02085081 FixedSize: 24 FrameSize: 6
AnimType: 0x02086081 FixedSize: 16 FrameSize: 2
AnimType: 0x02087081 FixedSize: 12 FrameSize: 0
AnimType: 0x03000081 FixedSize: 0 FrameSize: 32
AnimType: 0x03005081 FixedSize: 24 FrameSize: 22
AnimType: 0x03007081 FixedSize: 12 FrameSize: 16
AnimType: 0x0300a081 FixedSize: 0 FrameSize: 24
AnimType: 0x03040081 FixedSize: 0 FrameSize: 28
AnimType: 0x03045081 FixedSize: 24 FrameSize: 18
AnimType: 0x03046081 FixedSize: 16 FrameSize: 14
AnimType: 0x0304a081 FixedSize: 0 FrameSize: 20
AnimType: 0x03080081 FixedSize: 24 FrameSize: 22
AnimType: 0x03083081 FixedSize: 24 FrameSize: 19
AnimType: 0x03084081 FixedSize: 24 FrameSize: 10
AnimType: 0x03085081 FixedSize: 48 FrameSize: 12
AnimType: 0x03086081 FixedSize: 40 FrameSize: 8
AnimType: 0x03087081 FixedSize: 36 FrameSize: 6
AnimType: 0x03089081 FixedSize: 24 FrameSize: 13
AnimType: 0x0308a081 FixedSize: 24 FrameSize: 14
AnimType: 0x03200081 FixedSize: 12 FrameSize: 16
AnimType: 0x03205081 FixedSize: 36 FrameSize: 6
AnimType: 0x03206081 FixedSize: 28 FrameSize: 2
AnimType: 0x03207081 FixedSize: 24 FrameSize: 0
AnimType: 0x03209081 FixedSize: 12 FrameSize: 7
AnimType: 0x0320a081 FixedSize: 12 FrameSize: 8
AnimType: 0x04085081 FixedSize: 24 FrameSize: 6
AnimType: 0x04085201 FixedSize: 12 FrameSize: 0
AnimType: 0x05000081 FixedSize: 24 FrameSize: 22
AnimType: 0x05005081 FixedSize: 24 FrameSize: 22
AnimType: 0x05040081 FixedSize: 24 FrameSize: 18
AnimType: 0x05043201 FixedSize: 12 FrameSize: 12
AnimType: 0x05045081 FixedSize: 24 FrameSize: 18
AnimType: 0x0504a081 FixedSize: 24 FrameSize: 18
AnimType: 0x05080081 FixedSize: 48 FrameSize: 12
AnimType: 0x05083081 FixedSize: 48 FrameSize: 12
AnimType: 0x05085081 FixedSize: 48 FrameSize: 12
AnimType: 0x05085201 FixedSize: 36 FrameSize: 6
AnimType: 0x05089201 FixedSize: 36 FrameSize: 6
AnimType: 0x0508a081 FixedSize: 48 FrameSize: 12
AnimType: 0x05200081 FixedSize: 36 FrameSize: 6
AnimType: 0x05203081 FixedSize: 36 FrameSize: 6
AnimType: 0x05205081 FixedSize: 36 FrameSize: 6
AnimType: 0x05205201 FixedSize: 24 FrameSize: 0
AnimType: 0x05209201 FixedSize: 24 FrameSize: 0
AnimType: 0x0520a081 FixedSize: 36 FrameSize: 6
AnimType: 0x0520a201 FixedSize: 24 FrameSize: 0
AnimType: 0x0604a081 FixedSize: 24 FrameSize: 14
AnimType: 0x0604a201 FixedSize: 12 FrameSize: 8
AnimType: 0x06085081 FixedSize: 48 FrameSize: 12
AnimType: 0x06085201 FixedSize: 36 FrameSize: 6
AnimType: 0x06086081 FixedSize: 40 FrameSize: 8
AnimType: 0x06086201 FixedSize: 28 FrameSize: 2
AnimType: 0x06087081 FixedSize: 36 FrameSize: 6
AnimType: 0x06087201 FixedSize: 24 FrameSize: 0
AnimType: 0x07000201 FixedSize: 12 FrameSize: 32
AnimType: 0x07005081 FixedSize: 48 FrameSize: 28
AnimType: 0x07007081 FixedSize: 36 FrameSize: 22
AnimType: 0x07007201 FixedSize: 24 FrameSize: 16
AnimType: 0x07040081 FixedSize: 24 FrameSize: 34
AnimType: 0x07040201 FixedSize: 12 FrameSize: 28
AnimType: 0x07043201 FixedSize: 12 FrameSize: 25
AnimType: 0x07045081 FixedSize: 48 FrameSize: 24
AnimType: 0x07047081 FixedSize: 36 FrameSize: 18
AnimType: 0x07047201 FixedSize: 24 FrameSize: 12
AnimType: 0x0704a081 FixedSize: 24 FrameSize: 26
AnimType: 0x0704a201 FixedSize: 12 FrameSize: 20
AnimType: 0x07080081 FixedSize: 48 FrameSize: 28
AnimType: 0x07083081 FixedSize: 48 FrameSize: 25
AnimType: 0x07085081 FixedSize: 72 FrameSize: 18
AnimType: 0x07085201 FixedSize: 60 FrameSize: 12
AnimType: 0x07086081 FixedSize: 64 FrameSize: 14
AnimType: 0x07086201 FixedSize: 52 FrameSize: 8
AnimType: 0x07087081 FixedSize: 60 FrameSize: 12
AnimType: 0x07087201 FixedSize: 48 FrameSize: 6
AnimType: 0x07089201 FixedSize: 36 FrameSize: 13
AnimType: 0x0708a081 FixedSize: 48 FrameSize: 20
AnimType: 0x07200081 FixedSize: 36 FrameSize: 22
AnimType: 0x07203081 FixedSize: 36 FrameSize: 19
AnimType: 0x07205081 FixedSize: 60 FrameSize: 12
AnimType: 0x07205201 FixedSize: 48 FrameSize: 6
AnimType: 0x07206081 FixedSize: 52 FrameSize: 8
AnimType: 0x07206201 FixedSize: 40 FrameSize: 2
AnimType: 0x07207081 FixedSize: 48 FrameSize: 6
AnimType: 0x07207201 FixedSize: 36 FrameSize: 0
AnimType: 0x07209081 FixedSize: 36 FrameSize: 13
AnimType: 0x07209201 FixedSize: 24 FrameSize: 7
AnimType: 0x0720a081 FixedSize: 36 FrameSize: 14
AnimType: 0x0720a201 FixedSize: 24 FrameSize: 8
AnimType: 0x08085081 FixedSize: 0 FrameSize: 12
AnimType: 0x09085081 FixedSize: 24 FrameSize: 18
AnimType: 0x0b085081 FixedSize: 48 FrameSize: 24
AnimType: 0x0b087081 FixedSize: 36 FrameSize: 18
AnimType: 0x00085081 FixedSize: 0 FrameSize: 0
AnimType: 0x01000081 FixedSize: 0 FrameSize: 16
AnimType: 0x01040081 FixedSize: 0 FrameSize: 12
AnimType: 0x01045081 FixedSize: 0 FrameSize: 12
AnimType: 0x0104a081 FixedSize: 0 FrameSize: 12
AnimType: 0x01084081 FixedSize: 24 FrameSize: 6
AnimType: 0x01085081 FixedSize: 24 FrameSize: 6
AnimType: 0x01089081 FixedSize: 24 FrameSize: 6
AnimType: 0x0108a081 FixedSize: 24 FrameSize: 6
AnimType: 0x01200081 FixedSize: 12 FrameSize: 0
AnimType: 0x01203081 FixedSize: 12 FrameSize: 0
AnimType: 0x01205081 FixedSize: 12 FrameSize: 0
AnimType: 0x01209081 FixedSize: 12 FrameSize: 0
AnimType: 0x0120a081 FixedSize: 12 FrameSize: 0
AnimType: 0x0204a081 FixedSize: 0 FrameSize: 8
AnimType: 0x02085081 FixedSize: 24 FrameSize: 6
AnimType: 0x02086081 FixedSize: 16 FrameSize: 2
AnimType: 0x02087081 FixedSize: 12 FrameSize: 0
AnimType: 0x03000081 FixedSize: 0 FrameSize: 32
AnimType: 0x03005081 FixedSize: 24 FrameSize: 22
AnimType: 0x03007081 FixedSize: 12 FrameSize: 16
AnimType: 0x0300a081 FixedSize: 0 FrameSize: 24
AnimType: 0x03040081 FixedSize: 0 FrameSize: 28
AnimType: 0x03045081 FixedSize: 24 FrameSize: 18
AnimType: 0x03046081 FixedSize: 16 FrameSize: 14
AnimType: 0x0304a081 FixedSize: 0 FrameSize: 20
AnimType: 0x03080081 FixedSize: 24 FrameSize: 22
AnimType: 0x03083081 FixedSize: 24 FrameSize: 19
AnimType: 0x03084081 FixedSize: 24 FrameSize: 10
AnimType: 0x03085081 FixedSize: 48 FrameSize: 12
AnimType: 0x03086081 FixedSize: 40 FrameSize: 8
AnimType: 0x03087081 FixedSize: 36 FrameSize: 6
AnimType: 0x03089081 FixedSize: 24 FrameSize: 13
AnimType: 0x0308a081 FixedSize: 24 FrameSize: 14
AnimType: 0x03200081 FixedSize: 12 FrameSize: 16
AnimType: 0x03205081 FixedSize: 36 FrameSize: 6
AnimType: 0x03206081 FixedSize: 28 FrameSize: 2
AnimType: 0x03207081 FixedSize: 24 FrameSize: 0
AnimType: 0x03209081 FixedSize: 12 FrameSize: 7
AnimType: 0x0320a081 FixedSize: 12 FrameSize: 8
AnimType: 0x04085081 FixedSize: 24 FrameSize: 6
AnimType: 0x04085201 FixedSize: 12 FrameSize: 0
AnimType: 0x05000081 FixedSize: 24 FrameSize: 22
AnimType: 0x05005081 FixedSize: 24 FrameSize: 22
AnimType: 0x05040081 FixedSize: 24 FrameSize: 18
AnimType: 0x05043201 FixedSize: 12 FrameSize: 12
AnimType: 0x05045081 FixedSize: 24 FrameSize: 18
AnimType: 0x0504a081 FixedSize: 24 FrameSize: 18
AnimType: 0x05080081 FixedSize: 48 FrameSize: 12
AnimType: 0x05083081 FixedSize: 48 FrameSize: 12
AnimType: 0x05085081 FixedSize: 48 FrameSize: 12
AnimType: 0x05085201 FixedSize: 36 FrameSize: 6
AnimType: 0x05089201 FixedSize: 36 FrameSize: 6
AnimType: 0x0508a081 FixedSize: 48 FrameSize: 12
AnimType: 0x05200081 FixedSize: 36 FrameSize: 6
AnimType: 0x05203081 FixedSize: 36 FrameSize: 6
AnimType: 0x05205081 FixedSize: 36 FrameSize: 6
AnimType: 0x05205201 FixedSize: 24 FrameSize: 0
AnimType: 0x05209201 FixedSize: 24 FrameSize: 0
AnimType: 0x0520a081 FixedSize: 36 FrameSize: 6
AnimType: 0x0520a201 FixedSize: 24 FrameSize: 0
AnimType: 0x0604a081 FixedSize: 24 FrameSize: 14
AnimType: 0x0604a201 FixedSize: 12 FrameSize: 8
AnimType: 0x06085081 FixedSize: 48 FrameSize: 12
AnimType: 0x06085201 FixedSize: 36 FrameSize: 6
AnimType: 0x06086081 FixedSize: 40 FrameSize: 8
AnimType: 0x06086201 FixedSize: 28 FrameSize: 2
AnimType: 0x06087081 FixedSize: 36 FrameSize: 6
AnimType: 0x06087201 FixedSize: 24 FrameSize: 0
AnimType: 0x07000201 FixedSize: 12 FrameSize: 32
AnimType: 0x07005081 FixedSize: 48 FrameSize: 28
AnimType: 0x07007081 FixedSize: 36 FrameSize: 22
AnimType: 0x07007201 FixedSize: 24 FrameSize: 16
AnimType: 0x07040081 FixedSize: 24 FrameSize: 34
AnimType: 0x07040201 FixedSize: 12 FrameSize: 28
AnimType: 0x07043201 FixedSize: 12 FrameSize: 25
AnimType: 0x07045081 FixedSize: 48 FrameSize: 24
AnimType: 0x07047081 FixedSize: 36 FrameSize: 18
AnimType: 0x07047201 FixedSize: 24 FrameSize: 12
AnimType: 0x0704a081 FixedSize: 24 FrameSize: 26
AnimType: 0x0704a201 FixedSize: 12 FrameSize: 20
AnimType: 0x07080081 FixedSize: 48 FrameSize: 28
AnimType: 0x07083081 FixedSize: 48 FrameSize: 25
AnimType: 0x07085081 FixedSize: 72 FrameSize: 18
AnimType: 0x07085201 FixedSize: 60 FrameSize: 12
AnimType: 0x07086081 FixedSize: 64 FrameSize: 14
AnimType: 0x07086201 FixedSize: 52 FrameSize: 8
AnimType: 0x07087081 FixedSize: 60 FrameSize: 12
AnimType: 0x07087201 FixedSize: 48 FrameSize: 6
AnimType: 0x07089201 FixedSize: 36 FrameSize: 13
AnimType: 0x0708a081 FixedSize: 48 FrameSize: 20
AnimType: 0x07200081 FixedSize: 36 FrameSize: 22
AnimType: 0x07203081 FixedSize: 36 FrameSize: 19
AnimType: 0x07205081 FixedSize: 60 FrameSize: 12
AnimType: 0x07205201 FixedSize: 48 FrameSize: 6
AnimType: 0x07206081 FixedSize: 52 FrameSize: 8
AnimType: 0x07206201 FixedSize: 40 FrameSize: 2
AnimType: 0x07207081 FixedSize: 48 FrameSize: 6
AnimType: 0x07207201 FixedSize: 36 FrameSize: 0
AnimType: 0x07209081 FixedSize: 36 FrameSize: 13
AnimType: 0x07209201 FixedSize: 24 FrameSize: 7
AnimType: 0x0720a081 FixedSize: 36 FrameSize: 14
AnimType: 0x0720a201 FixedSize: 24 FrameSize: 8
AnimType: 0x08085081 FixedSize: 0 FrameSize: 12
AnimType: 0x09085081 FixedSize: 24 FrameSize: 18
AnimType: 0x0b085081 FixedSize: 48 FrameSize: 24
AnimType: 0x0b087081 FixedSize: 36 FrameSize: 18
Header:
char magic[4] - "MTA4"
uint32 unknown
uint32 numFrames
uint32 zeroes
uint32 numFramesMinusOne
uint32 frameRate // probably
uint32 matCount
uint32 matOffset
uint32 visCount
uint32 visOffset
Unless otherwise stated, count/offset pairs point to an array of offsets to the actual data:
uint32 offsets[]
MAT entry:
uint32 nameOffset // Material name? Haven't found these anywhere else
uint32 unknown
uint32 blockCount
uint32 blockOffset
uint32 zeroes
uint32 endOffset // of this MTA entry
MAT entry block:
uint32 nameOffset // Material param names
uint32 unknown // 1
uint32 unknown // 4
uint32 dataCount
uint32 unknown // 0, 1
uint32 unknown // 1, 2
uint32 dataOffset
MAT entry block data:
float data[dataCount]
VIS entry:
uint32 nameOffset // Model object name
uint32 zeroes
uint32 dataOffset
VIS data:
uint32 frameCount
uint32 unknown // 1
uint32 keyframeCount
uint32 keyframeOffset // This points directly to keyframe data array
VIS data keyframe (list of transitions to off or on):
uint16 frameNumber
uint8 on
uint8 zeroes
char magic[4] - "MTA4"
uint32 unknown
uint32 numFrames
uint32 zeroes
uint32 numFramesMinusOne
uint32 frameRate // probably
uint32 matCount
uint32 matOffset
uint32 visCount
uint32 visOffset
Unless otherwise stated, count/offset pairs point to an array of offsets to the actual data:
uint32 offsets[]
MAT entry:
uint32 nameOffset // Material name? Haven't found these anywhere else
uint32 unknown
uint32 blockCount
uint32 blockOffset
uint32 zeroes
uint32 endOffset // of this MTA entry
MAT entry block:
uint32 nameOffset // Material param names
uint32 unknown // 1
uint32 unknown // 4
uint32 dataCount
uint32 unknown // 0, 1
uint32 unknown // 1, 2
uint32 dataOffset
MAT entry block data:
float data[dataCount]
VIS entry:
uint32 nameOffset // Model object name
uint32 zeroes
uint32 dataOffset
VIS data:
uint32 frameCount
uint32 unknown // 1
uint32 keyframeCount
uint32 keyframeOffset // This points directly to keyframe data array
VIS data keyframe (list of transitions to off or on):
uint16 frameNumber
uint8 on
uint8 zeroes