I am working on a realistic scope and try to simulate the black fade effect, so when you don’t look right in the center of the scope the view will turn black/fade out. I am using the RadialGradientExponential node to create the black circle with some fade and use the bump offset to move the black circle depending on the angle I look from.
Everything works except the bump offset direction, when I look at it from the side the black circle goes in the wrong direction and follows my angle, but I want it to go in the opposite direction, so when I look at it from the right the black circle should move away from my angle to the left. I tried to invert the bump offset, by using the bump offset advanced node and adding a one minus to the distortion, but I had no success with that, thats why I ask you guys for help.
I achieved the affect by using some simple vector math. You just need your lens to be separate mesh.
Just get the difference between the object location and the camera location in local space. Normalize the result and add 0.5, you should get the result you’re looking for.
I did that by setting the bump offset height to a positive value around 30 and scale the circle to fit the scope, reason for 30 is that if you have negative or a too big positive value will result in the effect you described, which is useful but not in this case, so I will recommend trying bump height value from 0 to lets say 60, I left the other settings default, like the ratio at 0.05.