14
$\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$
20
$\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$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.