[vtkusers] Z-buffer to Depth: formula

Dženan Zukić dzenanz at gmail.com
Fri Dec 9 09:39:42 EST 2011


0 corresponds to near clipping plane, and 1 corresponds to far clipping
plane. If you know the distance of both you can do linear interpolation.
Someone correct me if I am wrong.

On Fri, Dec 9, 2011 at 07:41, Atul Kumar <sharmaatul11 at gmail.com> wrote:

> Thank you so much David. I will try vtkRenderer::ViewToWorld().
>
> To Dev
>
> vtkRenderer::GetZBufferData() gives us the depth map values which ranges
> from 0 to 1, so it is not the actual depth value at the pixels. To get the
> actual depth at pixels we need to convert Z-buffer into actual depth
> values. So, for this we need a conversion formula. I hope this makes it
> clear.
>
> Regards,
> Atul
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111209/809c90f0/attachment.htm>


More information about the vtkusers mailing list