Hey guys! Wondering what techniques everyone has been using for blending two normal maps together- and if anyone out there prefers using both normal and height maps over blending normals.
Basically, I know there are a variety of different ways you can blend normals together, some more arbitrary than others. This blog here goes through a lot of the popular techniques:
http://blog.selfshadow.com/publications/blending-in-detail/
In practice...
http://blog.selfshadow.com/sandbox/normals.html
I've been using a few methods, some straight from that blog.
Some Methods...
One method simply using the overlay blending mode (in Photoshop or an equivalent). I've seen this method done with and without a zeroed-out blue channel on the normal map your overlaying. In my opinion, it works better with a zeroed out blue channel (probably because the blue channel isn't used for much, and it helps to keep the resulting map 'normalized').
The other method I've used is to take the normal map you want to blend in, multiply it by (0.5, 0.5, 0), and add that result to your base normal map. In Unreal, this actually seems to read better than a straight overlay.
Detail-Oriented
The one I've used I've found the most fascinating is the detail-oriented method, otherwise known as "Reoriented Normal Mapping". This technique actually takes into account the 3D nature of the maps and does some crazy math involving a doct product. It makes sense to me the function for the method using a dot product somewhere, since with normal blending you really should be comparing two vectors to each other... In practice, I think this method works the best.
The issue is it's fairly robust, and an artist not so technically inclined may not be able to craft this solution easily in their engine of choice. I'm still looking at how to re-make this using material functions in UE4 (maybe there's functionality in there already for the technique?) I haven't ran into a script to do it in photoshop, but I have been fortunate enough to run into a script that does it in substance designer (link here:
http://forum.allegorithmic.com/index.php?action=dlattach;topic=262.0;attach=216 big thanks to Nicolas Wirrman )
Questions
So I suppose I have a few questions. One, what normal map blending method do you guys use in practice? (in an indie or professional setting.) And, if you use detail oriented mapping, how do you go about doing it?
Another thing I'm interested in learning more about is derivative normal maps, and how you would go about blending those together... bonus points for anyone who knows anything about those.
Replies
Derivative normal maps get very simply blended by adding them together... but I don't think they're widely used, I wouldn't worry about those too much.
I've done this for UE3 and it should work for UE4 just the same.
http://www.abload.de/img/blendnormals_rnm019yu1w.png
http://oliverm-h.blogspot.de/2014/01/ue3udk-mixing-normal-maps.html
I tried this and it looks more accurate to his preview on the blog. Still, awesome find! I'm still trying to refactor this all in my mind, but a lot of it is beyond me. :P
Edit: Actually, I just found a normal operation inside of the material editor of UE4 called "BlendAngleCorrectedNormals" - looks like this is the same thing as the RNM method. Nice, so it's built in!