How to repeat texture over a mesh

How do I repeat a texture over a mesh rather than it getting stretched and skewed across the entire mesh from edge to edge? Here’s screenshots.

Texture from starter materials, a modified duplicate

Texture placed on cube mesh that I resized to create a wall

I’m simply trying to get the texture / material to repeat over the wall, not stretch / contract on faces. So it looks like it does on the cube in the material editor screenshot.

I read something about UV addressing mode set to ‘stretch to edges’ instead of ‘repeat’. But I don’t know where to find that setting, even after doing a search for it in the docs.

I think this is what you need: Seamlessly Tiling Material - [UE4] - YouTube

1 Like

Your uvs need to be laid out so there isn’t stretching. Go to your modeling package of choice and and unwrap your uv’s.

I actually want the U and V coordinates to be far smaller, but I see that the U tiling is stretched more than the V tiling because it’s longer (thus not producing an exact hexagon with equal length sides. I don’t want to tile the mesh because I want to be able to create a mesh and place materials / textures on those meshes without using the tiling method. I’m going to try the world aligned textures method in the material editor, and try using a 3d modeling program to wrap / unwrap the UVs according to the mesh’s size. Overall, I’m looking into applying materials to meshes efficiently, so not using an external program for every single mesh to get the UVs correctly scaled to every mesh. That’s extremely laborious and shouldn’t even be a part of primary workflow in building structures, if you ask me. I understand for geometry separate from the buildings and landscape, or which blend into the base geometry of the level. But even for those, it should be easier to at least scale UVs within the engine, and do basic modifications to those same things without having to export / import / export / import…plus all the other changing of settings and such simply to get it to appear somewhat correctly in the level. It’s not a wonder games take so long to get made and released, and probably a part of why DLC is so expensive these days.

The video tutorial is a good one, though it doesn’t have subtitles activated for it. I’ll try unwrapping the UV’s. I’m intending to learn how to do it efficiently though, so I’m not sure I’ll be capable of doing that unwrap correctly at first. Anyone know of the setting to enable UV addressing for ‘repeat’ instead of ‘pull to edges’?

Hi, the mesh has UV-Coordinates that specify how a texture gets wrapped around it (you would set those UV-Coordinates in a 3d modelling software of your choice through unwrapping the UVs). When you scale the mesh the texture still gets applied the same way, so it gets stretched/contracted.

There are several ways you could solve this, depending on what you want to use the mesh for.

  1. Create a new scaled mesh inside a 3d modelling software, unwrap the UVs and use that new mesh (so if you want to change the scale again you would again need a new mesh).

  2. Change the UV-Tiling inside the material (in your case the U-Tiling), but this only works for this specific scale.

  3. Use world aligned textures and world aligned normal (documentation from unreal engine: Texturing | Unreal Engine Documentation) That will work for any scale.

  4. Don’t scale the mesh, tile it (so duplicate the mesh until you have the wall), that’s what I use most of the time to create walls.