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

Dženan Zukić dzenanz at gmail.com
Wed May 9 07:24:46 EDT 2012


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.

On Mon, May 7, 2012 at 2:05 PM, Wenlong <scc.wwl at gmail.com> wrote:

> 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.
> _______________________________________________
> 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/20120509/e6f0a15a/attachment.htm>


More information about the vtkusers mailing list