Page 1 of 1

Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Wed Jul 06, 2016 3:40 pm
by Cerophono
The .apak file is the file yielded after extracting it from the .cpk. I've been told it's a container for a model and its textures.
Each file has distinct sections, and some sections are more or less aligned when viewed under an at-glance, to my understanding meaning they aren't compressed.

TextureFinder doesn't reveal any raw textures, neither bitmap or DTX.

For my needs, a repackable QuickBMS script and a Noesis script (if the extracted work is not viewable in Maya or etc.) would be nice.

Sample: http://www64.zippyshare.com/v/VXiULdtV/file.html

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Thu Jul 07, 2016 4:41 am
by Acewell
i made a bms script to extract the files from your apak archive samples :D
it works on the extracted pspk archive too

Code: Select all

endian big
idstring "APAK"
get DUMMY long
get FILES long
get DUMMY longlong
get DUMMY longlong
for i = 0 < FILES
    get OFFSET long
    get DUMMY long
    get SIZE long
    get DUMMY longlong
    get DUMMY longlong
    getdstring NAME 0x20
    get DUMMY long
    log NAME OFFSET SIZE
next i
the bfres file extracted from model.apak looks like it could be a model
i think i see vertex blocks and face indices in there

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Thu Jul 07, 2016 6:12 am
by shakotay2
model-apak-pc000_00-bfres.jpg
first submesh:

0x6B40 1392
Vb1
32 99
0x1AC40 288
120000
0x0 255

uvs possibly at 1D044, size 8, WordUV

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Thu Jul 07, 2016 1:10 pm
by Cerophono
AceWell wrote: the bfres file extracted from model.apak looks like it could be a model
i think i see vertex blocks and face indices in there
The .bfres format is itself a container for graphics. It's documented for its use in Mario Kart 8, but I don't think a full map of the format has been done yet.
Typical tools to extract .bfres files don't seem to work properly for these .bfres, however.

http://mk8.tockdom.com/wiki/BFRES_(File_Format)

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Thu Jul 07, 2016 6:27 pm
by Szkaradek123
Hi
Can someone send female samples with textures ?

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Thu Jul 07, 2016 7:49 pm
by Cerophono
Szkaradek123 wrote:Hi
Can someone send female samples with textures ?
Sure. This time, I'll give the 00 outfit of pc001, and the 01 outfit of pc001. Be sure to take pics :)

The difference is the 01 outfit model.apak is 8 MB, while the 00 outfit was only 768 KB.
I'm assuming the 01 outfit actually has usable clothing meshes.

I'm pretty sure the textures are in the .apaks, just they are probably compressed by some nintendo algorithm or something.

Download: http://www79.zippyshare.com/v/k6mgNDi1/file.html

Also, does model_common.apak contain any useful data?
Edit: It seems to contain lua script and animation files for the characters.

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Sat Jul 09, 2016 9:39 am
by Szkaradek123
Hi

Here is a blend file for importing rigged models from samples in this topic and samples from http://zenhax.com/viewtopic.php?t=1225.
How use:
1. install Blender version 249b and Python version 26
2. doubleclick file "Blender249.blend"
3. press alt+p in Blender Text Window and select *.bfres files to import meshes or *.apak files to unpack archive

Fot textures use BFRESExtractor.exe (google) and "Wii U ripping tools pack" (google too)

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Sat Jul 09, 2016 9:22 pm
by Cerophono
Szkaradek123 wrote:
Fot textures use BFRESExtractor.exe (google) and "Wii U ripping tools pack" (google too)
Are you sure these work? They yield files named _dummy and when converted from .gtx to .dds, yield a black 256x256 texture.

It's only a hunch, but I don't think these follow typical BFRES usage.
Edit: Hold on, it might because 00 is totally just the dummy file.

Edit: Just me being dumb. Thanks for your work!

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Sat Jul 09, 2016 9:45 pm
by Szkaradek123
get bfres with size > 1 MB, drag and drop on BFRESExtractor.exe
move all new files (with ext gtx and without ext) to folder "Convert" from Wii U ripping tools pack and run convertGTX.bat

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Sun Jul 10, 2016 8:47 pm
by MarioSonicU
will it be possible to import .anm files

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Wed Aug 10, 2016 6:54 am
by ssringo
How were you guys able to extract the .cpk files to get the apak files? Can't find working tools or scripts for it.

Edit: I did find some tools on zenhax that could extract the cpk files but none of the apak files work with Szkaradek123's tools.

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Posted: Tue May 25, 2021 10:25 am
by SCArkadia
Hey there, I can't seem to extract APAK Files from model.apk or model_common.apak which is found in Enemy folder.

I wish to extract all enemies and mirage model and their animation so I can port it.