[vtk-developers] Fwd: Picking problem with OpenGL2 and DepthPeeling

Ken Martin ken.martin at kitware.com
Thu Oct 8 15:16:50 EDT 2015


OK I updated the earlier topic with a fix for this and I threw in the fix
for the Mapper2D, hopefully I will merge tomorrow.





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:* Xabi Riobe [mailto:xabivtk at gmail.com]
*Sent:* Wednesday, October 7, 2015 5:33 AM
*To:* Ken Martin
*Subject:* Re: [vtk-developers] Fwd: Picking problem with OpenGL2 and
DepthPeeling



Ok, keep me updated and of course if you want me to test things i will take
time to do it !



I found an other issue related to VBO update but i will create another
thread with example.



2015-10-06 15:54 GMT+02:00 Ken Martin <ken.martin at kitware.com>:

Yes, I can reproduce that issue thanks to your great example. It is a bug
and I have added it to the list.



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:* Xabi Riobe [mailto:xabivtk at gmail.com]
*Sent:* Wednesday, September 30, 2015 10:49 AM
*To:* Ken Martin
*Subject:* Re: [vtk-developers] Fwd: Picking problem with OpenGL2 and
DepthPeeling



Thanks Ken,

I tried it and it fixes the depth peeling issue, but i still have another
one (not introduced with your changes as it was already there) related to
picker.



Here is a sample to reproduce it: click on the spheres and the color must
change green/red. the first click is good, but then it is almost always the
plane that is picked unless you select the very edge of the external
spheres.



I tested without opengl2 and it works as expected.



2015-09-29 17:57 GMT+02:00 Ken Martin <ken.martin at kitware.com>:

OK I think the following topic should fix the issue.



https://gitlab.kitware.com/vtk/vtk/merge_requests/706







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:* Friday, September 25, 2015 7:50 AM
*To:* VTK Developers
*Subject:* [vtk-developers] Fwd: Picking problem with OpenGL2 and
DepthPeeling



Hi Ken,



with the patch we can pick the transparent surfaces but not the opaque ones
anymore. for example in the sample you can pick on the plane but not on the
spheres that are created.



2015-09-24 16:37 GMT+02:00 Ken Martin <ken.martin at kitware.com>:

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/20151008/6f38ff28/attachment-0001.html>


More information about the vtk-developers mailing list