[vtkusers] Strange Visualization Results With Transparency on Polydata

aborsic at ne-scientific.com aborsic at ne-scientific.com
Tue Dec 4 14:20:23 EST 2018


Dear All,

 

I am experiencing some strange visualization results in VTK 8.1.0 on
polydata using a LUT with some transparency for some entries and opacity for
others.

 

I am attaching a Python example to reproduce the problem. The code creates
two polydata spheres which are spatially separated. An array with a uniform
values of 1 is associated to cell data for the first sphere, and an array
with values of 2 to the second sphere. The two spheres are appended together
for convenience with a polydata append filter. 

 

A LUT is created with two entries, solid red RGBA = (1,0,0,1) and
transparent green RGBA = (0,1,0,0.2), the scalar range is set to (1,2)
mapping the cells of the first sphere to the first LUT entry and the cells
of the second sphere to the second LUT entry. 

 

As shown by the attached rendering the red sphere also appears as
semi-transparent, and in a wired way, if rotated some portions of the sphere
seem more transparent, and others less. Setting the second LUT entry to
solid green RGBA = (0,1,0,1) makes both spheres opaque - this is expected,
but why does modifying the alpha channel of the second LUT entry affects
also the appearance of the first sphere?

 

I am experiencing this on two different Windows 10 computers equipped with
modern NVIDIA GPUs, and on a 2017 iMac 27 running Mojave, all these
computers have VTK 8.1.0.

 

Any comment / advice is welcome,

 

Thanks, Best Regards,

 

Andrea

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181204/4014d05d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Spheres.PNG
Type: image/png
Size: 463174 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181204/4014d05d/attachment-0001.png>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: two_spheres.py
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181204/4014d05d/attachment-0001.ksh>


More information about the vtkusers mailing list