[vtkusers] How to build depth map of a 3D model?

Wenlong scc.wwl at gmail.com
Mon May 7 08:05:21 EDT 2012


Dear all,

I have a 3D model which is a vtkPolyData instance with pre-defined polygons
and cells.

I visualize this 3D model in a vtkRenderWindow which size is 512x512. 

What I want to achieve is to build a depth map of this 3D model. By depth
map, I mean an image with translucent surface with the depth information.
The pixels in depth map should be darker as it's further from the camera and
brighter as it's closer.

I'm trying to extract z buffer value on each pixel in vtkRenderWindow and
write it as .bmp image. The result should be a 512x512 picture as well. I'm
not sure if this is a promised approach. 

May I know if my idea is right?

Many thanks in advance.

Best wishes
Wenlong

--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-build-depth-map-of-a-3D-model-tp5690901.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list