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.<div><div>
<br></div><div>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.</div><div>
<br clear="all">David E DeMarle<br>Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Thu, Jan 19, 2012 at 8:20 AM, <span dir="ltr"><<a href="mailto:s_goertl@ira.uka.de">s_goertl@ira.uka.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I'm trying to achieve an augemented reality effect with VTK, but the hidden line/surface removal gives me some headache.<br>
<br>
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?<br>
<br>
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?<br>
<br>
Thank you very much!<br>
<br>
Jochen<br>
______________________________<u></u>_________________<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/<u></u>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_<u></u>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/<u></u>listinfo/vtkusers</a><br>
</blockquote></div><br></div></div>