Landscape Material Problem

Hi all. I seem to be getting some obscure problems and inconsistencies with my landscape.
I’m using World Machine Basic to create my heightmap and weightmaps. As far as I’m concerned that’s all good.

I have two materials set up for landscapes. One to quickly visualise things, and a second with all the real work in (eventually). Both materials have the same layer setup.

When I apply the basic shader, all the landscape layers apply perfectly.


Everything is as i want it. Grey for rock, blue for deposit, green for grass, red for the coastline, pink for the underwater areas.

However, when I apply the second material. Everything breaks.


As you can probably see. Only six of the sixteen components have been textured, and it doesnt seem to have taken into account all of the weightmaps.
No matter what I try I cannot get them to appear correctly.

I’ve tried saving, building, reapplying, closing and reopening, new scenes. It just doesn’t seem to work.

Any ideas what could be causing this?

Thanks in advance everyone. I really appreciate it!

the components that are broken are using more instructions and/or texture samplers than supported.
I’m guessing you have quite a complex material with a large’ish number of textures. the thing is, these instructions/textures are only used per layer that is painted in each component. so you could in fact have 50 different textures in your material as long as you only paint a few layers in each component

I made some quick changes to my material and it does in fact clear up the problem.

This is the material

As you can see, not very complicated at all. The only layer that had more than just the diffuse and normal just has nodes to make it appear less repetitive.

I thought that if you made two instances of a texture into a parameter with the same name, they basically merged into one. Well, not merged, but you would be using one texture as opposed to two. Is this not the case?

Thanks again!

EDIT: I just replaced the bottom left texture sample with the grass texture sample.
Like so…


Doing that has allowed the layers to appear and the grass doesn’t look like it tiles at all.

glad that worked :slight_smile:

and that clears it up, it was a texture sampler amount problem and not an instruction count problem. In fact yesterday I was doing research for my landscape and ended up with a crazy material of 1200+ instructions and it never broke like yours.
it’s in Epic’s plans to increase the texture sampler limit from 11 to 32 (IIRC) but that doesn’t mean you should happily add textures everywhere. and I think that will only make the “my landscape material is broken” posts to turn into “my landscape is extremely slow” :smiley:

btw I don’t think you need the 2 different scales of grass for the normalmap. in fact you shouldn’t need 2 different scales of grass at all. a neat trick many people (and myself) use is to apply a much bigger-scale texture to the whole landscape as diffuse only (so you have a different kind of detail in the distance). you should probably modify/improve your grass texture to reduce the repetition too

where are the blend masks? Like how are you controlling what ends up where?

With weight maps (or splatmaps?) created with world machine. I have it set up so that whenever I build in World Machine, it outputs a height map, along with five weight maps which is what places the layers.

The good thing about this technique in my opinion is that I get pretty much automatic texture placement, and it can easily be altered by hand in the editor later. Plus you can always export an altered terrain from UE4 to World Machine, then export that again using the updated weightmaps.

With Visualise Material


With Material Above

With Macro Texture Variation from UE4 Sample the material tends to break due to too many texture samplers. Or the the tiling looks worse. Plus it just looks like you lose a lot of detail in the distance when the normal turns to one solid colour and the diffuse fades to a solid colour also.