GaijinEntertainment / DagorEngine

Dagor Engine and Tools source code from Gaijin Games KFT
Other
2.15k stars 268 forks source link

Some DDS Seems to lose the alpha channel #6

Closed OshidaBCF closed 10 months ago

OshidaBCF commented 10 months ago

login_layer_t72b_1_8.zip

In this zip is the ddsx of one of the layer of the T72B Loading Screen.

For unknown reason the DDS extracted from the ddsx seems to have lost its Alpha channel, meaning that every pixel has an alpha of 0 (both using Gaijin's tool that i build yesterday, and the tool we had before)

If set the alpha of every pixel to 255 via paint.net, i can see that the image is the cannon "flash" (see screnshot), which shouldn't be transparent by any mean. image

Looking at the hex header doesn't seem to have any issue, i has the same format as others dds that unpack without issue.

The vromfs i got the ddsx from is direct from the game, and even using Gaijin's vromfs unpacker doesn't change anything.

I would appreciate any help

NicSavichev commented 10 months ago

Cannot say for sure. Tools from DagorEngine cannot unpack this DDSx because it is OODLE compressed. But our internal tools (built with OODLE) unpack DDS properly. difference is D:>fc login_layer_t72b_1_8.dds login_layer_t72b_1_8-.dds /b comparing files: login_layer_t72b_1_8.dds и LOGIN_LAYER_T72B_1_8-.DDS 00000015: FE 00 00000016: 05 00 0000001C: 00 01

LOGIN_LAYER_T72B_1_8-.DDS is mine (uncompressed with proper tool)

OshidaBCF commented 10 months ago

0x15 and 0x16 are the 2nd and 3rd bytes of dwPitchOrLinearSize

0x1C is the first byte of dwMipMapCount

i tried editing the bytes to be the same as yours, but it didn't changed anything

this is rather confusing

I got the oodle libs to be able to build the dagorengine tool yesterday and it gave the same file that you have (i forgot that they had a difference when sending it to you, so i send the old tool's one) image

They have the exact same differences that you have, yet neither show the image correctly image

Could you send me your file to see if there is perhaps any other difference ?

NicSavichev commented 10 months ago

login_layer_t72b_1_8.zip but apha is 0, I rechecked in XnView just FarManager showed me picture regardless alpha values I think this file is premultiplied so alpha may be not used at al during render

NicSavichev commented 10 months ago

I rechecked, original DDS (I've found in our game repo) also has alpha 0. so tools converted it to DDSx and back properly)

OshidaBCF commented 10 months ago

well that doesn't make any sense, because if i open the game and check the t72b loading screen, the layer is there at the end of the tank Canon

Is the game able to depack the image and give them back an alpha channel somehow??

AntonYudintsev commented 10 months ago

We are not supporting WT here. May be WT uses 1bit alpha, or splitted image.
tools working properly.

OshidaBCF commented 10 months ago

We are not supporting WT here. May be WT uses 1bit alpha, or splitted image. tools working properly.

Your comment gave me an idea

Maybe the alpha of a pixel is the average of the rgb value.

Seems i was right image

Thanks for the tips