In some software is possible to create a function to rotate the normal map inside the editor in real-time.
I’m talking about substance designer, painter and unreal engine.
I made some attempt by my self in blender node editor but I could not get the result.
You can add a texture coordinate and mapping node and change the z rotation. I’m not sure if there’s a way to expose just this single value so you can tweak it from the outside, for example when you put all these nodes in a group.
@MmAaXx, do you want arbitrary rotations?.. It might be possible to do it…
Theoretically this might work (thought I haven’t experiment it in real case scenarios)
That’ll rotate the normal orientation, so lighting and reflections will come along for the ride.
Compensate by applying the opposite rotation to the vector space itself: (You can use a regular mapping node for this. I just wanted quick access to the Z rotation component.)
I thought that was what MmAaXx wanted… (rotating the vector while keeping UVs in place).
Your method works ok, but the part of rotating the Texture has an error: the normal map must be transformed to [-1, 1] before rotating, and then transformed again to [0, 1] when plugging it to the NormalMap node. Without these steps, the normals will not rotate around the Surface Normal.
All good indeed. And for the record, I didn’t set out to prove you wrong or anything. Having hung around this forum for a bit, I’ve gotten the impression you know a lot more about this subject than I do.