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
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.
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.
edited due to false info.
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.
shall edit post