UE4 landscape height blend

Hello i have some questions regarding UE4’s landscape blending shaders.

Is it possible to height blend more than 3 materials? From the research i have done and the errors i get myself it does not seem to be possible. One year ago another user asked for help about this but apparently no one knew if there was a solution:

And does tessellation work with more than 3 height-blended materials? There is a package for sale on UE4’s marketplace called “Adv.Disp.Landscape Materials” with a landscape shader blending between 3 textures based on height-map. It looks to me like no one have been able to blend more than that with tessellation. Here is a link to my unanswered question regarding landscape tessellation blending:

Landscape-height blend error:
The error that most users get (and myself) is that when painting the fourth material in an area the whole area gets the “standard grid material” color. Having the first material as an alpha blend does not work.

Landscape tessellation height-blend error:
Where two textures meet the geometry breaks which result in holes in the landscape.

Have you tried setting your Sampler source to Shared: Wrap?


Thank you! Now I can blend my landscape materials with the height-map values. Here is a screenshot of the blending:

In the corners where three textures blend I get a black gap. Can I do anything to prevent that?

Do you have a solution to get tessellation working with this? Here is a link to my shader with tessellation applied:

Its only showing me two layers, not five.

Here is the tessellation landscape shader:

If you need any more info let me know!

You’re welcome! I can’t really help you with the tesselation as I generally use bump offsets, but I have to admit this looks very stunning, especially your rock layer!

Usually when you have gaps this is because the height maps render a ‘hard edge’ where the mats are blended together. One could try to fill these with a (non heightblended) material. For example a layer of dirt painted in at 0.1% density is practically invisible, but may blend things together a little better. I don’t know if that solves the tesselation gaps but it might pull the edges down back to default height.

You could also try to link your height to your displacement / height maps instead of having it directly hooked up to your tesselation (I don’t know if that will work but it might be worth a try).

I am unsure how you set this up precisley but shouldn’t Layer_01 and 02 be called Rock, Grass etc as well? As far as I know layers with different names never show up.

Thank you Mauro Robert! I removed height-blend for the grass and used it as “blend fixer” as you suggested. Now i have tessellation and height-blending working with 4 materials! I’m exited to see if it will work when i stack on more materials later on.

Summary: Some of the fixes i applied that made it work :

  • Enable tessellation, add Flat Tessellation, check “Crack Free Displacement”
  • Change every texture sample source to “Shared:Wrap”
  • Use VertexNormalWS for the world displacement maps
  • Don’t put in any value in “Tessellation Multiplier”
  • Name the first layer in the “Landscape Layer Blend” “LayerDontUse” and make it “LB Alpha Blend”. Later on give it a non-weight-blend landscape layer info and don’t use it.
  • Have one of the layered materials set to “LB Weight Blend” and not “Height-blend”. I did that for my grass material and used it to “smooth” between the painted height layers.

I consider the question solved and i’m happy that this was possible in UE4. Later on I will make a thread on polycount and post my progress on the scene and do some breakdown on materials, shaders etc.

Congrats on getting this working so quickly! Would love to see screenshots of it all working! :slight_smile: Actually you convinced me to experiment a bit with tesselation too. Does it run well for you frameratewise and do your shaders take long to compile?

Sure, i will post a link to an imgur pic tomorrow. Nice best of luck to you! With settings on Epic and textures on High it is a bit laggy. I have a 1 year old laptop so with a good stationary computer i think it would run good. I have a big landscape imported from world machine and the shader takes about 3 minutes to compile. Cheers!

Very cool, looking forward to seeing that landscape! All the best!

Some pictures of the shader in action! This test scene is quite rough. It is possible to go over each rock/leaf and make sure no grass is showing through etc.

Gosh, that’s absolutely amazing work! The shading looks spectacular!
(Get it hehe) Props to your efforts in fixing all the issues… I’m wondering how much geometry the tesselation adds to your landscape, could you perhaps share your wireframe as well?

Quick suggestion: You could try adding a fourth target layer with merely a dark grey constant and an alpha blend, you dont even need specs or normals for it. Like a glue layer.

Thanks! My happiness reached new heights with your flattery! Here is the tessellation from some different distances:

It is possible to modify when the tessellation should start and end but i haven’t dived into that yet. I will do that first when it starts lagging.

You mean to use that layer as a fix for buggy seams etc?

This is superb work / results! Would you say its suitable for large landscape (25000unit square?) - Also for the Shader/MAT, I have tried to adapt the one from Landscape Example to accomodate more layers but results are not ideal and no tesselation, are you considering releasing the shader Tireless?


Thank you Zeroy! I can’t be sure yet, since I just got this working but my guess would be yes. The tessellation is quite demanding but it’s only dividing geometry close to the camera so it should not be dependent on map size. The other part is simply a number of textures/materials. I will post a breakdown of the shader when I have had time to do some more testing with more materials.

In the meantime check out the project on Polycount or my website:

Have you tried the stuff i mention further down on this page?:

Thanks! I am doing a very similar project, albeit without Modelling! I have tried tesselation on Landscape but my experience was that alone its ok in terms of FPS but when doing foliage stuff and fully dynamic lighting with LPV for GI it becomes too much! Still working on things anyway, I will follow your progress also!

Okay, I might have to remove tessellation when i add more things to the scene, like you say it eats fps. Fully dynamic lighting sounds really expensive, do you use that for foliage shadows mostly? Send me a link if you have your project posted somewhere!

Nothing posted online yet, just started this a few weeks back. A great way to learn the Engine! To answer your question my project is an Island and has full day/night cycle so Skylight and Sunlight are fully dynamic which bring some interesting challenges :slight_smile: - The main reason I am interested in your Lanscape is that it looks like you succeeded at using height map based very well, something I tried to do and failed so far - mind you I am greedy and want to keep ability to paint layers too … Hence why I went for the Landscape Example and modified it to allow for 5 layer total

Sounds really interesting! Let me know if you post it in the future.

any chance I could get you to give me this blueprint? lol. Wonderful work. I’ve been trying to achieve a good displacement result for a long time now. Yours looks awesome.