[vtkusers] The View coordinate system: meaning of the z value

David Gobbi david.gobbi at gmail.com
Fri Oct 30 16:32:44 EDT 2015


Hi David,

The following link has some info, but probably not the full answer:
https://www.opengl.org/wiki/Depth_Buffer_Precision#Why_is_there_more_precision_at_the_front_of_the_depth_buffer.3F

 - David

On Fri, Oct 30, 2015 at 2:14 PM, David Cole via vtkusers <vtkusers at vtk.org>
wrote:

> The documentation here:
>
>     http://www.vtk.org/doc/nightly/html/classvtkCoordinate.html#details
>
> says:
>
>     "VIEW - x-y-z (-1,1) values in camera coordinates. (z is depth)"
>
> I understand how to call WorldToView and ViewToWorld on a renderer to
> go back and forth between these coordinate systems, but I'm trying to
> understand what the math is for the z-value.
>
> What I think I'm seeing is the z value goes from 0 to 1 from the near
> clipping plane to the far clipping plane, but it does not appear to be
> exactly linear. It's nearly linear within the 0 to 1 range, but from
> -1 to 0, the view coordinates are much closer together in world space
> than they are from 0 to 1, and from 1 to 2, they are much farther
> apart in world space than the 0 to 1 range.
>
> What is the exact mathematical meaning of the z-value of the view
> coordinate system as it relates to distance in world coordinates?
>
> Are there any good articles or examples anybody can point to as a good
> tutorial on using View coordinates?
>
> My goal is to reflect and project some physically measured artifacts
> from the real world (in front of the screen), and have the reflection
> "look good". So I want to express the points involved in View
> coordinates, and then reflect /"adjust z" and then call ViewToWorld to
> get the right VTK world coords for these things...
>
>
> Thanks,
> David C.
>
>
> P.S. -- please forgive the previously prematurely sent nearly empty
> email... Definitely a PBKAC.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151030/68c1ce9f/attachment.html>


More information about the vtkusers mailing list