Q&A: “What’s the best way to blend normal maps?”
Simon Hargreaves wants to know; Antony Ward is the man with the details
For years artists have been using specialised applications to convert greyscale height maps into detail maps. These are then combined with the base normal map (generated from high-resolution geometry) to add even more surface detail.
This is a quick and efficient way to add wrinkles, creases and a myriad of other details to your models without the need for sculpting. However, depending on the technique you use, problems seem to arise resulting in an actual loss of detail and depth.
For this Q&A I’ve decided not to focus just on one technique: a quick glance online gives you a fistful of approaches, so I’ve focused on the three that seem to be the most popular.
Overlay is the quickest approach, but the main problem with using the Overlay blending mode in Photoshop is that it will kill your Blue colour channel, which controls depth. A quick way to combat this is to create a new Levels Adjustment Layer and place it above your detail map layer. Make sure you also create a Clipping Group to ensure the new Adjustment Layer only affects the map below it. In the Adjustment Layer, set the Output Levels of the Blue Channel to 127. This will reduce the effect the Blue channel has on the detail map, preventing it from destroying the data in the base map.
This is a quick fix and will work in most cases, but what if you also want to include the depth from your detail map? For this, you can use the ‘separate and blend’ approach. You need to divide your detail map, essentially creating two new maps. One of these will hold all the positive data and the other will only have the negative data. This way you can blend them separately, without using Overlay. Rename your detail map DetailMap_Positive and then duplicate this, calling the copy DetailMap_Negative. Create two new Levels Adjustment Layers and place them above your detail map layers, making sure you place them into Clipping Groups as you did before.
Now adjust your Levels on your DetailMap_Positive layer: set the Red and Green Input channels to 128, 1.00 and 255; set the Red and Green Output Levels to 128, 255; set the Blue Output Levels to 0, 0, leaving the Input Channels as they are.
By doing this you’ve removed all the negative values from this layer, leaving only the positive. Now let’s apply the same process to the DetailMap_ Negative layer, but this time set the values as follows: set the Red and Green Input channels to 0, 1.00 and 127; set the Red and Green Output Levels to 0, 127; leave the Blue Channels as they are. This time you have removed the positive values, leaving only the negative.
Now you need to perform a second pass, this time adding a Channel Mixer Adjustment Layer for each of your detail map layers, also making sure you create the appropriate Clipping Groups to restrict their influence. This will help to remove those base colour values, leaving just the data you need.
In the Channel Mixer Layer for the DefaultMap_ Positive map, set both the Red channel’s Red value and the Green channel’s Green value to +100 and their Constants to -50. Repeat this for the Blue channel, except this time set its Constant to 0. In the Channel Mixer Layer for the DefaultMap_Negative map, do the same but invert the values. Set both the Red channel’s Red value and the Green channel’s Green value to -100 and their constants to +50. Repeat this for the Blue channel, except this time set its Constant to 100.
With that done, all you need to do is change the layers’ blending modes. Set DefaultMap_Positive to Linear Dodge (Add), which will help to increase the base map’s brightness. Set DefaultMap_Negative to Difference, which will effectively subtract its values from the Base Map. Now you’re all done – but you’ll need to normalise those normals!
If you follow any of these processes, you should see a difference. But even though the third takes longer, you retain more depth detail – and you could always turn it into an Action to speed things up.
Normalise with Nvidia Texture Tools
Don’t forget to normalise
Playing around with normal maps can affect the resulting data, because your normals must remain a certain length to work correctly.
Nvidia comes to the rescue
To help renormalise your normals, run Nvidia’s free Texture Tools plug-in with Normalize Only selected.
This will fix the length of all your normal vectors, making them work correctly with any engine.
Antony Ward has been pushing pixels since the early 1990s, and has worked for some of today’s top game and production studios
on Monday, July 30th, 2012 at 4:44 pm under Technique, Tutorials.
You can subscribe to comments.
You can leave a comment, or trackback from your own site.
Tags: normal mapping, Photoshop