Gildor's Forums

Author Topic: Texture compression algorithm mysteriously producing black squares if DXT5  (Read 2864 times)
allenweisse
Newbie
*
Posts: 26


View Profile
Texture compression algorithm mysteriously producing black squares if DXT5
« on: May 01, 2024, 19:08 »

I saw the issue raised by Dreadfred and answered by Gildor here:

Hi. Probably these blocks are transparent (has something encoded into texture's alpha channel), so your image viewer just ignores any color of pixels when displaying it.

Though it seems these 3x3 blocks aren't "culling" what's beneath the alpha channel (if I understood that correctly)
Sometimes exporting uncompressed TARGA fails, so my solution then is selecting 3x3 black squares in GIMP and resynthesizing

Just thought I'd raise this slight issue


* affected_texture.png (446.85 KB, 934x534 - viewed 647 times.)
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 2733


View Profile
Re: Texture compression algorithm mysteriously producing black squares if DXT5
« Reply #1 on: May 02, 2024, 17:31 »

@allenweisse: Converting compressed DXT textures to other formats is lossy anyway due to thresholds in the algorithm (even to uncompressed TGA). It's recommended to export textures as-is (to dds) when possible and convert them outside umodel to prevent possible issues or quality loss, because results may vary depending on particular implementation (like slightly brighter/darker image, different handling of alpha channel, etc).
Logged
spiritovod
Global Moderator
Hero Member
*****
Posts: 2733


View Profile
Re: Texture compression algorithm mysteriously producing black squares if DXT5
« Reply #2 on: June 25, 2025, 00:25 »

Just thought I'd raise this slight issue
Bumping with the quote to ping OP. This should be fixed in three general specific builds, as DXT5 is processed differently now.
Logged
allenweisse
Newbie
*
Posts: 26


View Profile
Re: Texture compression algorithm mysteriously producing black squares if DXT5
« Reply #3 on: July 20, 2025, 06:53 »

Lovely, because I've always had this as an extra step when doing bulk exports- to extract PF_DXT5 instances as .dds and convert to .png
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS