<font><font face="verdana,sans-serif">Idea is right -> Z-buffer contains your information. Z buffer might not give you what you want for translucent polygons. And I don't know how to access Z buffer.<br></font></font><br>
<div class="gmail_quote">On Mon, May 7, 2012 at 2:05 PM, Wenlong <span dir="ltr"><<a href="mailto:scc.wwl@gmail.com" target="_blank">scc.wwl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br>
<br>
I have a 3D model which is a vtkPolyData instance with pre-defined polygons<br>
and cells.<br>
<br>
I visualize this 3D model in a vtkRenderWindow which size is 512x512.<br>
<br>
What I want to achieve is to build a depth map of this 3D model. By depth<br>
map, I mean an image with translucent surface with the depth information.<br>
The pixels in depth map should be darker as it's further from the camera and<br>
brighter as it's closer.<br>
<br>
I'm trying to extract z buffer value on each pixel in vtkRenderWindow and<br>
write it as .bmp image. The result should be a 512x512 picture as well. I'm<br>
not sure if this is a promised approach.<br>
<br>
May I know if my idea is right?<br>
<br>
Many thanks in advance.<br>
<br>
Best wishes<br>
Wenlong<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/How-to-build-depth-map-of-a-3D-model-tp5690901.html" target="_blank">http://vtk.1045678.n5.nabble.com/How-to-build-depth-map-of-a-3D-model-tp5690901.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>