Normal Map Texture Compression

This topic contains 4 replies, has 3 voices, and was last updated by  Jean-Francois 1 year, 8 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #52969

    Hi,

    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.

    #52978

    kevin
    Member

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

    Thanks,
    Kevin

    #53028

    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.

    #53059

    Simon Fenney
    Moderator

    Jean-Francois,

    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. like the following:

    blinn-inspired_hm_normals
    With B = 0 this becomes:

    blinn-inspired_hm_normals-NO-BLUE

    and compressed @4bpp:

    NM-noblue-result

    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.

    Attachments:
    #53434

    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 user thanked author for this post.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.