Add is the right operation once the normal maps are unpacked to the right range.
UDK's default normal map settings import them properly and set the values from -1 — +1 like they should be.
In this case a simple add will give you the same result as an overlay blend in photoshop, though you will need to normalize the result before you plug the chain into the normal map slot of the material.
If you want to control the contribution of the overlay map more, multiply it by a scalar before you add it to your main map. Values higher than 1 will result in more of the overlay coming through, values from 1-0 will make the overlay contribute less.
Thanks for helping out! I'm still having problems though.
Both normal maps have the basic compression (TC_Normal I think...) and I've multiplied the additive normal map I want to blend with a 1,1,0 color and added that to the base norm. The norm I'm blending is mostly flat with a few lines elevated. Even the flat parts (base normal blue color) are reducing the effect of the base norm map.
I think I found the solution. It seems to work. Does it look right? I basically added the Reds and Greens together, but I multiplied the blue channels and re-added the whole thing.
Both normal maps have the basic compression (TC_Normal I think...) and I've multiplied the additive normal map I want to blend with a 1,1,0 color and added that to the base norm. The norm I'm blending is mostly flat with a few lines elevated. Even the flat parts (base normal blue color) are reducing the effect of the base norm map.
Those node thumbnails might be misleading, but judging from the screens you did multiply the base normal map by [0,0,1], not the detail texture. Should be the other way around to prevent major flattening.
However, multiplying blue channels is also working well.
Hi mAlkAv!An, I acctually did the same multiply to both the base norm and the detail norm. The detail norm is the up most node, and the base norm is 2 nodes lower than the other one. I should have said it earlier.
I checked with the base norm alone, and with my setup and it looks like it's not destroying the base norm at all.
Or you can do it with nodes.
Note that the first 2 lines are unpacking the normal maps from 0-1 space to their proper range for this procedure, so you'll want to translate that for use with your existing assets.
So your base normal will need its blue channel doubled. so multiply it with a vector 3 set to (1,1,2)
The detail normal will need its red and green channels inverted (multiply node with vector 3 (-1,-1, 1)
The combined normal can be made of nodes also.
Dot product between the base and detail after they've been multiplied as above. Them multiply that result by the multiplied base normal. Multiply node using the multiplied detail normal and the blue output from the multiplied base normal. (use a component mask)
Subtract node with the result of the multiplied base normal and dot product on top, and the result of the multiplied detail normal and base normal's blue channel on bottom.
Then the result of that subtract node into a normalize node.
Replies
UDK's default normal map settings import them properly and set the values from -1 — +1 like they should be.
In this case a simple add will give you the same result as an overlay blend in photoshop, though you will need to normalize the result before you plug the chain into the normal map slot of the material.
If you want to control the contribution of the overlay map more, multiply it by a scalar before you add it to your main map. Values higher than 1 will result in more of the overlay coming through, values from 1-0 will make the overlay contribute less.
Both normal maps have the basic compression (TC_Normal I think...) and I've multiplied the additive normal map I want to blend with a 1,1,0 color and added that to the base norm. The norm I'm blending is mostly flat with a few lines elevated. Even the flat parts (base normal blue color) are reducing the effect of the base norm map.
What am I doing wrong?
Thanks for all the help!
I think I found the solution. It seems to work. Does it look right? I basically added the Reds and Greens together, but I multiplied the blue channels and re-added the whole thing.
Those node thumbnails might be misleading, but judging from the screens you did multiply the base normal map by [0,0,1], not the detail texture. Should be the other way around to prevent major flattening.
However, multiplying blue channels is also working well.
I checked with the base norm alone, and with my setup and it looks like it's not destroying the base norm at all.
About the code you posted, how do I use it?
Note that the first 2 lines are unpacking the normal maps from 0-1 space to their proper range for this procedure, so you'll want to translate that for use with your existing assets.
So your base normal will need its blue channel doubled. so multiply it with a vector 3 set to (1,1,2)
The detail normal will need its red and green channels inverted (multiply node with vector 3 (-1,-1, 1)
The combined normal can be made of nodes also.
Dot product between the base and detail after they've been multiplied as above. Them multiply that result by the multiplied base normal. Multiply node using the multiplied detail normal and the blue output from the multiplied base normal. (use a component mask)
Subtract node with the result of the multiplied base normal and dot product on top, and the result of the multiplied detail normal and base normal's blue channel on bottom.
Then the result of that subtract node into a normalize node.