Hi, I’m wondering if it’s possible to create it so when you expand a mesh, it’ll just tile repeat the material on it, keeping it the same size and just repeating it instead of stretching? But automatically as I’m changing the size instead of going into the material and changing the texcoord to make it repeat more?
Nice one, thanks!
sort of bad advice mate, World Aligned is expensive for this.
The best way to do this is to create a custom UV so that you can feed it a value derived from Object Scale XYZ.
you mask 1 direction, let’s say X
you multiply that by the number of tiles you want (a scalar).
you multiply UV0 * the result.
Feed into CustomUV1
Use UV1 on texture.
As far as why it’s cheaper, 2 considerations.
World Aligned means it’s using the WPO node, which essentially calculates every pixel/vertex
Passing things into a custom UV is always an optimization. calcs happen faster on GPU.
Yeah you’re right, using the object scale is much better for performance than World Aligned. So if you would have a 2 dimensional mesh (plane for example) or want to uniformly scale a 3 dimensional mesh, then it would be better to do it via the object scale. But if you want to scale a 3 dimensional mesh non uniformly than this is gonna fail (depending on how the mesh is unwrapped it could work on one specific axis only or it could fail for all three, unless I missed something), since the UV are 2 dimensional but the mesh is 3 dimensional.
So yeah, inside its limitations using the object scale to do this would be the better choice and where it fails you can use World Aligned.
I saw a youtube video that explained how to scale non-uniformly and not get stretching / skewing. If I find it in my youtube list, I’ll post the link. I’m not sure it’s going to be the exact, simple solution you’re probably looking for.
Okay, thanks for the advice guys! I’ll take a look at doing it with object scale and see how I do.