PixelNormalWS with Normal input?

I’ve been trying to use the World_Aligned_Blend function for my landscape.
It worked pretty well with base color but when I tried to give my materials it blends between a normal map it gives me an error: “[SM5] Function World_Aligned_Blend: (Node PixelNormalWS) Invalid node PixelNormalWS used for Normal input.”.

Is there any way I can blend normal maps in the same way I did with the base color?
It looks like it can be done when watching this video: Unreal Engine 4 - GDC 2014 Features Trailer [1080p] TRUE-HD QUALITY - YouTube

Thanks in advance!

The regular output of the World_Aligned_Blend function uses the pixel normals, so adjusting the normals with it would create a loop which causes the error. However the function has two other outputs specifically for this situation, mouse over the outputs for a description on how to use them to blend normal maps.

2 Likes

Thanks! It worked, but a little too well. It seems to apply the layers to the normal as well now, which looks a bit too gritty.
I guess it would be great for a normal that covers the whole landscape but I wanted to use detail normals that fits each tiling texture used for the blending. Is there a way to prevent it from blending over those normals and just use the landscape for determining where to show each of the “materials”? The detail normals have too much tiny details that shouldn’t change the blanding.

Here’s the problem I’m talking about:

That’s what the /w vertex normals option is for. You can also use that for the diffuse blending as I assume you also don’t want those to be influenced by your detail normals.

I see, thanks!
I didn’t think about using it for both normal and diffuse, I just tried it for normal.

Ran across this question while modifying a material with world aligned textures for prototyping levels using a grid material - trying to get the normal map to align as well. However, I’m not intending this to be used on terrain just on meshes and BSP.

Is there an easy way to align a normal map to world space then without using the World_Aligned_Blend function? Or is that pretty much the only avenue? I’m currently using the PixelNormalWS for the diffuse and emissive in my material.