Help with animations: CANI format
Posted: Fri Aug 23, 2019 11:47 am
Hi guys! I was wondering if someone here could help me out getting started with reversing an animation format. The objective would be reversing it then see if it's possible creating a noesis script to export them. I want to start off by saying I am still quite the noob and learning the stuff here and there, but I am willing to do so in order to get more knowledge about this stuff...
So, the animation format I want to look at is the CANI format. This format can be found in PlayStation All-Stars Battle Royale (PSASBR) and, as far as I know, in the BluePoint Engine games generally speaking. In specific I am looking at CANI files from the PS Vita version of PSASBR. I don't have any experience with animations... so I was hoping someone here could give me some guidance. I won't be asking to just get the file and do everything yourself, but I'd need some guidance if you can see anything useful from the file, or any piece of documentation of how animations are generally structured could be of help, since I can't find much... Any help is appreciated! So far these are the only pieces of info I could get about this format. Endianness is little-endian because of the PS Vita, if you take a CANI file from a PS3 game the endianness is big-endian.
At offset 0x0 is the magic 60AE. The decoded 60 seems like it stands out for the format version, as CANI files from previous builds of this game have the decoded number being lower, such as 50AE.
Offsets 0x4 and 0x8 are Uints which purpose is not known. Being reallu big values I don't think they are important?
Offset 0xC is Ushort and it seems that it indicates an offset in the file.
Offset 0xE is another Ushort and it indicates the number of bones the animation transforms.
After there I still can't tell what the other stuff means. The next 4 bytes are definitely 2 Ushorts but I don't know what they mean yet... I should look for keyframes or something I guess? At least that's what I got when looking at the little stuff I could find online about other formats. Then the Ushort at offset 0x14 is a constant 0x2000 value in all the CANI files. Including the latters, so starting from offset 0x10 and skipping 80 bytes (that's like this for every CANI file, I don't know what these 80 bytes contain still), you can see that the values every 2 bytes are incrementing almost sequentially... I honestly don't know what they could mean. Then starting a certain offset, which seems to be the one I mentioned at 0xC, bunch of data starts.
If you want a sample file ask and I'll upload it. Any kind of help is appreciated!
So, the animation format I want to look at is the CANI format. This format can be found in PlayStation All-Stars Battle Royale (PSASBR) and, as far as I know, in the BluePoint Engine games generally speaking. In specific I am looking at CANI files from the PS Vita version of PSASBR. I don't have any experience with animations... so I was hoping someone here could give me some guidance. I won't be asking to just get the file and do everything yourself, but I'd need some guidance if you can see anything useful from the file, or any piece of documentation of how animations are generally structured could be of help, since I can't find much... Any help is appreciated! So far these are the only pieces of info I could get about this format. Endianness is little-endian because of the PS Vita, if you take a CANI file from a PS3 game the endianness is big-endian.
At offset 0x0 is the magic 60AE. The decoded 60 seems like it stands out for the format version, as CANI files from previous builds of this game have the decoded number being lower, such as 50AE.
Offsets 0x4 and 0x8 are Uints which purpose is not known. Being reallu big values I don't think they are important?
Offset 0xC is Ushort and it seems that it indicates an offset in the file.
Offset 0xE is another Ushort and it indicates the number of bones the animation transforms.
After there I still can't tell what the other stuff means. The next 4 bytes are definitely 2 Ushorts but I don't know what they mean yet... I should look for keyframes or something I guess? At least that's what I got when looking at the little stuff I could find online about other formats. Then the Ushort at offset 0x14 is a constant 0x2000 value in all the CANI files. Including the latters, so starting from offset 0x10 and skipping 80 bytes (that's like this for every CANI file, I don't know what these 80 bytes contain still), you can see that the values every 2 bytes are incrementing almost sequentially... I honestly don't know what they could mean. Then starting a certain offset, which seems to be the one I mentioned at 0xC, bunch of data starts.
If you want a sample file ask and I'll upload it. Any kind of help is appreciated!