Is it possible to change the intensity of the normal map via the material editor?
Yes this is very possible. Try multiplying the normal texture with a vector3, but leave the blue channel as 1. Multiplying the normal map by a 0.5,0.5,1.0 would cut its strength in half.
The results still heavily depend on the original normal map texture though.
Oh thanks, it works.
Error showing when i attached detailed texture diffuse to the base color of detail material in unreal,same as for normal map
DetailTexturing means that you use additional normal/albedo maps that are sampled with higher frequency. Detail textures are quite generic and they have to repeating. Currently you have only single albedo and normal texture so you don’t need detailTexturing node there.
Is there a method for making the normal map stronger?
Just repeat SeanO’Connor’s method above but instead multiply the texture by values greater than one in the R and G channels. Try something like (1.5,1.5,1) and go from there.
I would use a FlattenNormal node in the material. It’s less messy =)
You can scale the normal map to get stronger by putting in negative values. Just be aware that it can look a bit funky on some normal maps, so make sure to check the results.
Can’t input a negative value on a vector 3.
I’m not talking about using a vector 3 node. As written in my previous post, I’m using the FlattenNormal node, which uses a vector 1 input. And you can absolutely put negative values in there.
Also, there’s nothing preventing you from inputting a negative value into a vector 3.
For the “old” approach (multiplying the normal with a vector 3) it would be a bad idea to input negative values, although it can be done. With the “newer” approach (using the FlattenNormal node) it sometimes looks bad to input a negative value, but most of the time it works fine.
If all you want to do is to change the intensity of normal map than there is no reason to use DetailTexturing. You can go for good old Multiply on a texture:
Use >1 to make it stronger or between 0.0 and 1 to make it less intensive.
Chepest way is to scale just z. Smaller the z component -> more agressive normal map.
Here is my method, it seems to me quite simply and optimally for the proper intensity control
I just can’t understand why you don’t use the FlattenNormal Node. It’s much less messy and costs about the same as the solutions above. I used to use the above solutions (MacinW’s solution doesn’t give an accurate result, but it’s often close enough) but since the FlattenNormal node came along I use that. If I were to use any other way, KalleH’s solution is the cheapest and gives similar results as RI3DVIZ’s and Othelnic12’s solutions.
The problem with flatten normal is the method DOES alter the blue channel on the normal map. That method is intended to flatten the normal so when the results are completely flat, you get a pure 0,0,1 normal. Adding strength will start skewing the z value of the normals in the opposite direction, resulting in the material requiring backlighting. And while the multiply add command works as intended, it uses 3 more instructions than necessary to get the same result using the proper method. The only suggested method in this thread that works is the one posted by RI3DVIZ: it’s actually 1 instruction cheaper than the flatten normal method, since you’re only affecting 2 channels instead of all 3, and it produces the right strengthening effect without altering any z-values. The only problem with that method is you can’t get a perfectly flat normal: the R and G channels will flatten to 0, but not B/Z. However, as long as there is some definition in your map, the method works great and looks fantastic. This is actually the method I use in my marketplace materials to strengthen normals, though I achieved it simply by masking the RG channels, multiplying that, then appending the blue channel.
If you’re not careful with your normals, you will have funky lighting appearing on the other side. At that point you’d be much better off using parallax or parallax occlusion methods with ambient occlusion to get the extreme level of depth you’re looking for.
Scaling either x and y with t or z with 1/t is exactly same operation after normalization.(this is always done for normal output) Only difference is that when you scale with z you can’t get fully flat normal because t = 0 is not defined. But in reality you can just use really small t value for same effect. Difference is only single ALU so this isn’t likely most crucial optimization.
Eh, not ENTIRELY. The Red and Green channels provide values for shifting the light left and right over the surface. The Z values shift light up and down in the Z direction. Typically the Z channel gets compressed because normal maps don’t require a lot of definition shifting light in the Z direction (again, too much shifting would require the texture to be backlit), so scaling that value instead would not only result in incorrect lighting, but it would also reveal more artifacts as you scale up. Flattening, it would make sense to fade the Z value to 1 so it completely stops the backlighting effect, but for stronger normals you shouldn’t scale or touch it. Emphasizing backlighting is not the effect you want with stronger normals. The effect you want with stronger normals is the light shifting more to the left and right as described in the RG channels. From what I understand, the RG channels are uncompressed too, so you can get more detail out of that. For that, though, you will need to use either my method or RI3DVIZ’s method.
This is not how normal mapping works.
Normal maps in UE4 is stored in BC5 format. This is block based compression format that stores only two channels. Only R and G(x and y) channels are stored. Channels are compressed separately. Each 4x4 block stores just two endpoints and each texel just lerp between those endpoints. In shader Z component is recalculated using knowledge/assumption that all normals are unit normals.(length is exactly 1). So: z = sqrt(1 - xx + yy).
All that happens automatically in engine when you use normal map texture compression and normal map sampler. After this point you can make any math for your tangent space normal. In this case you want to change it’s intensity. After this engine transform your normal map from tangent space to world space. Engine also normalize the result. This is reason you don’t have to normalize it after scale operation that actually leave the normal unnormalized.
Lighting code does not care or even know do you use normal mapping or not. It’s totally unrelated.