I just started learning UE4. When I apply a material on an object and I scale the object, the texture scales with it. I tried to create a Material instance with specific scaling and it worked. But what if I have 10+ different walls each with different scale. Do I need to create a MI for every scale I have, or is there another solution?
Here are two solutions for you, depending on the application:
- World aligned materials as suggested by @ClockworkOcean above;
- You can use [Object Scale] node in the material editor. It will give you the scale of any object the material is applied to, and you can multiply your UV coordinated by it. There are some drawbacks, since UV is two-dimensional and objects are three-dimensional, so your material will need to take into account the faces orientation. But you can do that automatically by getting [VertexNormal] and comparing it to world axes. It may seem a bit tedious, but it does the job. It looks something like this: