[vtkusers] A problem on how to get depth value from Zbuffer

liu jianfei flair.liu at gmail.com
Tue Jul 3 15:17:25 EDT 2007


Hello

   I'm trying to get the depth value from zbuffer by using "GetBufferData"
from vtkRenderWindow. Unfortunately, all the depth values are around from
0.995 to 0.999. But I don't think the value range should be so evenly
distributed. The expected results should be similar as the Gaussian
distribution. In other words, the depth value should be small near the
boundary and large near the center. Can anyone tell me how to capture
z-value correctly? BTW, Does anyone know how to convert the value from
zbuffer into the world coordinate? Thanks in advance!

   Have a nice day!

-- 
Sincerely
Jianfei Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070703/59b9583c/attachment.htm>


More information about the vtkusers mailing list