How do I achieve this effect? Dynamic decal paths

I’m trying to figure out how to achieve the terrain texturing effect in the attached images.

As you can see the dirt paths on top of the grass texture here appears to be some kind of decal, with both the dirt and the grass being their own tiling materials, but the border between them is some kind of masked (and in the bottom example, normal mapped) texture that tiles or is somehow dynamically painted along the edges.

How would you achieve this in UE4? Creating an interpolation blend mask on two terrain textures doesn’t seem like the right approach. It seems like a decal, but it needs to be more dynamic than that - when two decals are close to each other they need to be aware of each other and ‘meld’ kind of like two water droplets touching. Is it possible to apply this effect to a UE4 terrain? I’m totally fine with using a UV unwrapped mesh for my ground planes it if that’s the way to go.

The only ways I can think to do this for sure is to either have a different decal for each path shape I want to use, or to fully texture and UV map the paths to a mesh ground plane, using the UV co-ords for the alpha map between the two materials, and two tiling materials for the grass and dirt, respectively.

I’d really appreciate any leads on how to achieve this effect!

https://polycount.com/discussion/223646/src

Wasn’t this answered on Polycount where you also seem to have found your own solution?

I’m hoping I’ll get more UE-centric responses here - assuming that not everyone browses both forums and there might be more relevant expertise lurking on these pages than those (thanks for your responses on both though!)

By drawing to a render target.

mostly what I suggested, but in a world the size of Zelda you have obvious memory limitations. How many images would you need to pre-craft in order to do this? How much of a load on memory would this incur?

The better approach is either using a tile map, or composting the floor out of many tiles you can individually replace as needed.

because of the nature of the floor, and the need for uniform tiling, you could also script a standard floor out of an actor with an HISM component.
I would expose 2 floats, x and y, and automate the tile generation based on rows/columns from X/Y in construction script.

With the base created and automatically spaced out you can then replace individual tile materials to create the path you want.

And theoretically you could even force the border material to be automated based on the tile next to it. I would do this logically though, not in the shader.