ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Aug 20, 2018 7:00 pm

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Fri Jun 01, 2018 4:38 pm 

Joined: Fri Jun 23, 2017 5:55 pm
Posts: 54
Hey there!

So, I've used the darkness2.bms and the Evolution Cache Unpacker to see both results and both of them are not able to read the extracted .png.

http://hl.altervista.org/split.php?http ... kness2.bms
http://forum.xentax.com/blog/?p=1081

The F.TextureDx9.cache is around 15 GB so not sure how I can send it, it's way too big.

https://www113.zippyshare.com/v/MRlV21xs/file.html - Extracted .png files. Maybe someone can help convert them or somehow add a header to it.


Top
   
PostPosted: Sat Jun 02, 2018 9:30 am 

Joined: Fri Jun 23, 2017 5:55 pm
Posts: 54
I would really really really appreciate it.


Top
   
PostPosted: Sun Jun 03, 2018 1:21 am 

Joined: Thu Apr 05, 2018 7:08 am
Posts: 10
according to http://forum.xentax.com/viewtopic.php?f=18&t=10991 these are headerless DDS files with a block structure. each block is made out of N bytes which need to be reversed in 4 byte chunks.

for proper extraction you need a table with the following information:
- width/height
- amount of blocks (2/4/???)
- block size (4096/8192/???)
- format (DXT1/DXT5)
- mipmap count (1/2/???)

there's no reliable way to guess this just looking at each file, at least not in an automatic way. you can still do it by changing these values manually for each file, but that's too much work.


Top
   
PostPosted: Sun Jun 03, 2018 5:14 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 91
Well. You can compute the width and height for square textures. It's a square root. I did it in bms with a full mip chain. :mrgreen:

Code:
# mipratio: 1/1.333.. = *9/12 * rgba2blockratio: *6/3 -> nr_pixel -> sqrt + int rounding error
xmath square1 "(((fsize * 3) / 2) // 2) + 1"
xmath square5 "(fsize // 2) + 1"

You'd have to choose if you wanna compute full mip 1.3333 or partial and bit test the width/height for the max pow of 2.

Anyway: Did the table thingy with common sizes found in the archive. If you need more you can just add those below the
Code:
elif fsize == 327680
   ofs = 65536      # skip the mip(s)
   w = 512
   h = 512
   f = 5

Finding the mip offset may be a lil tricky, but is possible to approximatel get if you got a image viewer that supports raw 16-bit rgb. :D


Attachments:
warframe_png2dds.rar [995 Bytes]
Downloaded 18 times
Top
   
PostPosted: Sun Jun 03, 2018 7:01 pm 

Joined: Fri Jun 23, 2017 5:55 pm
Posts: 54
episoder wrote:
Well. You can compute the width and height for square textures. It's a square root. I did it in bms with a full mip chain. :mrgreen:

Code:
# mipratio: 1/1.333.. = *9/12 * rgba2blockratio: *6/3 -> nr_pixel -> sqrt + int rounding error
xmath square1 "(((fsize * 3) / 2) // 2) + 1"
xmath square5 "(fsize // 2) + 1"

You'd have to choose if you wanna compute full mip 1.3333 or partial and bit test the width/height for the max pow of 2.

Anyway: Did the table thingy with common sizes found in the archive. If you need more you can just add those below the
Code:
elif fsize == 327680
   ofs = 65536      # skip the mip(s)
   w = 512
   h = 512
   f = 5

Finding the mip offset may be a lil tricky, but is possible to approximatel get if you got a image viewer that supports raw 16-bit rgb. :D


Damn! Great work.

Tested it and this is the result. Opened it with Photoshop but the same effect as in the preview. Installed some plugins like Photoshop Plugins and Intel Texture Works to make sure it's all supported
http://prntscr.com/jqck0a

The .rar I send you guys, works great! I just need to find out the offsets of the images I tried. Maybe u can have a look? <3
https://www24.zippyshare.com/v/Ay8VRBMh/file.html


Top
   
PostPosted: Mon Jun 04, 2018 12:09 am 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 91
Havi wrote:
The .rar I send you guys, works great! I just need to find out the offsets of the images I tried. Maybe u can have a look? <3
https://www24.zippyshare.com/v/Ay8VRBMh/file.html

Those are just not square. That's the problem with detection. Sizes can match multiple resolution and format combos.

Code:
elif fsize == 327680
   ofs = 65536      # skip the mip(s)
   w = 1024
   h = 512
   f = 1
elif fsize == 655360
   ofs = 131072      # skip the mip(s)
   w = 1024
   h = 512
   f = 5

I could give you those too, real quick. The normal map is making my brain hurt tho, cause it doesn't want to decode. -snip-

Edit: Got it to the red and green values. I figured i forgot the channel seperation. The pattern byte order is a mess tho, maybe somebody else wanna figure out.

Image
I need sleep.


Attachments:
warframe_png2dds_v2.rar [989 Bytes]
Downloaded 13 times
Top
   
PostPosted: Mon Jun 04, 2018 8:11 am 

Joined: Fri Jun 23, 2017 5:55 pm
Posts: 54
episoder wrote:
Havi wrote:
The .rar I send you guys, works great! I just need to find out the offsets of the images I tried. Maybe u can have a look? <3
https://www24.zippyshare.com/v/Ay8VRBMh/file.html

Those are just not square. That's the problem with detection. Sizes can match multiple resolution and format combos.

Code:
elif fsize == 327680
   ofs = 65536      # skip the mip(s)
   w = 1024
   h = 512
   f = 1
elif fsize == 655360
   ofs = 131072      # skip the mip(s)
   w = 1024
   h = 512
   f = 5

I could give you those too, real quick. The normal map is making my brain hurt tho, cause it doesn't want to decode. -snip-

Edit: Got it to the red and green values. I figured I forgot the channel separation. The pattern byte order is a mess tho, maybe somebody else wanna figure out.

Image
I need sleep.


You've got my respect. I really appreciate your work for some random on the internet.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited