Blending 2 Normal Maps?

Hi there,

I’ve just tried editing the Bumped Specular Shader to Blend 2 Normal Maps together, So far I think I’ve gotten the basic stuff but I’m having trouble with getting both Normal Maps in. The Seconds One just totally overwrites the first one, and I Don’t mean overlay, it literally knocks out the first normal map altogether. So I’d appreciate it if you could help me on getting them both to Blend, Thanks!

PS. I’m a beginner in shading, but I’ve got a bit of experience in scripting.

-Jet

Can’t really tell what’s wrong with your code without seeing it.

Well there’s nothing exactly wrong with it, I just want to know how to apply 2 Normal Map, my guess is blending.

You could tell us how you want to blend them though… Through vertex maps? Through a constant? Another map?

If you want to blend two normals then you have to average them somehow. The simplest way is to add them together and normalize the result.

If it’s just a detail normal map - multiply the second normal map by float3(1, 1, 0) then add that to the first normal map and normalize the result.

That could be done kore clearly with masking (n1.xy += n2.xy), but what is the purpose of removing the Z component of the second map?

Shouldn’t have put that, was late at night.

What I meant was half it’s levels ( n2.z = n2.z * 0.5 - 0.5 ). It just looks better - keeps the detail of the underlying normal map far better.

Examples of your way (full blue) and the above way (half blue);

1 Like