Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post questions about game models here, or help out others!
Post Reply
Cerophono
ultra-n00b
Posts: 7
Joined: Fri Dec 19, 2014 12:42 am
Has thanked: 4 times
Been thanked: 2 times

Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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
Acewell
VIP member
VIP member
Posts: 1330
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2710 times
Been thanked: 884 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4286
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1148 times
Been thanked: 2242 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Cerophono
ultra-n00b
Posts: 7
Joined: Fri Dec 19, 2014 12:42 am
Has thanked: 4 times
Been thanked: 2 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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)
Szkaradek123
mega-veteran
mega-veteran
Posts: 292
Joined: Wed May 05, 2010 8:21 pm
Location: Poland Głogów
Has thanked: 21 times
Been thanked: 742 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post by Szkaradek123 »

Hi
Can someone send female samples with textures ?
You do not have the required permissions to view the files attached to this post.
Cerophono
ultra-n00b
Posts: 7
Joined: Fri Dec 19, 2014 12:42 am
Has thanked: 4 times
Been thanked: 2 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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.
Last edited by Cerophono on Sat Jul 09, 2016 9:36 pm, edited 1 time in total.
Szkaradek123
mega-veteran
mega-veteran
Posts: 292
Joined: Wed May 05, 2010 8:21 pm
Location: Poland Głogów
Has thanked: 21 times
Been thanked: 742 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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)
You do not have the required permissions to view the files attached to this post.
Cerophono
ultra-n00b
Posts: 7
Joined: Fri Dec 19, 2014 12:42 am
Has thanked: 4 times
Been thanked: 2 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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!
Szkaradek123
mega-veteran
mega-veteran
Posts: 292
Joined: Wed May 05, 2010 8:21 pm
Location: Poland Głogów
Has thanked: 21 times
Been thanked: 742 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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
MarioSonicU
advanced
Posts: 75
Joined: Thu Jun 25, 2015 11:26 pm
Has thanked: 9 times
Been thanked: 2 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post by MarioSonicU »

will it be possible to import .anm files
ssringo
veteran
Posts: 98
Joined: Sat Apr 19, 2014 8:02 am
Has thanked: 46 times
Been thanked: 13 times

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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.
SCArkadia
n00b
Posts: 10
Joined: Mon May 24, 2021 12:50 am

Re: Tokyo Mirage Sessions / Genei Ibun Roku .apak

Post 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.
Post Reply