Home Technical Talk

Downscaling normal maps? - Normal map question

Hi all,

Currently I am practicing normal mapping and a question popped up while I was experimenting.
Can you render out a normal map in a higher resolution and afterwards downscale it in photoshop to a lower resolution (example: downscale a 2048x2048 to a 512x512) or is this not recommended?
If not recommended, what are the downsides of doing so?

Replies

  • AlecMoody
    Offline / Send Message
    AlecMoody ngon master
    If you use bilinear sampling, is the renormalize necessary? I haven't ever given this much thought.
  • EarthQuake
    There isn't any need to re-normalize when sizing down, if there was, everyone would need to renormalize all of their mipmaps as well.

    Sure if you're worried about it, run a renormalize it, but no, its not something that should ever be noticeable. Its very simple to test out of course, just do it.
  • MM
    Offline / Send Message
    MM polycounter lvl 18
    i have always rendered at 2x for all my projects(personal+pro) as far as i can remember.

    if i need a 2k normal i render @ 4k in xnormal and resize in photoshop.
    xnormal highest AA is 4x and resizing from 2x images gives better result than 4x AA and looks like what 8x\16x AA would be.

    never need to renormalize even for hard surface models.
  • Luka
    Offline / Send Message
    Luka polycounter lvl 5
    AlecMoody wrote: »
    If you use bilinear sampling, is the renormalize necessary? I haven't ever given this much thought.

    edited due to false info.
  • Kurt Russell Fan Club
    Offline / Send Message
    Kurt Russell Fan Club polycounter lvl 9
    Luka - perna is completely right here.

    Let's say we've got two pixels next to each other representing surface normals. One pixel represents purely up (xyz 0,0,1) and the one next to it is purely right (xyz 1,0,0). If I add them together and divide by two I end up with the vector (xyz 0.5,0,0.5) which is pointing in the right direction - 45 degrees - but with a length of 0.707. It's no longer a normal. After normalizing it you'll end up with (xyz 0.707,0,0.707) which has the unit length.

    If the pixel shader doesn't normalise normals after multiplying by the tangent, you will end up with darker lighting calculations because the dot product takes vector lengths into account.

    You don't need to, but you should normalise in Photoshop because if you don't, you'll shrink your vector lengths. The real problem with doing this is that it changes the shape of the bilinear blend used in the pixel shader. You know this blend we're talking about when you shrink your normal map? Well that happens again in the pixel shader when it's sampling from positions between two pixels. If you sample two normals that aren't unit length, when you blend them you'll end up with an uneven curve between them. So the pixel 50% between them might not give you a 50% angular blend.
  • Luka
    Offline / Send Message
    Luka polycounter lvl 5
    i stand corrected :)

    shall edit post
  • Tacticman555
    Thanks for the fast reply's and a thumbs up for perna and Kurt Russel Fan Club for giving accurate and understandable description for normalizing.
  • Fingus
    Offline / Send Message
    Fingus polycounter lvl 11
    Perna, thanks for the fantastic graph. Explains the issue perfectly.
Sign In or Register to comment.