(Solved) [Channel Packing] Should I store RG channel of normal map to AG channel on export?
Hi,
I keep hearing people say if I don't import normal map as normal map in Unity, I will see some quality lost to normal data.
As far as I know, this is caused by texture compression and each channel have different number of bits, so Unity shuffle channel on normal map import to get better precisions.
Question is: If I import a PNG file where I use AG channel to store normal data to begin with, don't tell Unity it's a normal map (and import it as linear texture), but use shader to reconstruct normal data at runtime. Does it still suffer from the same quality lost?
Thx in advance!
I keep hearing people say if I don't import normal map as normal map in Unity, I will see some quality lost to normal data.
As far as I know, this is caused by texture compression and each channel have different number of bits, so Unity shuffle channel on normal map import to get better precisions.
Question is: If I import a PNG file where I use AG channel to store normal data to begin with, don't tell Unity it's a normal map (and import it as linear texture), but use shader to reconstruct normal data at runtime. Does it still suffer from the same quality lost?
Thx in advance!
Replies
-
Another question: If I want to use the Alpha channel of my Albedo texture for something else (non-transparency), is it still safe to import texture as sRGB?
-
I would assume normal map compression uses BC7, while the standard compression uses BC1, so yes, there is probably a little bit of quality loss, still.
-
To the second question, logically, your alpha channel gets srgb'd too, but it shouldn't be a big deal, because simply applying power of 0.4545 on your alpha channel content puts it back to linear. And applying power of 2.2 makes linear color things srgb.
-
Obscura said:I would assume normal map compression uses BC7, while the standard compression uses BC1, so yes, there is probably a little bit of quality loss, still.
Actually Unity appears to use BC7 for everything if you select high quality compression. I am not aware of special treatment for normal map. So no difference I guess?
-
One more thing that could come to my mind, is the range of values, but I'm not sure if this is handled inside the shader, or driven by a compression setting in Unity. Normal maps needs 1,-1 range, so possibly the normal map compression applies this range on it. In that case, not using the proper compression setting would result in incorrect shading, not quality loss. But because I'm not a Unity user, and I base what I write here on Unreal, you should check it yourself. Though you could store them in 1,0 range and stretch it out in the material by multiplying it by 2 and then substracting 1 from it.
-
Obscura said:One more thing that could come to my mind, is the range of values, but I'm not sure if this is handled inside the shader, or driven by a compression setting in Unity. Normal maps needs 1,-1 range, so possibly the normal map compression applies this range on it. In that case, not using the proper compression setting would result in incorrect shading, not quality loss. But because I'm not a Unity user, and I base what I write here on Unreal, you should check it yourself. Though you could store them in 1,0 range and stretch it out in the material by multiplying it by 2 and then substracting 1 from it.
-
I am just adding a reply to say alpha channel ISN'T affected by the sRGB setting, it's always linear (I don't know if it's a Unity/Unreal only feature, but both seem to support this.)