Download

Landscape material with atlas

I’m trying to import terrain from other engine and successfully import heightmap and splatmaps. I have trouble with making material for landscape for 8 textures because of texture samplers limit (16). I partially solve problem. I make atlas with textures and material that split it into tiled textures.
Atlas: Diffuse (RGB) Height(A), Normal

Material
http://i.imgur.com/imvHXj9s.png
Material Function “AtlasSplitter4x4”
http://i.imgur.com/FtqXxd8s.png
Material Function “AtlasSplitterCore”
http://i.imgur.com/J8D2hcIs.png

The main problem is artifacts that shown on next image.
http://i.imgur.com/HcsBBq6l.png
I tried method described there but not get good result.

Another question is how to easily implement HeightMap (already stored in Alpha channel of Diffuse) for correct blending of layers? I seen Landscape Mountains demo and it has heightmap, but Material graph is very difficult to me now.
Thanks in advance.

Have a look at this thread for texture atlases in UE4: Texture atlas Frac pixel artifacts - Rendering - Unreal Engine Forums

There are two different things causing these issues, both of which needs to be dealt with if you want a good result.
Best way to do this is to add some padding to your textures as described in the blog post you linked to.
This will remove (or at least reduce by pushing away) the bleeding that causes lines.

Second thing is to remove artifacts caused by the Frac node.
I recently started a thread about this hereand mAlkAv!An was able to help me completely remove all the artifacts.

Just let me know if you have any questions.

Edit mAlkAv!An beat me to it :slight_smile:

Thankyou guys, you help me a lot.
But some artifacts are not gone. It’s seems mip error.

I modify ComputeMipLevel as described in other topic. But it no help me 100%. What number I must set to input MipSelection?

Another screenshot from far distance:

Increase the value, one is the default won’t change anything. For my screenshot I used a value of 2.

2 is pretty good value.
Tiling texture is seamless, but on distance repetition of texture is visible. It’s possible to fix it? May be it’s possible to hide detail map on distance and leave only color map?

Yes, this is usually done by blending textures based on pixel depth:

It is not working on mobile device… How can I use this on mobile device?