World Position Offset bugs with terrain

When using world offset in a terrain material that offset can only be masked by layers and not by texture masks or by normal. Making snow that is only on top facing surfaces through normal and making it offset so it appears to have thickness does not work because of this bug.

Another bug is that making offset with VertexNormalWS does not work, it is like vertex normals of terrain does always point up. So it is impossible to do any push World Position Offset since the offset is just always going up.

I tested my terrain material on a sphere mesh and those things worked there.

Hey Davision,

Would you mind providing me with some reproducible steps as well as some images as a reference for testing on my end for both issues you are reporting?

Thank you,

Here you go:

World Position Offset push (by vertex normal) applied to spheres, the top is masked by top normal.

Here the same is applied to a terrain, because of the 2 bugs nothing happens there:

Here is the same but with without the top mask:

It works but only up and down and that very extreme.

Here it is with the amount reduced a lot:

Only up and down, like vertex normal is only showing up.

Here is the material setup:

The texture is just world aligned there so it has a proper uv on a terrain slope. On the bottom is the masking of the top.

Hey Davision,

Would you mind providing me with a small test project where this issue occurs so I can verify on my end?

I did attempt to recreate the material in the image you provided, there are also other settings and variables that might be specific to your project that could be affecting this issue. This is why I requested a small test project with the repro-case inherited.

I am having this EXACT same issue, trying to displace a cliffmaterial on my terrain to give it some more depth and using the VertexNormalWS method of displacing is displacing everything as if every single normal of the terrain was facing upwards.

I will need some screenshots or an example set up to get this issue to occur on my end.

Alright so the material is a landscape material, obviously, taking texture information from a material function I’ve created, the material function uses worldspace textures in order to actually project properly onto the sides of the terrain and that all goes into the WPO. Hope that helps, if you need a project I could take some time and isolate the materials.
I should also mentioned that I’m aware I’m displacing by not by WSnormals in that pic, but I’ve tried both!

Yeah, I think a project with the simplified materials that clearly shows the bug using a minimal material functions and assets is going to be the best approach. I cannot gather enough relevant information from the picture you provided.

Update Haven’t heard from you in a few days, so I am going to mark this post as resolved until I can get the necessary information to reproduce the issue on my end.

Thanks,

Haven’t heard from you in a few days, so I am going to mark this post as resolved until I can get the necessary information to reproduce the issue on my end.

I’ve been away, is there anywhere in private I could send you my package? It’s not very big yet so sending it over to you should be of no issue. I have attempted time and time again to find a fix for this myself but it seems to simply be a bug.

Should also mention that the shader works perfectly fine when applied to a mesh, it only does this on landscapes.

You can send me a private message via the Forums using a link from which I can download and test the issue.

Thanks,

PM has been sent.

Hey all,

I appreciate your patience while I tested this issue and determined the bugs validity. I have entered a bug, UE-32867, to have this issue investigated. I was indeed able to see the issue on my end and was also puzzled as to the landscapes behavior when manipulated the vertices using the VertexNormalWS.

Once the issue has been addressed by our engineers, the fix will be added to the release notes for fixed issues within an upcoming full engine or hotfix release.

Let me know if you have further questions or need additional assistance.

Thank you,

Thanks for your help Andrew, glad I wasn’t doing something stupid. Will keep my eyes open for the fix to this!