[Warframe] - .png are not readable after extraction [darkness2.bms]

Textures, recreate headers, conversions, algorithms and parsing of image files
Havi
Posts: 60
Joined: Fri Jun 23, 2017 5:55 pm

[Warframe] - .png are not readable after extraction [darkness2.bms]

Post by Havi »

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.
Havi
Posts: 60
Joined: Fri Jun 23, 2017 5:55 pm

Re: [Warframe] - .png are not readable after extraction

Post by Havi »

I would really really really appreciate it.
leovoel
Posts: 12
Joined: Thu Apr 05, 2018 7:08 am

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by leovoel »

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.
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by episoder »

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

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

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
Havi
Posts: 60
Joined: Fri Jun 23, 2017 5:55 pm

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by Havi »

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

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

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
episoder
Posts: 123
Joined: Fri Oct 27, 2017 7:36 pm

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by episoder »

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

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.
Havi
Posts: 60
Joined: Fri Jun 23, 2017 5:55 pm

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by Havi »

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

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.
xtiger
Posts: 6
Joined: Sun Jan 13, 2019 7:09 am

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by xtiger »

Please help us gamers
xtiger
Posts: 6
Joined: Sun Jan 13, 2019 7:09 am

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by xtiger »

Who can provide a tool? Thank you
xtiger
Posts: 6
Joined: Sun Jan 13, 2019 7:09 am

Re: [Warframe] - .png are not readable after extraction [darkness2.bms]

Post by xtiger »

Hi, everyone.
I use Ninja Ripper 1.7.1, but I can't get the model and texture.
If you can use this tool to extract models and textures, can you tell me how to do it?
Thank you. I like this game. I want to use UE4 to make MOD.