ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Tue Oct 16, 2018 9:04 pm

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Jun 06, 2018 3:02 am 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 313
The bimage file format has some changes from previous game, I already figured out some things(not sure):

Code:
Int32 - Some XOR verification ?!?
Int32 - Magic = BIM\08
Int32 - Unknown = Allways 0 ?!?
Int32 - Width
Int32 - Height
Int32 - Unknown
Int32 - Unknown = (Possible PixelFormat info)
Int32 - MipMap Count

MipMaps starts in offset 0x2A
Int64 - Index ?!?
Int32 - Width (Or Height ?!?)
Int32 - Height (Or Width ?!?)
Int32 - DataSize

Here some samples and a fail DDS:
Attachment:
TEW2.7z [604.58 KiB]
Downloaded 29 times

_________________
Tribo Gamer Brasil


Top
   
PostPosted: Wed Jun 06, 2018 11:14 am 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 98
Why "fail dds"? It's a correct file. It contains a red channel and an alpha channel bitmap. Now... you wanna puzzle the rest or have the solution?

The width and height is correct. The format enum is at 0x1D. 0x13 is dxt5. 0x15 is ati2. 0x17 is bc7, which you may only be able to output with the dx10 extension header. I'm not sure if there ever was a compatible FourCC for regular dds.

If i had to guess the rest, I'd say fmt 0x14 is ati1, 0x16 is bc6h.

Screw me. Let me attach my script style. Basicly the same. I just write the dds header on the fly. Note that it outputs everything using the dx10 header. Noesis is able to open all of those tho. Edit: Wth. Let me just add a noesis plugin too. :mrgreen:


Attachments:
tew2_bimage2dds.rar [1.15 KiB]
Downloaded 29 times
Top
   
PostPosted: Sun Jun 10, 2018 7:42 am 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 313
episoder wrote:
Why "fail dds"? It's a correct file. It contains a red channel and an alpha channel bitmap.
Thank you. I'm just start to learn about DDS, but my main problem was the crap Gimp DDS plugin which does not load the transparency as alpha channel and show me this:
Image
That's why I was thinking that my DDS was wrong. I'm working with Photoshop now...

episoder wrote:
If i had to guess the rest, I'd say fmt 0x14 is ati1, 0x16 is bc6h.
I'm testing on all games files to check this. Thank you again.
Leveraging your expertise, can you tell me what is the function of the dwDepth, when and how should set it?

_________________
Tribo Gamer Brasil


Top
   
PostPosted: Sun Jun 10, 2018 5:57 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 98
Delutto wrote:
... problem was the crap Gimp DDS plugin which does not load the transparency as alpha channel and show me this:
...
That's why I was thinking that my DDS was wrong.

Weird. It should open this correct. It's just dxt5. Limp doesn't even open bc6 and bc7 tho. No point in trying to use that.

Delutto wrote:
... Leveraging your expertise, can you tell me what is the function of the dwDepth, when and how should set it?

What is dwDepth? It's not in my script. Logically it should be the depth (number of slices) for volume textures, nothing else.


Top
   
PostPosted: Sun Jun 10, 2018 9:32 pm 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 313
episoder wrote:
What is dwDepth? It's not in my script. Logically it should be the depth (number of slices) for volume textures, nothing else.
I was talking about DDS especification, not about the script. I'm using MS docs to learn about DDS: https://msdn.microsoft.com/en-us/library/windows/desktop/bb943982(v=vs.85).aspx and trying understand how properly set all information, since some of the converted DDS are broken, even using your script, but I need to do more tests.

_________________
Tribo Gamer Brasil


Top
   
PostPosted: Mon Jun 11, 2018 12:34 am 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 98
Delutto wrote:
episoder wrote:
What is dwDepth? It's not in my script. Logically it should be the depth (number of slices) for volume textures, nothing else.
I was talking about DDS especification, not about the script. I'm using MS docs to learn about DDS: https://msdn.microsoft.com/en-us/library/windows/desktop/bb943982(v=vs.85).aspx and trying understand how properly set all information, since some of the converted DDS are broken, even using your script, but I need to do more tests.


I can take a look at the data if you want. Could be other formats. Or cubemaps perhaps. They're finicky to extract.


Top
   
PostPosted: Mon Jun 11, 2018 1:50 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 516
original research thread here, why delutto create a new :)
viewtopic.php?f=7&t=5090

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Mon Jun 11, 2018 8:27 pm 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 313
Acewell wrote:
original research thread here, why delutto create a new :)
viewtopic.php?f=7&t=5090
Ooops... well, I couldn't find any stuff about the game using the Forum Search, so I created this one... sorry...
Anyway, your Noesis script isn't enough, I need more information to make my tool compatible with all textures formats used in game.

_________________
Tribo Gamer Brasil


Top
   
PostPosted: Tue Jun 12, 2018 12:20 am 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 98
Delutto wrote:
... I need more information to make my tool compatible with all textures formats used in game.


What more information you need? I mean i could pin the fmt byte from those 4 files. Upload more samples and we can try to read what the errors are. I think there's not alot more then adding more if fmt and decode lines in the script. :)


Top
   
PostPosted: Tue Jun 12, 2018 2:13 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 516
Delutto wrote:
Anyway, your Noesis script isn't enough, I need more information to make my tool compatible with all textures formats used in game.
i know my script was incomplete, there was a lack of diverse samples uploaded, all i needed was more samples. :)

Delutto wrote:
I couldn't find any stuff about the game using the Forum Search
a search for "bimage" works well though :D

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Tue Jun 19, 2018 9:42 pm 
User avatar

Joined: Tue Oct 13, 2015 1:26 pm
Posts: 313
episoder wrote:
What more information you need? I mean i could pin the fmt byte from those 4 files. Upload more samples and we can try to read what the errors are. I think there's not alot more then adding more if fmt and decode lines in the script. :)
I already found the other ones:
0x0B = DXT5
0x12 = DXT1
0x13 = DXT5
0x14 = ATI1 (Your guess was right)
0x15 = ATI2
0x16 = BC6H (I set DXGI to DXGI_FORMAT_BC6H_TYPELESS) There's a need to set something different in this format like flags or something else?
0x17 = BC7

I only save as DX10 the BC6H and BC7.

My export algo save the MipMaps too, but here's my question: For import, reading the DDS file, how I'll known the data size, width and height of each MipMap?

Acewell wrote:
Delutto wrote:
I couldn't find any stuff about the game using the Forum Search
a search for "bimage" works well though :D
Yeah... the forum search fool me... :cry:

_________________
Tribo Gamer Brasil


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 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