[vtkusers] Odd opacity issue
g.bogle at auckland.ac.nz
Sat Aug 9 19:48:02 EDT 2014
The problem is simply demonstrated with the opacity example:
Adding this line:
and setting the opacity of both actors to 0.99 gives an unexpected and unattractive result.
I see that there have been posts about problems with opacity/transparency as far back as 2006. Maybe there is a solution...
From: vtkusers [vtkusers-bounces at vtk.org] on behalf of Gib Bogle [g.bogle at auckland.ac.nz]
Sent: Sunday, 10 August 2014 11:25 a.m.
To: vtkusers at vtk.org
Subject: [vtkusers] Odd opacity issue
I'm using vtkRenderWindowInteractor (VTK 5.10) in Qt, rendering spheres. I'm trying to implement a degree of transparency, like this:
applied to all the spheres.
If opacity is less than 1 the image immediately changes in unexpected ways. See the two attached images, with opacity = 1.0 and 0.99. It looks as if spheres have had their positions and sizes changed. But when I rotate the scene it becomes apparent that something else is happening. Some of the "foreground" spheres move from left to right (for example) while others apparently in the foreground are moving right to left. It seems that the order of rendering of the spheres, which normally places the most remote first and the nearest last, has somehow been messed up, so that spheres at the back are being rendered last so that they appear to be the closest. Maybe the order has been simply reversed, but the visual effect is made more confusing by parallax - my brain is interpreting the bigger spheres as closer.
Is this a well-known issue, and is there a simple way to fix it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers