Need help with tiling texture in a modular asset

Hello, I have two wall meshes that will combine to form a bigger wall in a modular way:

They can be combined either linearly (same Z level) or in increments (increasing the Z level).

When they are in the same Z level they tile seamlessly:

But when I raise the Z level of one mesh there are seams:

Obviously UV maps are not dynamic and when I increase the Z value of one mesh the unwrapped mesh does not increase proportionally. In Blender of course I could use the option “Correct face attributes” in Edit Mode. But this is for UE and as far as I’m aware I cannot do it there?

The other option is to use a triplanar projection. But I really don’t want to waste resources on that if I can fix it with UVs.

Any idea?

Edit: OK, I guess that in order to use UVs and avoid seams, I should work on increments of 2, since the texture is for a 2m x 2m wall. So, I guess that I should make a mesh that increases the Z in 2m and then it will tile well. I guess I could do that, but maybe it would be better to just use triplanar?

So, this is tricky - but not that tricky… here is an example with instances and UVs:

Basically you’re getting the difference in height (Z) and translating that to a difference in (V or Y (although depending on your setup you may have to use X)) and applying that to all vertical faces (faces 90deg from up will have dot(Normal, Up) = 0). You have to correct for texture scale also, if relevant.

Hope that helped.

1 Like