Applying textures to a heightmap via splatmaps?

Believe me when I say that I’ve googled this. The closest I can find in regards to a tutorial on how to apply textures, is another user in a thread on this forum saying “Just import your splatmaps, it’s real easy”. Now I’ve created the splat maps, for grass, stone, and dirt coverage. But I could not find any detail on how to use them to automatically place the textures onto the terrain.

Here’s what I have so far, a very barebones material: https://i.imgur.com/aUckgtI.png

So what do I do now, to utilize the splatmaps?

You do it within the landscape editor. On your various layers, you import the weight information. You’ll need a *.raw for each layer. This will give each layer their weightmaps and from there, within the material editor, the layer blend node will now have the right information to place the textures accordingly.

Ah, so it’s not something I do through the material editor, I gotcha. Unfortunately, I don’t see any way to create a layer for an existing terrain. I assume it’s something I have to do when creating a new landscape, which brings up a new problem; when I export the current heightmap from UE4 to a .r16 raw image, and then try to import it, UE4 throws an error saying that the heightmap has an invalid size. Is there a way around that?

If not, I’ll just redo the changes I made to it, but that would be a pain.

Edit: I figured it out. You need to set your terrain material’s color to use a TerrainLayerBlend element, and then you can add as many layers as you want through the material editor.

The next problem is actually importing the splatmaps. I right-click the layer -> Import from file and then select my splatmap for the sand. But the sand stays placed throughout the whole terrain. https://i.imgur.com/iyjV1u9.png