Jump to content

PES 2021 .gani/.mtar animation format: channel mapping, IK chains and UE5 reconstruction


Recommended Posts

Posted

Hi everyone 😁,

I’m studying the PES 2021 .gani / .mtar animation format and trying to understand how the animation data is applied to the body skeleton.

My final goal is to reproduce a similar football animation pipeline in Unreal Engine 5 for study and experimentation.

So far, I have been looking at:

.ask skeleton files

.gani / .mtar animation data

QUAT12 / QUAT_DIFF rotation tracks

root motion

track/channel mapping

IK-like chains for legs and arms

I already have my own extracted local PES 2021 files, and I’m comparing them with public tools/templates such as Fox Engine templates and old Python/Noesis scripts.

The biggest doubts I’m trying to solve are these:

In PES 2021, is ChannelIndex supposed to map directly to a bone, or does it represent a track/unit that must be interpreted through chain rules such as IK legs/arms?

For .gani/.mtar QUAT_DIFF tracks, should the decoded quaternions be applied as local absolute rotations per frame, accumulated as deltas, or combined with a skeleton/render basis?

For bones such as feet/hands that appear to have multiple channels, are those channels simple additive/end-effector tracks, or part of a chain solver?

If anyone has old notes, parser scripts, format documentation, examples, or even just remembers how this system works, any help would be extremely valuable.

I am not asking for game assets or copyrighted content to redistribute. I’m only trying to understand the technical structure and the correct animation reconstruction logic.

Thanks a lot!!!!! 😉

Posted
6 hours ago, Hazza12555 said:

are you able to send samples of anything you need help with, much appreciated!

Thanks, absolutely. I can prepare a small sample packet.

For context, we are working on PES2021 / Fox Engine animation reverse engineering, specifically football body animations from dt13.

We are not starting from zero. These are the findings we have already confirmed so far:

MTAR records appear to be 16 bytes:

Field0 = StrCode32(file_name)

Field1 = high 16 bits of StrCode48(file_name)

Field2 = clip offset

Field3 = clip size

The MOTION clip wrapper is parsed.

TrackHeader / TrackUnit / TrackData structure is parsed.

TrackDataBlob QUAT12 is structurally parsed:

FirstKey QUAT12

then repeated FrameDelta u8 + QUAT12

aligned to 2 bytes

VECTOR3 / VECTOR_DIFF 16-bit TrackDataBlob is structurally parsed.

ASK skeleton format is parsed:

header 0x08

bone record stride 0x2C

parent index at +0x08

local position float3 at +0x0C

local quaternion float4 at +0x1C

FRIG seems to map TrackUnits / channels to body animation bones.

We can already produce a Blender debug playback from a PES2021 kick animation, but the result is incomplete: lower limbs and terminal bones move, but arms/upper limbs are still not reconstructed correctly.

The current target sample is:

kick_short_0_0_inside_y0_000 anim_id: 2219 hit_frame: 8 hit_bone: sk_foot_r

The main things we need help understanding are:

How Fox/PES expects FRIG rig units to be composed, especially:

LEG_CHAIN

ARM_CHAIN

TWO_BONE / chain-like units

LOCAL_ORIENTATION / LOCAL_TRANSFORM if relevant

How to correctly apply chain channels versus simple bone channels.
For example, the foot/hand bones often have both a chain channel and a simple bone channel, while thigh/upperarm appear mainly through chain units. Our current suspicion is that a wrong chain-vs-simple selection may be causing arms to remain close to T-pose.

Whether body_anim_skel.ask or body_render_skel.ask should be used as the basis/bind pose for reconstructing the final pose.
body_anim_skel.ask has identity local quaternions, while body_render_skel.ask has non-identity basis quaternions.

How root channels should be composed:

ch0 sk_root_hip QUAT_DIFF ch1 sk_root_hip VECTOR_DIFF ch2 sk_root_hip QUAT ch3 sk_root_hip VECTOR3 ch4 dsk_hip QUAT static/one-key

Whether the static VECTOR3 values like 32766,32766,32766 on some limb chain roots are sentinel/default values, basis data, effector data, or something else.

I can share a compact packet with:

- one extracted MOTION clip sample - body_anim_skel.ask - body_render_skel.ask - body_skel.frig - CSV mapping TrackUnit/Channel -> bone name - decoded QUAT12 timeline JSON - current Blender debug viewer script - short markdown summary of confirmed structures

I would prefer to share a minimal research packet rather than large game archives. Let me know whether you prefer the sample packet here or via DM, and which exact files would be most useful to you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...