Normal Map Texture Compression


I am compressing a normal map texture using PVRTC 4bpp. To improve image quality, the B component has been set to 0 and only RG remain. Gives ok results. I set 255 for B as an exercise to test a bit further and to my surprise, did not get the same image quality.

My question is: is there an optimal B value that could be computed to get the best PVRTC 4bpp quality given a specific image?

I am using this technique of “droppping” the B component on normal map to have a trade off between file size and image quality. Using uncompressed data is not possible for my application due to excessive file size.
Other PVRTC formats are problematic since image quality is too low in 2bpp mode or simply unsupported. PVRTC 4bpp is then a recquirement.

Hi Jean-Francois,
Could you provide your normal map for me to reproduce this problem locally?


Sorry for the long delay.

I cannot provide you with the original data since it is from a game yet to be released. I’ll try to provide a sample showing the issue though. I am actually in a rush but will try to get back in touch asap.

Thanks and sorry again for the long delay.


Either of B=0 or B=255 should give the same outcome for the R&G channels. In PVRTC, B has slightly lower precision than both R & G and, setting it to a constant value that PVRTC can represent exactly, say 0 or 255 (though there are others), will mean it won’t interfere with the coding of R&G.

Out of curiosity, in your normal map format, post-recreation of blue, does RGB=[128, 128, 255] indicate a "perpendicular to the surface"normal, e.g. as in the following, Jim Blinn-inspired image?

If so, with B = 0 this becomes:

and then compressed @4bpp with PVRTC:

There’s a little bit of “ringing” around the text, and the squares below that aren’t quite as clean, but it should be much better than compressing with the original B values.

Most sorry for the exceedingly long delay. I checked again and you are right. Gives the same result. And yes [128, 128, 255] is the regular perpendicular surface value.

Thanks for taking time to check and post your results.

1 Like