# How to rotate set of textures using Texture Coordinate and Mapping nodes?

I'm trying to rotate a set of textures (albedo, roughness, normal) using Texture Coordinate and Mapping nodes in Blender 2.83. Location and Scale properties work properly, but when I change Rotation the shadow isn't right. Looks like direction of light also changes. You can see on the second screen - rotation is 90 degree and it looks like the light is on the bottom and not on the right (considering shadows, not luminosity). On third screen I rotated the plane itself 90 degree and it looks right. I've tried different outputs of Texture Coordinate, types of Mapping and types of Normal Map, but cannot find the right combination. Could you please help?

Edit 1: added solution for 90 degree rotation based on michaelh answer

Edit 2: added solution for custom rotation based on michaelh answer and scurest comment

• To be honest, everything looks fine to me. You have the nodes set up right, and the shadow "appears" accurate. I think the "artifacts" you are seeing ares more a function of the "pattern" of the texture than anything else - try the same thing with a couple different materials and see if it still looks " wrong. Aug 25, 2020 at 12:51
• Yes, couple of other texture sets exhibit the same behavior. I've added third screenshot where the plane itself is rotated 90 degree and it looks right. Of course it was only possible because it's a square and rotation is 90 degree. Aug 25, 2020 at 13:48

When you rotate a normal map, a good way of thinking about is that you are rotating the light direction as well. (Which is what you're seeing.)

To rotate correctly by 90°, you'll have to rotate the "light direction" back by -90°.

You can do this swapping the X and Y vectors. You also need to invert the (orig) Y. See here:

This is how you rotate by 180°:

EDIT: Re. angles which aren't multiples of 90°: It is possible, but a bit more complicated.

Here's a node setup:

So, I made a Node Group. Let me know if this works correctly or if I made a mistake. ;)

EDIT2: scurest has added an easier method in the comments: Rotate the output of the Normal Map node via Mapping Node.

So, these two are identical:

• It worked, thank you. But is it even possible to rotate by let's say 55 degree? Aug 25, 2020 at 15:24
• I've updated my answer to include this. Aug 25, 2020 at 19:04
• Can you use a mapping node to rotate the normal coming out the normal map node instead? Aug 25, 2020 at 21:10
• Oh yeah! That's much easier, of course. Good thinking! That was also a good way to verify that my node group works correctly. I'll include it in the answer. Aug 25, 2020 at 21:55
• Thank you, I reproduced the easier solution and added as Edit 2. Aug 26, 2020 at 2:09