Master Material Custom Rotate and scale UVs

Looking for some advice. I have created a set of master materials for my scene. I cannot work out how to incorporate the “custom rotator” node as a parameter so that I can change the UV rotation for when required for the material instances.I can get the UV scale and the UV Rotate to work separately but not together. Can someone please let me know which MATH function I need to use? I have tried ADD and Multiply they work but the texture increases in size as it is rotated.

Hi, this is my parametric BaseMat, based on Koola’s BaseMat.

I’ve made it so in the instances you can scale, move, or rotate the UVs, as well as control the textures (NM intesity, Diffuse Color and Roughness Power)

Hope it can help you =)

Thank you very much Acer.Digital.Art

Hello, my dear friends! I need of your help.

Let I have some rectangular surface (it doesn’t matter: static or procedural mesh) and it isn’t square in general (W, H - width and height: 700 x 450 in my example).
Let I have some texture that I want to use to tile this mesh. This texture has sizes w and h (300 x 100 in my example).

I create a simple material with tiling (UTile and VTile) and rotation (UVRotation) parameters:

Coefficients of tiling are calculated for current surface size: 700 / 300 = 2.3333; 450 / 100 = 4.5
When UVRotation is zero I have correct tiling:

2.JPG

But if I set some UVRotation I have good result only on square surface in material preview:

3.JPG

And in main scene I get deformation:

4.JPG

I understand origin of this deformation, but I can’t understand can I do it at all: to set “start” tiling coefficients (for zero rotation angle), to set rotation and to get rotated and non-deformated texture with right sizes of tiling elements? What should I change in my material?

brr… try to move tiling before rotating?

I tried to rotate UV after tiling:

7.JPG

But this has no effect :frowning:

Preview:

7.JPG

Main scene:

7.JPG

Do you mean offset? I think it will give only linear shift of every pixel, willn’t?

My friends! I found solution, but it requires additional parameter: texture (surface) aspect ratio. If you interested to find simpler solution: wellcome, I will be glad!
As you can see we should multiply one coordinate to aspect ratio before rotation and divide it by aspect after.