Page 4 of 13

Re: Alien Isolation (.PAK .BIN)

Posted: Thu Nov 06, 2014 9:43 pm
by erik945
Ok, no problem.
We need to open a new topic in 3d, or write here?

Re: Alien Isolation (.PAK .BIN)

Posted: Fri Nov 07, 2014 12:11 am
by magister
Ok, start topic in 3d. This topic about resource xtaction, hmmm.

Re: Alien Isolation (.PAK .BIN)

Posted: Fri Nov 07, 2014 1:26 pm
by cra0
magister wrote:Ok, start topic in 3d. This topic about resource xtaction, hmmm.
no the paks and bins both are essentially the models themselves. I'm working on understanding the structures more and so is volfin

Re: Alien Isolation (.PAK .BIN)

Posted: Sun Nov 09, 2014 9:46 am
by JPulowski
There is a problem when trying to unpack UI.PAK. Looks like it already contains the headers within it.
AIPAKTool:

Code: Select all

 ---Alien Isolation PAKTool---
 ---Version 0.1---
 ---Authors: Cra0kalo---
 ---http://dev.cra0kalo.com ---

Starting...
----------------------------------------------------------------------------
InputFile: UI.PAK
InputFilePath: D:\_temp\UI.PAK
ExportPath: D:\_temp\_extracted

Initalizing PAK Export..
Reading Package
----------------------------------------------------------------------------
----------------------------------------------------------------------------
ERROR: looking for blank 4bytes
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Fault detected ParseMTL() Skipped!
Fault detected Export() Skipped!
Fault detected Cleanup() Skipped!
----------------------------------------------------------------------------
----------------------------------------------------------------------------
An error has occurred somewhere during the export processs.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
AITexExtract:

Code: Select all

----------------------------------------------------------------------------
----------------------------------------------------------------------------
ERROR: looking for blank 4bytes
----------------------------------------------------------------------------
----------------------------------------------------------------------------
There are two UI.PAK files:
...\DATA\UI.PAK
...\DATA\GLOBAL\UI.PAK

Also there are some .dds files labeled as "flash" which cannot be recognized correctly by WTV, NVIDIA DDS Plugin and texgenpack.
e.g.: screen_anim_int_13[flash].tga.dds (...\DATA\ENV\GLOBAL\WORLD\GLOBAL_TEXTURES.ALL.PAK\ayz\flash\)
screen_anim_int_13[flash].info:

Code: Select all

TextureInfo
{
  TexPath: ayz\flash\screen_anim_int_13[flash].tga
  Width: 1024
  Height: 760
  ChunkSizeA: 3112960
  ChunkSizeB: 3112960
  
      TexHeader
      {
          magic4:tex4
          DXGI_FORMAT:DXGI_FORMAT_B8G8R8A8_UNORM
          unk2:0
          texchunkSize:3112960
          varSlotSub:1024
          varSlot:760
          varSlot2:1
          width:1024
          height:760
          unk6_a:1
          unk7:65537
          unk8:65
          unk9:268435456
          unk10:6721
          unk11:0
      }
        
}

Re: Alien Isolation (.PAK .BIN)

Posted: Sun Nov 09, 2014 11:38 am
by erik945
about 3d models...
Very strange data structure.
0x0000 first 4 bytes - unknown.
0x0004 - int32 - number of objects.

0x0014 - records about the objects
format:
- Unknown int32, usually 0
- Object number int32 BigEndian (BigEndian on PC ???)
- Offset from the beginning file of the object's body int32 BigEndian
- Unknown int32

The body of the object is divided into two parts.

First - presumably - information about the vertices.
At each vertex allocated 8 bytes - it is very small, only 2 coordinates in the format of the float, but the data in the file - do not look like a valid float (very large scatter in the values of the E-38 to E + 40, it seems that the data compressed, or use exotic encoding as varint (https://golang.org/src/pkg/encoding/binary/varint.go), or errors).
Example - entru447.omodel - offset 0x0070

The second - the indices of vertices in the polygon.
LitleEndian unsignd shorts (2 bytes)

Are you sure you unpaker working correctly?

Re: Alien Isolation (.PAK .BIN)

Posted: Tue Nov 11, 2014 3:51 am
by cra0
erik945 wrote:about 3d models...
Very strange data structure.
0x0000 first 4 bytes - unknown.
0x0004 - int32 - number of objects.

0x0014 - records about the objects
format:
- Unknown int32, usually 0
- Object number int32 BigEndian (BigEndian on PC ???)
- Offset from the beginning file of the object's body int32 BigEndian
- Unknown int32

The body of the object is divided into two parts.

First - presumably - information about the vertices.
At each vertex allocated 8 bytes - it is very small, only 2 coordinates in the format of the float, but the data in the file - do not look like a valid float (very large scatter in the values of the E-38 to E + 40, it seems that the data compressed, or use exotic encoding as varint (https://golang.org/src/pkg/encoding/binary/varint.go), or errors).
Example - entru447.omodel - offset 0x0070

The second - the indices of vertices in the polygon.
LitleEndian unsignd shorts (2 bytes)

Are you sure you unpaker working correctly?
Yes exporter works fine

Code: Select all

typedef struct
{
   uint32   hookTagIndex;
   uint32   tableA_count;
   uint32   ozero1;
   uint32   ozero2;
   uint32   ozero3;
   uint32   ozero4;
} omdlhead;

typedef struct
{
   uint32   valFlagCounter; //goes up?
   uint32   localOffset;
   uint32   localSize;
   uint32   azero;
} omdltableA;


Vertex shader signature

Code: Select all

// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// POSITION                 0   xyzw        0     NONE   float   xyz 
// NORMAL                   0   xyz         1     NONE   float       
// TANGENT                  0   xyz         2     NONE   float       
// BINORMAL                 0   xyz         3     NONE   float       
// BLENDINDICES             0   xyzw        4     NONE    uint   xyzw
// BLENDWEIGHT              0   xyzw        5     NONE   float   xyzw
// TEXCOORD                 0   xy          6     NONE   float       
// TEXCOORD                 7   xy          7     NONE   float       
// SV_VertexID              0   x           8   VERTID    uint   x   
Still trying to find how they are packing these

Re: Alien Isolation (.PAK .BIN)

Posted: Tue Nov 11, 2014 8:43 am
by erik945
Ok , thank you. I will trying find it.
Can you suggest any literature on the analysis of the compressed stream.

Re: Alien Isolation (.PAK .BIN)

Posted: Wed Nov 12, 2014 1:02 am
by Nintendude
Not sure how the person figured it out but looks like 2 weapons from the game were exported and are on the Fallout NV Nexus. Pretty much surprised me seeing models there but no place else as of yet.

Re: Alien Isolation (.PAK .BIN)

Posted: Wed Nov 12, 2014 1:12 am
by cra0
Nintendude wrote:Not sure how the person figured it out but looks like 2 weapons from the game were exported and are on the Fallout NV Nexus. Pretty much surprised me seeing models there but no place else as of yet.
Dunno ask the author could have been ripped via ninja_ripper certainly dont think they did it via the actual files

Re: Alien Isolation (.PAK .BIN)

Posted: Wed Nov 12, 2014 2:43 am
by JPulowski
OK, that is interesting. I don't know much about programming but I decided take a look at screen_anim_int_13[flash].tga.dds file via a hex editor and this is what I see:
Image
Looks like the file is somehow corrupted. Because this is all it shows until the end of the file: "00 00 00 FF 00 00 00 FF..."

Re: Alien Isolation (.PAK .BIN)

Posted: Wed Nov 12, 2014 7:22 am
by erik945
Nintendude you can extract weapons and equipment via ninja_ripper.
Characters - only without texture coordinats.

Re: Alien Isolation (.PAK .BIN)

Posted: Thu Nov 20, 2014 6:45 am
by volfin
I found a small bug in cra0's Texture extract tool, and he fixed it, asked me to post the fixed version. Images with DXGI_FORMAT:DXGI_FORMAT_B8G8R8A8_UNORM were not getting channel bitmasks in the DDS header added, so would appear blank. Now the h eaders are formed properly. Thanks for the quick fix, cra0. :keke:

Re: Alien Isolation (.PAK .BIN)

Posted: Thu Nov 20, 2014 9:08 pm
by magister
No news for 3d stuff extract?
Awaiting still.

Re: Alien Isolation (.PAK .BIN)

Posted: Fri Nov 21, 2014 2:13 am
by cra0
magister wrote:No news for 3d stuff extract?
Awaiting still.
I'm working on titanfall maps currently but yeah we still working on it..

Re: Alien Isolation (.PAK .BIN)

Posted: Wed Nov 26, 2014 6:33 am
by cra0
http://dev.cra0kalo.com/?p=226
Updates

Oh look folder structures :keke:
Image