Option to save BC5u (ATI2) without DXT10 Header and straight alpha mode (instead of opaque) specifically

Is there a way to save BC5u (ATI2) without DXT10 Header and straight alpha mode (instead of opaque) specifically?

In the past, I used an older NVIDIA’s PS DDS plugin for game modding that allowed me to save files correctly, namely BC5u without DXT10. However, now I want to use a more modern tool that will allow me to work more efficiently, but this NVIDIA Texture Tools Exporter only saves some specific maps in a way that my game cannot read (because of DXT10 header). Texture Tools does not provide an option to disable this header for BC5u same way as it does for BC3 for example.

Another question about Texture Tools always saving BC5u with aplha mode opaque - this is not a problem for me, but I am interested if there any way for it to save BC5u with aplha mode straight?

Thank you!

Hi @MariaSavels, thanks for the questions!

For BC5u, we could probably add that! Is it OK if it uses a FourCC code of ATI2? (This seems to be the most compatible option, but might mean that you’ll need to use the Swizzle effect to swap the red and green channels – more below.)

The Exporter currently prefers using the DX10 extension for BC4 and up because although there’s unofficial FourCC codes for them (like BC7L, BC70, and ZOLA for BC7), they’re mostly inconsistently supported by readers. It looks like BC5u is the one that’s pretty consistent, though – almost all the readers I looked at support ATI2! (The Developer’s Image Library supports ATI2 but not BC5U. The DDS File Format Lives | Games for Windows and the DirectX SDK blog notes that D3DX10 and D3DX11 supported ATI2 for BC5u, but not ATI1 for BC4u.)

One catch is that as via Aras Pranckevičius, if a reader interprets ATI2 as the ATI2n format, then it’ll swap the red and green channels compared to BC5.I haven’t checked to see whether Compressonator does this. This would mean that you’d need to use the Swizzle effect to swap the red and green channels beforehand – is this OK?

For DDS_ALPHA_MODE_STRAIGHT, I don’t think there’s currently a way to set the alpha mode flag – we currently determine the alpha mode depending on whether the format supports alpha, whether it’d a normal map, and whether the “Export Premultiplied Alpha” toggle is on. I think the reasoning for DDS_ALPHA_MODE_OPAQUE was that an app could look at that field, determine that the texture wasn’t transparent, and move the material to an opaque pass instead of a transparent pass because of that. This could always be changed; let me know if you have a use case for using DDS_ALPHA_MODE_STRAIGHT over DDS_ALPHA_MODE_OPAQUE.

Hope this helps!

Thank you for your detailed answer!

During this time, I have managed to find a lot of information about the FourCC I need. I apologize I was mistaken about the technical details. I have investigated my needs more thoroughly. Here they are:

In order for the maps to function correctly in the game I am modifying, I need FourCC to be BC5u. DX10 is not suitable for my purposes. For now, I can only use an old plug-in from Intel for PS to get desired result. I would prefer to use a more reliable and up-to-date tool like NVIDIA Texture Tools. If it implements the functionality to write BC5u without using DX10, that would be great. This is all I need in order to do my work comfortably.

So, it turns out I don’t actually need ATI2, as I thought previously. However, I also checked the functionality of the old Nvidia plugin for PS. For my needs, it uses 3Dc compression and the output FourCC is ATI2. As I understand it, ATI2 rearranges the channels so that they are G then R. The game I am working on expects the order to be R then G, so out of curiosity, I swapped the channels in Photoshop to make the compressed output the same as BC5u. In this case, the texture correctly displayed on the model in game. Overall, I can use Swizzle in NVIDIA Texture Tools if necessary.

In the end, if NVIDIA Texture Tools offered an option for BC5u compression that allowed users to select the classic BC5u header, instead of the DX10 header, all my problems would be solved. I would become the happiest modmaker for using the most advanced software available.

Thanks @MariaSavels!

I realized I was wrong about ATI2 in my earlier post; ATI2 corresponds to BC5U with the red and green channels swapped. (nvtt_export read these unswapped; this is a bug and will be fixed.)

This also means that BC5u would be the best FourCC code to use (as it doesn’t rely on additional non-standard fields like how some DDS files store the FourCC code ‘A2XY’ in the dwRGBBitCount field to indicate that the red and green channels should be re-swapped)!