Texture with BC7 compression is same file size as uncompressed? (Can't get BC7 compression to work?)

I’m getting terrible compression artifacts with the default texture compression settings (DXT1). It seems like the textures with the little color variation suffer the most from texture compression artifacts (or ones with a lot of fine detail) and for them I would like to make the quality of the texture compression higher for those textures, but not uncompressed because that can make them occupy too much space in texture memory .

I read that maybe BC7 was a better method of texture compression, but for some reason it occupies the same amount of texture memory as vector displacement (uncompressed), or about 1.3 MB for a 512x512 texture. Whereas with default it’s 171 KB.

So how can I properly use BC7 texture compression? Do I have to format my texture in a different way?

There’s a few things you can do without changing compression.

You could use detail textures to add noise to help hide artifacts.

Or adjust the texture to use the entire 0-255 value range and modify it in the material editor to be the correct values.

Or you could use a solid color and a black and white texture to add the detail…

Not sure what you mean “adjust the texture to use the entire 0-255 value range and modify it in the material editor to be the correct values”. How would I do this or what to look up?

Also, do you not know how to use BC7 compression in Unreal properly? I think it’s worth at least trying since I’ve read it’s a better format than DXT1.

what means is that you should adjust your texture so it occupies the full Range of each channel (i.e. going from full black to full white in every channel).
You can then remap this to your desired range in the material by using lerp.

I recommend staying at DXT1, as it compresses pretty well for the cost of (imo) minor compression artifacts if your textures are optimized for that.

Okay, what should I search for or articles to look at to learn how to do this? Is this handled in the material editor or texture editor in Unreal?
Or is this handled using other external software? (I’m using" Mari" for texture painting and Photoshop to create textures)

Any particular reason you’re avoiding BC7?

Well, when creating Spec/Roughness/Whatever maps, just make sure they use the full range instead of only whites or only blacks.
In your material you can then do something like this:

With this, you can
A) have more/easier control over the Material’s attributes and
B) you make sure Textures are optimally compressed.

It makes things a bit more difficult when creating the textures, since you won’t have a proper Preview in your tool of choice.

DXT1 compression rate is 1:8,
BC7 compression rate is afaik 1:6

So, does this also work for diffuse maps? What would I do differently if that’s the case?

Thanks.

Not sure what you mean by this?

If you are getting B8G8R8A8 when using BC7, it means that it is falling back. BC7 uses same amount of memory as BC3. Check your targeted RHIs.

So if DirectX 11 is the only RHI checked, will BC7 work?

That would be correct.

Okay, thanks a lot! :slight_smile:

Hello,

In order to enable BC7 you need to disable SM4 in Editor->Project Settings->Platforms->Windows->Targeted RHIs. Then look at the FORMAT field inside texture viewer - it should say BC7/BC.

One little inconvenience with BC7 in UE4 that I’ve ran into is that if you import a texture with something in alpha channel, you cannot remove that alpha channel in texture editor, as you normally would do with BC1/3, forcing inappropriate compression mode for blocks.