Red Green Texture Compression Support (BC4/BC5)

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
siavashserver
Posts: 2
Joined: 2015-02-14T22:27:48-07:00
Authentication code: 6789

Red Green Texture Compression Support (BC4/BC5)

Post by siavashserver »

Hello, RGTC (BC4 and BC5) is a new texture compression method introduced with OGL3/DX10 hardware suitable for storing spec maps, gloss maps and normal maps. Red and Green channels are separately compressed like Alpha channel in DXT5 (BC3) compression format found in DDS converter.

I was wondering if you guys can somehow rewire it to output compressed red channel (BC4) and/or compressed red/green (BC5) channels.

More info:
Red Green Texture Compression
Block Compression (Direct3D 10)
Last edited by siavashserver on 2016-09-22T05:34:02-07:00, edited 1 time in total.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Red Green Texture Compression Support (BC4/BC5)

Post by dlemstra »

It seems we also don't have support for reading images that have this format. I will bookmark this topic and investigate it some more when I have time for this. Can you add a link to a sample image and another image with the expected output we could use for testing the reader? Preferably for both BC4 and BC4.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
siavashserver
Posts: 2
Joined: 2015-02-14T22:27:48-07:00
Authentication code: 6789

Re: Red Green Texture Compression Support (BC4/BC5)

Post by siavashserver »

Thank you very much for considering this feature request. Following samples are taken from Beast 02 model by Atmostatic.

Input images are norm.tga and spec.tga . Output DDS files prefixed with nv_ are compressed using NVIDIA Texture Tools 2.0.8 and files prefixed with ati_ are compressed using ATI Compressonator 1.50.17311.

For normal maps both red and green channels were compressed using 3Dc/ATI2/BC5 method. For spec maps only red channel was compressed, using ATI1/BC4 method. All output files contain 11 mipmaps.

Download links:

All files in a single compressed ZIP file

norm.tga | nv_norm.dds | ati_norm.dds

spec.tga | nv_spec.dds | ati_spec.dds

EDIT: It seems like there is bug in nvcompress when compressing using ATI1/BC4 method and output files are rubbish. Please ignore the nv_spec.dds file.
Post Reply