How to combine terrain layer painting with a world machine generated diffuse map?

Hi all, I’m making the switch from CryEngine to UE4 for a job I am starting and I am trying to get up to speed with everything. I am just starting to learn how the terrain materials work but here is my question. I have what ill call a “mega diffuse” which I created inside of World Machine with a bunch of blended textures I created from screen shots from Google Earth to generate my colour palette for the terrain. I currently have this texture applied to my terrain as shown below. But what I now want to do now is blend this mega diffuse with a few tileable textures which also have normal maps and height maps which I can paint onto the terrain for the close up details and use my mega diffuse for the far away read on the terrain. This is a pretty straight forward thing to do in CryEngine but I really have no idea how to go about it in UE4. Any light on the subject would be greatly appreciated.

Mega Diffuse:

Tileable Terrain Textures:

You do not use a diffuse map for terrains in UE4. Get World Machine to output your (grayscale) blendmaps, you can assign each blend map to a detail map like one of the tileable textures you’ve posted above.

It’s stated here on how to do so.
https://docs.unrealengine.com/latest/INT/Engine/Landscape/Materials/index.html

Set up your landscape material first and create all the layers you’re going to use, give them all an unique name. While you’re importing your heightmap you can choose your material. You should be able to create landscape layerinfos(pretty sure those are for material properties, for example you could have snow particles appear every time a character walks over a “snow” layer). Allongside the layerinfos you shoild be able to assign a blendmap for each layer.

Alternatively you could actually make sure of the diffuse, though I advise using the method I’ve described above.

You can use a similar method using the blend maps. You’re looking for something like this.](Adding Detail Textures | Unreal Engine Documentation)

Multiply each detail output with its designated blend mask.

Thanks for the quick reply. I had actually looked at the above link. I will have a try with it today after i export out the various blend maps. Is is possible to still go in and do manual layer painting with he above method once the materials have been assigned to their masks? I thought there would be a way to tell the engine to use the large diffuse map when the camera is not close to the object its looking at, and use the detailed textures when the camera is up close. This is how CryEngine does it, thought UE4 might handle things in a similar fashion.

You can paint on the layers after you’ve imported the masks. And what you’re looking for is mipmapping. It smoothens out the detail map so it blends better with the terrain at low resolution. In Cryengine at a certain distance the detail map is so much smoothened out it just fades out and thus shows the diffuse colour.
In UE4 you would see the most obvious colour of your detail texture. So grass from a distance would be a simple green.

The dirt close by has an obviously tiled dirt detail map while far away it is just brown.