XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Sun Jan 21, 2018 7:58 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
 Post subject: Re: Asphalt 8 .pig
PostPosted: Tue Aug 29, 2017 4:04 pm 
Offline
ultra-n00b

Joined: Sun Nov 06, 2016 11:57 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
I'm trying to get some models out of Gameloft's Six Gun. Neither FBX2PIG or the max import script are working for me, presumably because they use a new file version.

Does anyone have an updated importer or a good workaround?


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Fri Sep 08, 2017 3:54 am 
Offline
ultra-n00b

Joined: Fri Jul 28, 2017 4:12 pm
Posts: 4
Has thanked: 0 time
Have thanks: 0 time
no updates for this?


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Thu Dec 21, 2017 1:42 pm 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
The game had changed its compression algorithm ever since the last version that PIG2FBX could still handle. Its format didn't change too much whereas
the tricky part is to find the correct algorithm it uses.
You'll see the difference if you do a compare among different version of the game:

car_renault_clio_rs.pig(v1.5.0, where Chipicao's Gameloft Pig Importer still worked)
Code:
Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00000DE0   00 00 1D 00 63 61 72 5F  72 65 6E 61 75 6C 74 5F   ....car_renault_
00000DF0   63 6C 69 6F 5F 72 73 5F  64 66 5F 6E 6D 2E 74 67   clio_rs_df_nm.tg
00000E00   61 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   a...............
00000E10   00 00 00 00 70 0D 00 00  06 00 00 00 00 00 00 00   ....p...........
00000E20   77 07 14 03 F0 F8 FF 7F  77 07 07 00 5E 07 FF 7F   w.......w...^...

Geometry data size recorded as a LONG interger at 0xE14, which is 0xD70. The data start right after offset 0xE18.

car_renault_clio_rs.pig(v1.8.0, where Chipicao's PIG2FBX still worked)
Code:
Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00000DE0   00 00 1D 00 63 61 72 5F  72 65 6E 61 75 6C 74 5F   ....car_renault_
00000DF0   63 6C 69 6F 5F 72 73 5F  64 66 5F 6E 6D 2E 74 67   clio_rs_df_nm.tg
00000E00   61 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   a...............
00000E10   00 00 00 00 00 00 00 00  A7 08 00 00 A8 13 00 00   ................
00000E20   2A 0E 00 01 00 E0 77 07  14 03 F0 F8 FF 7F 77 07   *.....w.......w.

The data had been compressed with LZ4 algorithm since then. Zip size recorded at 0xE18 is 0x8A7 while the unzip size following it is 0x13A8.
Then the compressed data begin with a fixed header 2A 0E 00 01.

car_renault_clio_rs.pig(v3.3 above, which PIG2FBX doesn't support)
Code:
Offset      0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F
00000DE0   00 00 1D 00 63 61 72 5F  72 65 6E 61 75 6C 74 5F   ....car_renault_
00000DF0   63 6C 69 6F 5F 72 73 5F  64 66 5F 6E 6D 2E 74 67   clio_rs_df_nm.tg
00000E00   61 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   a...............
00000E10   00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................
00000E20   00 00 00 00 02 56 04 00  00 38 0D 00 00 26 B5 2F   .....V...8...&?.
00000E30   FD 80 38 0C 00 04 49 A2  50 77 07 14 03 F0 F8 FF   ..8...I.Pw......

The compression had changed to a different one. Zip size at offset 0xE25 is 0x456, while unzip size is 0xD38 followed by the compressed data starting with the fixed header 26 B5 2F FD.
You might notice that the unzip size is actually between 0xD70 and 0x13A8, about which I don't know why.

Edit:This is because some chunks such as tangents and binormals, as well as some sequence bytes, are removed. So
Its content is the same as the one whose size is 0xD70.

_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Last edited by Bigchillghost on Thu Jan 04, 2018 9:21 am, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Tue Jan 02, 2018 12:44 pm 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
What I have found in libmyAndroid.so in the apk file:


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Wed Jan 03, 2018 2:03 am 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
It turns out the compression algorithm is zstd actually. I was fooled by those strings. Anyway should be easy to write a new tool to handle it now.

_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Thu Jan 04, 2018 9:51 am 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
Whoops...
Optimism now seems to premature. Face indicies are encrypted:

As far as just this small indicies buffer it seems to be some kind of offset-based encryptions, but for much larger buffer there're lots of FFFF where I can't see any regular pattern.

Again all come to a halt.


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Tue Jan 09, 2018 11:20 am 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
Bigchillghost wrote:
Again all come to a halt.

Never mind. Quite simple encryption.

Tools should be available soon. :)


Attachments:


You do not have the required permissions to view the files attached to this post. Register to gain access.


_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Top
 Profile  
 
 Post subject: Re: Asphalt 8 .pig
PostPosted: Sun Jan 21, 2018 4:00 pm 
Offline
veteran
User avatar

Joined: Tue Jul 05, 2016 9:37 am
Posts: 81
Has thanked: 12 times
Have thanks: 22 times
Tools are released there.

_________________
"No investigation means no right to speak."
Go make every game into a puzzle-solving one!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 83 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC + 1 hour


Who is online

Users browsing this forum: dgsdjgndsjgkdjs, fryzz7, streetracer23 and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group