[vtk-developers] Picking problem with OpenGL2 and DepthPeeling

Ken Martin ken.martin at kitware.com
Thu Sep 24 10:37:29 EDT 2015


Thanks! I believe the new depth peeling code is probably leaving the
zbuffer in a different state than the opaque z buffer. If you get a second
could you try the attached patch and see if it works for you. It is based
on a more recent VTK but it is a tiny patch.



Thanks

Ken



Ken Martin PhD

Chairman & CFO

Kitware Inc.

28 Corporate Drive

Clifton Park NY 12065

ken.martin at kitware.com

919 869-8871 (w)





This communication, including all attachments, contains confidential and
legally privileged information, and it is intended only for the use of the
addressee.  Access to this email by anyone else is unauthorized. If you are
not the intended recipient, any disclosure, copying, distribution or any
action taken in reliance on it is prohibited and may be unlawful. If you
received this communication in error please notify us immediately and
destroy the original message.  Thank you.



*From:* vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On Behalf
Of *Xabi Riobe
*Sent:* Thursday, September 24, 2015 5:29 AM
*To:* VTK Developers
*Subject:* [vtk-developers] Picking problem with OpenGL2 and DepthPeeling



Hi,



I try to pick in a scene that contains a translucent object and the pick
fails if I use the OpenGL2 backend (v6.3.0), tested on VS2013 32 bits with
nVidia Quadro 4000 (driver 353.30)



The same code works with OpenGL backend.



I can reproduce it with the sample code attached, based on the example at
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/Picking  with these
lines added:



   renderer->SetUseDepthPeeling(1);

   renderer->SetMaximumNumberOfPeels(8);

   renderWindow->SetAlphaBitPlanes(1);

   renderWindow->SetMultiSamples(0);



and the opacity set to 0.5 for the plane.



If i don't use depth peeling, or if the plane is opaque, the picker works
as expected.



It seems that the pick fails when in vtkOpenGLRenderer::DonePick the float
value returned by GetZbufferData is 1.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150924/3d4de193/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DPPick.patch
Type: application/octet-stream
Size: 1503 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150924/3d4de193/attachment-0001.obj>


More information about the vtk-developers mailing list