READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Asphalt 8 .pig

Post questions about game models here, or help out others!
Dionyseuss
ultra-n00b
Posts: 3
Joined: Sun Nov 06, 2016 11:57 pm

Re: Asphalt 8 .pig

Post by Dionyseuss » Tue Aug 29, 2017 4:04 pm

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?

Gta5KoRn
beginner
Posts: 23
Joined: Fri Jul 28, 2017 4:12 pm
Has thanked: 14 times

Re: Asphalt 8 .pig

Post by Gta5KoRn » Fri Sep 08, 2017 3:54 am

no updates for this?

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Thu Dec 21, 2017 1:42 pm

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: Select all

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: Select all

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: Select all

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.
Last edited by Bigchillghost on Thu Jan 04, 2018 9:21 am, edited 2 times in total.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Tue Jan 02, 2018 12:44 pm

What I have found in libmyAndroid.so in the apk file:
shot.png
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Wed Jan 03, 2018 2:03 am

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.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Thu Jan 04, 2018 9:51 am

Whoops...
Optimism now seems to premature. Face indicies are encrypted:
Faceindices.png
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.
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Tue Jan 09, 2018 11:20 am

Bigchillghost wrote:Again all come to a halt.
Never mind. Quite simple encryption.
bike_bmw_s_1000_rr.pig.png
Tools should be available soon. :)
You do not have the required permissions to view the files attached to this post.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

User avatar
Bigchillghost
ultra-veteran
ultra-veteran
Posts: 534
Joined: Tue Jul 05, 2016 9:37 am
Has thanked: 22 times
Been thanked: 449 times

Re: Asphalt 8 .pig

Post by Bigchillghost » Sun Jan 21, 2018 4:00 pm

Tools are released there.
May you find peace in this puzzle-solving game. Say it with action: click the Image when you get helped.:)

Post Reply