16
$\begingroup$

In the blender manual the options for camera data node are explained like this:

View Vector

A Camera space vector from the camera to the shading point.

View Z Depth

How far away each pixel is from the camera

View Distance

Distance from the camera to the shading point

enter image description here

So, what is the shading point? How is each of these options different form the other, and in which cases should one be used instead of the other?

$\endgroup$
2

1 Answer 1

22
$\begingroup$

Shading Point

is the nearest point of intersection of the camera ray with a visible object, which the render engine is currently calculating the color for (these calculations are referred to as shading)

enter image description here

The real View Vector

it is a vector (or a ray) in the camera space, starting from the center of the camera (or the view) and reaching the shading point

enter image description here


View Vector

it is a normalized view vector (magnitude = 1 or unit vector) in the camera space, starting from the center of the camera (or the view) and pointing at the shading point (it doesn't necessarily reach it )

enter image description here


View Z Depth

  • it is the Z component of the view vector (the non normalized)
  • it is the shortest distance from the shading point to the camera's XY plane (the is not normalized Z-depth, it is not from 0 to 1)

enter image description here


View Distance

it is the magnitude of the non normalized view vector, or simply the distance from the shading point to the camera's center

enter image description here


where to use each one: well you know enough now to decide where to use them!

$\endgroup$
0

You must log in to answer this question.