[vtkusers] Transparent NaN color with OpenGL2

Ken Martin ken.martin at kitware.com
Tue Sep 22 08:08:43 EDT 2015


Hmm interesting.  So what is happening is that the new code in OpenGL is a
bit "better" at figuring out when something is translucent. In your case by
adding a transparent element to your lookup table the new backend is marking
that prop as Translucent. Historically, and currently, translucent props get
rendering without depth tests but with alpha blending turned on. In the old
backend that prop would still be considered opaque and if you really needed
it blended you would do the old "SetOpacity(0.99) trick to force VTK to
recognize that the prop should be translucent.

Not sure how to handle t but I wanted to let you know what was happening.

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.


-----Original Message-----
From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Karsten
Tausche
Sent: Thursday, September 17, 2015 4:15 AM
To: vtkusers at vtk.org
Subject: [vtkusers] Transparent NaN color with OpenGL2

Hi,

I'm using vtkLookupTable::SetNanColor to hide cells with NaN scalar values
in my data sets (alpha value set to zero). This worked fine with the old
OpenGL backend, but seems to break the depth test with OpenGL2.

See the attached images: the red/blue quad is always rendered in the
foreground, no matter how you rotate the camera. This happens when you set
the alpha value for NaN-values to something different to 1 for both planes.

I tested this with today's nightly branch, but it seems to be broken in the
OpenGL2 backend since a while. (On Nvidia, Windows 8.1x64, MSVC2015)

Is this a bug in the new backend, or is there some parameter that I have to
configure for this setup?

Thanks,
Karsten


More information about the vtkusers mailing list