Page 1 of 6

Dishonored2 (.bimage7)

Posted: Thu Nov 10, 2016 2:26 am
by adol365
It seems that it has similar structure with id tech5 but I can't get right image when I open it as raw file on Photoshop.

ex) 64_df.bimage7 in idsettler_heavy folder

Code: Select all

idstring "BIM"
UNK byte
UNK 13 00 00 00 00 00 00 00 14 00 00 00 06 00 00 00 01 00 00 00
0x18 width long
0x1C height long
0x20 width long
0x24 height long
UNK 01 00 00 00 01 00 00 00 01 00 00 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00
0x46 width long
0x4A height long
0x4E Data_Size long
Samples. https://www.sendspace.com/file/a7sf6i
Image

Re: Dishonored2 (.bimage7)

Posted: Thu Nov 10, 2016 12:09 pm
by michalss
texture it is fliped and reversed, mostlikely kind of strange format DX10 ? Hard to say yet still investigating..

Re: Dishonored2 (.bimage7)

Posted: Thu Nov 10, 2016 8:39 pm
by GRiNDERKILLER
Ouch! :D
Image

And here is template for 010. Some of values are still unknown for me...

Code: Select all

//--------------------------------------
//--- 010 Editor v6.0.3 Binary Template
//
// File:
// Author:
// Revision:
// Purpose:
//--------------------------------------
LittleEndian();

local uint i;
struct BIMAGE {

uint64 Id;
uint Zero;
uint CompressionChar; //probably
uint Par1;
uint Mipmaps;
uint MainWidth;
uint MainHeigth;

for(i=0;i<Mipmaps;i++) {
struct Mipmap {

uint Width;
uint Heigth;
uint MipmapNum;
uint Par2;
uint Par3;
uint Par4;
uint Par5;
uint64 Zero;
short Zero;
uint Width;
uint Heigth;
uint Mipmapsize;
ubyte data[Mipmapsize];
        } record;
    }
} record;

Re: Dishonored2 (.bimage7)

Posted: Fri Nov 11, 2016 5:23 am
by adol365
GRiNDERKILLER wrote:And here is template for 010. Some of values are still unknown for me...
Hi, there! Can you upload dds file? I'll try to make bms script for it.

Re: Dishonored2 (.bimage7)

Posted: Fri Nov 11, 2016 7:38 am
by michalss
adol365 wrote:
GRiNDERKILLER wrote:And here is template for 010. Some of values are still unknown for me...
Hi, there! Can you upload dds file? I'll try to make bms script for it.
This wont help you allready try to put it back, game wont take uncopressed textures. Problem is custom setup for zlib, someone has to remade zlib compressor. Gonna ask alugii

Re: Dishonored2 (.bimage7)

Posted: Fri Nov 11, 2016 10:02 am
by adol365
michalss wrote:This wont help you allready try to put it back, game wont take uncopressed textures.
Just let me know what is the correct header information.

Code: Select all

set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x08\x00\x80\x03\x00\x00\x80\x03\x00\x00\x00\x40\x0C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\xFF\x00\x00\xFF\x00\x00\xFF\x00\x00\x00\x00\x00\x00\xFF\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

get NAME basename
string NAME += ".dds"

get Id longlong
get Null long
get CompressionChar long
get Parl long
get Mipmaps long

goto 0x46
get WIDTH long
get HEIGHT long
get SIZE long
savepos OFFSET

putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long
putVarChr MEMORY_FILE 0x50 0x41 long
putVarChr MEMORY_FILE 0x54 0x00 byte
putVarChr MEMORY_FILE 0x55 0x00 byte
putVarChr MEMORY_FILE 0x56 0x00 byte
putVarChr MEMORY_FILE 0x57 0x00 byte
putVarChr MEMORY_FILE 0x58 0x20 long
putVarChr MEMORY_FILE 0x5E 0xFF Short
putVarChr MEMORY_FILE 0x61 0xFF Short
putVarChr MEMORY_FILE 0x64 0xFF Short
putVarChr MEMORY_FILE 0x6B 0xFF Short

append
log MEMORY_FILE OFFSET SIZE
append

get DDSSIZE asize MEMORY_FILE
log NAME 0 DDSSIZE MEMORY_FILE

Re: Dishonored2 (.bimage7)

Posted: Fri Nov 11, 2016 10:29 am
by michalss
ok this is also sorted but it wont help that much as fonts are also in scaleform format IGGY..

classic textures are DXT10 - that is not a problem... attached correct DDS

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 12, 2016 8:32 am
by adol365
michalss wrote:ok this is also sorted but it wont help that much as fonts are also in scaleform format IGGY..

classic textures are DXT10 - that is not a problem... attached correct DDS
I can't see any glyphs. It's black.

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 12, 2016 9:14 am
by Acewell
adol365 wrote:I can't see any glyphs. It's black.
Noesis has native support for that dx10 image :D

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 12, 2016 9:21 am
by adol365
AceWell wrote:
adol365 wrote:I can't see any glyphs. It's black.
Noesis has native support for that dx10 image :D
Hi, AceWell. :) Can't I open it on Photoshop?

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 12, 2016 10:03 am
by Acewell
i suppose if you have a plugin like this for it :)
https://github.com/GameTechDev/Intel-Te ... rks-Plugin

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 12, 2016 10:23 am
by adol365
AceWell wrote:i suppose if you have a plugin like this for it :)
https://github.com/GameTechDev/Intel-Te ... rks-Plugin
Thank you!
Image

Re: Dishonored2 (.bimage7)

Posted: Fri Nov 18, 2016 1:17 am
by swinei
michalss wrote:ok this is also sorted but it wont help that much as fonts are also in scaleform format IGGY..

classic textures are DXT10 - that is not a problem... attached correct DDS
How does saving the file as DDS work? I opened a .bimage7 in 010 and the template ran successfully what do I do now? -> find the right header for the ubyte data (last field of the template output)

e: IGGY fies are made by this http://www.radgametools.com/iggy.htm

e2: I read about the DDS header here https://msdn.microsoft.com/en-us/librar ... s.85).aspx I copied the header from the file michalss posted, adjusted width, height, and dwPitchOrLinearSize, but it is not displaying correctly. It looks like this:
Image

When I open the file in Texture Finder I can display the texture with correct color and alignment with an offset of 198. This makes me think the dds data needs to be padded? I tried adding 00s in front of the data but it didn't help. What do I need to do?

This is an image with 198 offset in Texture Finder:
Image

e3: Since Texture Finder doesnt read the header at all that's a dead end. So my question is what do I need to put into the header? I used the same dxgiFormat as michaelss, is that the issue?

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 19, 2016 5:09 pm
by GRiNDERKILLER
It's DXT5 compression (: So 128 bytes dds header. DX10 header has 148.

Re: Dishonored2 (.bimage7)

Posted: Sat Nov 19, 2016 5:41 pm
by swinei
Oh yeah I figured that out after a lot of trial and error :P

I made a bms for the DXT5 .bimage7s

Code: Select all

set MEMORY_FILE binary "\x44\x44\x53\x20\x7C\x00\x00\x00\x07\x10\x02\x00\x00\x01\x00\x00\x80\x03\x00\x00\x00\x40\x0C\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x04\x00\x00\x00\x44\x58\x54\x35\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"



get NAME basename
string NAME += ".dds"

get Id longlong
get Null long
get CompressionChar long
get Parl long
get Mipmaps long

goto 0x46
get WIDTH long
get HEIGHT long
get SIZE long
savepos OFFSET

putVarChr MEMORY_FILE 0XC HEIGHT long
putVarChr MEMORY_FILE 0x10 WIDTH long
putVarChr MEMORY_FILE 0x14 SIZE long

append
log MEMORY_FILE OFFSET SIZE
append

get DDSSIZE asize MEMORY_FILE
log NAME 0 DDSSIZE MEMORY_FILE
The problem now is that only some are in DXT5. Is there a way to automatically detect which compression it is? I couldn't figure anything out from the BIMAGE header

Also some textures have a .bimage7 and bimage7_mip0/1/2/3. Those are different sizes of the same texture but the _mips only contain the image data. I'm currently working on a script that stitches those parts together, I'll share it when it's done.