frio Posted October 17 Share Posted October 17 (edited) Color->Normalize normal map Short and simple effect for normalizing normal maps. I got tired of having to use the Photoshop filter shim to use Photoshop-based plugins to normalize normal maps (not that most game engines these days strictly require it, they do it at run time anyway or just plain ignore it resulting in mostly unnoticeable lighting glitches, but it's Polite To Do and might make for more accurate results when blending multiple layers of normal maps together). What does this mean? Normal maps are textures for 3D use and are actually not "pictures" precisely, but vectors defining the surface height details - kind of like height/bump/displacement maps - and by definition a normal map should be vectors with magnitude 1 with the Z axis (blue) pointing upwards for the most common tangent space normal maps. A color value of 127.5 means 0 (which of course can't ever really exist since paint.net colors can't be fractional), 255 means 1, 0 means -1 along the XYZ 3-dimensional axes. This plugin does just what the spec asks for: makes every pixel have a magnitude of 1.0 in the sense of vectors. There is one option: force Z positive (default on), which will flip the sign of the Z (blue) axis if it is negative. You can turn it off, in which case I suppose it would also be correct for object space normal maps, but I don't work with those. The NVIDIA and xNormal plugins do not force a positive Z axis, or have an option to do so as far as I can tell. The results seem to agree with what Blender and the NVIDIA normal map plugin produce, but differ very slightly from what the xNormal plugin suite does, due to using rounding instead of truncating numbers. It might also have some artistic use for non-3D texturing people, but the end result is not particularly interesting. It's a little hard to make demo images for something that's not really a picture, but I'll try: here's a non-normalized, improper tangent space normal map (the blue axis is 0, meaning it points down which it should not do): Normalized with force Z positive (default): Normalized without force Z positive: It looks like this when applied to a photo of a sunset (without force Z positive): F_NormalizeNormalMap.zip Edited October 18 by frio 2 3 Quote Link to comment Share on other sites More sharing options...
lynxster4 Posted October 17 Share Posted October 17 I tried it, I like it @frio! Very nice. Got some interesting results. Thank you! 😊 1 Quote My Art Gallery | My Shape Packs | ShapeMaker Mini Tut | Air Bubble Stained Glass Chrome Text with Reflections | Porcelain Text w/ Variegated Coloring | Realistic Knit PatternOpalescent Stained Glass | Frosted Snowman Cookie | Leather Texture | Plastic Text | Silk Embroidery Visit my Personal Website "Never, ever lose your sense of humor - you'll live longer" Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.