Using customized UVs for tiling 2 different textures in the same material - how ?

I have material that includes diffuse image that needs to be tiled and there are 2 normal maps (for simplicity sake let’s say there is 1 normal map), one is for diffuse texture that needs to tile the same way as diffuse, and one is global normal map that fits UV and defines major details of my mesh-based terrain.

This is diffuse part of my material: https://s31.postimg.org/5ekf6bjm3/ue4_sand_diffuse_mat.png

It works in PIE with ES2 preview, but it doesn’t work on mobile (diffuse doesn’t tile - it just gets fitted to UV map). I had to add customized UV socket and move that contraption there in order to be able tile texture. It’s all cool, except now my global normal map that was suppose to be stretched over the mesh is tiling along with diffuse.

My mesh has 2 UV maps, UV0 is for texture, UV1 is for lightmap (UE4 doesn’t generate it).

Is it possible to use customized UVs to have diffuse texture tiling, but global lightmap stay fitted ? How do I do that?

Thanks

You can plug in a TextureCoordinate node into the UV input of the texture map and there’s an option there to change the UV channel. You can change your lightmap UV coordinate channel in the static mesh properties. Note however that normal maps only render correctly when using the first UV channel.

@darthviper107 So, should I use customized UV0 for normal map, customized UV1 for diffuse and add extra UV2 for lightmaps ?

You could do UV0-normal map+diffuse map1 UV1-diffuse map2 UV2-lightmap
The other UV channels can be whatever, the normal map just has to be on the first channel. It’s the way that the engine was programmed where it doesn’t consider other UV channels properly in regards to the normals, they might update in the future to render normal maps properly on other channels but no idea if that will happen.