I'm making a setup that reduces the complexity of shading by replacing the Normals with coordinates from an object. If you take Object Coords of an empty and plug them into the normal socket of a shader, you end up with the object being shaded as if it were a sphere. If you make some edits to each axis, then you can change the shape more. In this setup, the sphere is distorted quite a bit to give the shading I want for the face:
What we see here is that the altered normals are masked only to the face, with the real normals still in use further up the forehead. As the head rotates, you can see the shading desync. It rotates with the head, instead of the light moving over it. This is because the Empty is parented to the head bone. I'm not sure exactly what's going on, but its something to do with the coords of the object being in the wrong space (world or object). I've tried Vector Transform node, but it doesn't help.
If the Empty only copies the location of the head and not the rotation, then there's no problem. But that only works if the head only rotates on Z, and never tilts or rolls. So it's not a proper solution.
I'm looking to understand why the coords from the empty are behaving wrong in the first place, and what can be done to make things stay properly synced up as the head moves. Someone has suggested that they might need to be multiplied by the Matrix of the object. I could get the Matrix info via drivers, but I'm not sure what to do with it after that.