# Camera Data "View Vector" Interpretation

I am trying to develop some materials with interesting optical properties. In doing so, I am investigating the use of the "View Vector", however I do not understand it. Looking at the documentation, it says it is a (unit) vector pointing from the camera to the point on the object.

However, the following screenshot suggests something different. I would expect taking the dot product of the "View Vector" with the object normals should yield a value of 1 when the object surface faces the camera, and a value less than 1 elsewhere, specifically zero for parts of the object perpendicular to the camera viewpoint.

The 3 objects in the screenshot show a) behaviour different to that expected and b) seemingly inconsistent behaviour. What is going on here?

Thanks

• – user1853
Commented Feb 25, 2019 at 21:31

## 1 Answer

The View Vector is in Camera space, but the Normal is in World space.

You need to transform one of the vectors to the other space if you need to compare them. I learned this now so I mark this question as helpful.

But this can apparently be simplified using the Incoming socket on the Geometry node. Incoming points towards the camera instead of from Camera towards geometry so the Absolute math node becomes redundant.

• Perfect, thank you! Marked as correct. Can't mark as useful due to rep. Commented Feb 25, 2019 at 17:52
• As a follow up, it seems that the 'Incoming' output from the Geometry node is a good replacement for 'View Vector', and does not require the Vector Transform node. Any comments on the difference between these two would be appreciated! Commented Feb 25, 2019 at 19:21
• Good finding! I have updated the answer. Commented Feb 25, 2019 at 21:23
• And just to confuse everything, if you ever use OSL, its I global variable points the other way from Geometry's 'Incoming' Commented Feb 26, 2019 at 12:17