<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Gib.<br>
    <br>
    Proper blending of transparent objects is only possible by rendering
    them in the correct order.<br>
    This can be tricky and if objects or polygons overlap you even won't
    get away with sorting them...<br>
    You probably want depth peeling for order-independent transparency:
    <a href="http://www.vtk.org/Wiki/VTK/Depth_Peeling">http://www.vtk.org/Wiki/VTK/Depth_Peeling</a><br>
    <br>
    Best Regards,<br>
    <br>
    Kim<br>
    <br>
    <div class="moz-cite-prefix">Am 10.08.2014 01:48, schrieb Gib Bogle:<br>
    </div>
    <blockquote
cite="mid:BD80F91C3E2E394894ED4780703D7F9E81D0D3E3@uxcn10-tdc01.UoA.auckland.ac.nz"
      type="cite">
      <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>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">The problem is simply demonstrated
        with the opacity example:
        <br>
        <a moz-do-not-send="true"
          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 [<a class="moz-txt-link-abbreviated" href="mailto:vtkusers-bounces@vtk.org">vtkusers-bounces@vtk.org</a>] on behalf of Gib Bogle
              [<a class="moz-txt-link-abbreviated" href="mailto:g.bogle@auckland.ac.nz">g.bogle@auckland.ac.nz</a>]<br>
              <b>Sent:</b> Sunday, 10 August 2014 11:25 a.m.<br>
              <b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
              <b>Subject:</b> [vtkusers] Odd opacity issue<br>
            </font><br>
          </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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>

Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>