<HTML>
Ben Held wrote:
<BLOCKQUOTE TYPE=CITE>I am trying to control transparency on individual
elements by using alpha
<BR>values in a lookup table.&nbsp; I get transparency, but elements that
should have
<BR>the same transparency are not shown the same.&nbsp; See the attached
image.&nbsp; Any
<BR>thoughts?

<P>Ben

<P>Ben L. Held
<BR>Simulation Technology &amp; Applied Research, Inc.
<BR>11520 N. Port Washington Rd.
<BR>Suite 101B
<BR>Mequon, WI&nbsp; 53092
<BR>Phone: (262) 240-0291 x101
<BR>FAX: (262) 240-0294
<BR>e-mail: ben.held@staarinc.com
<BR>web: <A HREF="http://www.staarinc.com">http://www.staarinc.com</A>

<P>&nbsp; ------------------------------------------------------------------------

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Name: vtk.jpg
<BR>&nbsp;&nbsp; vtk.jpg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type: JPEG
Image (image/jpeg)
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Encoding: base64</BLOCKQUOTE>
&nbsp;Ben,

<P>&nbsp;I think that the problem is that the surface polygons aren't being
rendered
<BR>&nbsp;in back to front order.&nbsp; The result of alpha blending two
or more polygons is
<BR>&nbsp;order dependent.&nbsp;&nbsp; One thing that would help the appearance
is to remove the
<BR>&nbsp;backfaces using the BackfaceCullingOn method of vtkProperty.
If you had
<BR>&nbsp;just one convex polyhedron that would remove the artifacts.&nbsp;
However you
<BR>&nbsp;appear to have at least 2 polyhedrons and at least 1 of them
isn't convex.

<P>&nbsp; There&nbsp; is a new class in recent releases of vtk which is
probably what you
<BR>&nbsp; will want to use.&nbsp; It is reportedly very good even though
its sorting method
<BR>&nbsp; is approximate.&nbsp; Its called vtkDepthSortPolyData and it&nbsp;
sorts poly data
<BR>&nbsp; along the camera view direction.&nbsp;&nbsp; There is an example
in the contrib directory.

<P>&nbsp;&nbsp; [The formula for blending the colors of two polygons is&nbsp;
a*A + (1 - a)*B
<BR>&nbsp;&nbsp;&nbsp;&nbsp; where A is the front polygon and a is its
opacity (i.e. a = 1 for an opaque
<BR>&nbsp;&nbsp;&nbsp;&nbsp; polygon and a = 0 for a transparent polygon.&nbsp;
This is&nbsp; clearly not the same
<BR>&nbsp;&nbsp;&nbsp;&nbsp; as&nbsp; b*B + (1 - b)&nbsp;*&nbsp;A which
shows that the result is order dependent. ]

<P>&nbsp; Dave
<PRE>--&nbsp;
David E Jones
Du Pont Central Research
Experimental Station, Bldg 320
Wilmington, DE 19880-0320</PRE>
&nbsp;</HTML>