[vtkusers] Augmented Reality Z-Buffer Question

David E DeMarle dave.demarle at kitware.com
Thu Jan 19 09:18:22 EST 2012


You could render the real object into the back buffer using
vtkRenderWindow::SwapOff(), then vtkRenderWindow::GetZBufferData() to get
the depth, then turn Swap back on and SetZBuffer before rendering the
polyline.

If that is too slow, you could probably write a new vtkPainter that draws
only into the Z buffer and give that to the real object's
vtkPainterPolyDataMapper to get the same effect in one pass.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Jan 19, 2012 at 8:20 AM, <s_goertl at ira.uka.de> wrote:

> Hello,
>
> I'm trying to achieve an augemented reality effect with VTK, but the
> hidden line/surface removal gives me some headache.
>
> I have a virtual representation of a real object and a polyline which is
> supposed to be displayed as part of the augemented reality. How would I
> setup VTK to not render the polyline when it would be invisible (occluded)
> by the real object?
>
> Is there a way to add the representation of the real object to the depth
> buffer, even though its opacity is actually set to 0? Are there other
> solutions to this problem?
>
> Thank you very much!
>
> Jochen
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120119/8ace1e6e/attachment.htm>


More information about the vtkusers mailing list