<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">The problem is simply demonstrated with the opacity example:
<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Opacity" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Opacity</a><br>
<br>
Adding this line:<br>
  sphereActor->SetPosition(1.0,0.0,0.0);<br>
and setting the opacity of both actors to 0.99 gives an unexpected and unattractive result.<br>
<br>
I see that there have been posts about problems with opacity/transparency as far back as 2006.  Maybe there is a solution...<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF830592"><font color="#000000" face="Tahoma" size="2"><b>From:</b> vtkusers [vtkusers-bounces@vtk.org] on behalf of Gib Bogle [g.bogle@auckland.ac.nz]<br>
<b>Sent:</b> Sunday, 10 August 2014 11:25 a.m.<br>
<b>To:</b> vtkusers@vtk.org<br>
<b>Subject:</b> [vtkusers] Odd opacity issue<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Hi,<br>
I'm using vtkRenderWindowInteractor (VTK 5.10) in Qt, rendering spheres.  I'm trying to implement a degree of transparency, like this:<br>
<br>
<span style="color:#800000">actor</span><span style="color:#000000">-></span>GetProperty<span style="color:#000000">()-></span><span style="font-style:italic; color:#000000">SetOpacity</span><span style="color:#000000">(</span><span style="color:#800000">opacity</span><span style="color:#000000"></span><span style="color:#000000"></span><span style="color:#000000"></span><span style="color:#800000"></span><span style="color:#000000">);</span><br>
<br>
applied to all the spheres.<br>
<br>
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.<br>
<br>
Is this a well-known issue, and is there a simple way to fix it?<br>
<br>
Thanks<br>
Gib<br>
</div>
</div>
</div>
</div>
</body>
</html>