I updated the viewer to also load the skeleton and there is an option to export the model as iqe. Read below for updated "How to use?".Most of the credit goes to daemon1. He found out all of the data in the pak files and explained it really well with videos. This program is like an implementation of his findings.
I was looking at the last of us pak files, trying to find some sort of index table for vertex/face positions but I noticed that it is also possible to get this information by searching for patterns in the file, without actually using an index table.
So I made a program to find and view meshes from the pak files (ps4 version only). You can also export them as obj. I used Unity to be able to render the meshes (not very experienced with low level graphic libraries), that is why the program is a bit large.
First some screenshots to get attention
David:UPDATEDHow to Use?
It is actually pretty straight forward. You go to File->Open and select the model file (ex. "ellie-tstrm.pak") in the file selection dialog that pops up. After that another dialog pops up asking you to select the skeleton file this time. If the model has a separate skeleton file, you select that (ex. "ellie-skel-tstrm.pak"). Some models don't have separate skeleton files (like infected), instead the skeleton is inside the same file. In that case you just click "Cancel" for the second dialog, or you can just select the model file again. It will work either way.
The program will go through the file, finding meshes/skeleton and add them to the scene.
You can see the meshes that are currently in the scene, in a list box on the left. If you select a mesh from the list, it will get highlighted in the scene. Bones will also appear as white spheres but it is not possible to move/rotate the bones. They are just there to show you that the skeleton is loaded properly.
Normally the meshes should load fine. If for some reason one of the meshes appear distorted you can just disable it by checking the "Disable Mesh" box. Disabled meshes won't get exported.Controls
Right-click and move mouse : Orbit around model
Ctrl + Mouse Wheel Scroll : Zoom
Mouse Wheel Click and move mouse : Pan
W Key : Wireframe shaderExporting
There are two export options :Obj
: This will export all meshes as separate obj files. Of course there will be no skinning data and skeleton.IQE
: This will export the model as a single iqe file. IQE isn't really popular but it is a format that is not complex and that supports skinning, so I went with it.
There is a blender importer script for iqe : https://raw.githubusercontent.com/ccxvi ... _import.py
From blender you can pretty much export it to any format you want.
I exported the model as fbx and imported it in Maya. It came out fine :
Download the program : https://www.mediafire.com/?edt4a6k6mqd64tn
I tried loading some files other than the characters, like props, weapons, animals etc. and they all seemed to work fine with minor problems. Still there might be issues with some of the files, because I didn't tested every one of them. If that is the case, let me know.
If you are also interested in getting the textures, here is a tool that I posted in another thread : viewtopic.php?f=10&t=15801
Also huge thanks to luxox18. I used the data that he found out manually in the pak files as reference values/offsets while developing the program.
You can make the ads go away by registering