<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. I get transparency, but elements that
should have
<BR>the same transparency are not shown the same. See the attached
image. Any
<BR>thoughts?
<P>Ben
<P>Ben L. Held
<BR>Simulation Technology & Applied Research, Inc.
<BR>11520 N. Port Washington Rd.
<BR>Suite 101B
<BR>Mequon, WI 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> ------------------------------------------------------------------------
<P>
Name: vtk.jpg
<BR> vtk.jpg Type: JPEG
Image (image/jpeg)
<BR>
Encoding: base64</BLOCKQUOTE>
Ben,
<P> I think that the problem is that the surface polygons aren't being
rendered
<BR> in back to front order. The result of alpha blending two
or more polygons is
<BR> order dependent. One thing that would help the appearance
is to remove the
<BR> backfaces using the BackfaceCullingOn method of vtkProperty.
If you had
<BR> just one convex polyhedron that would remove the artifacts.
However you
<BR> appear to have at least 2 polyhedrons and at least 1 of them
isn't convex.
<P> There is a new class in recent releases of vtk which is
probably what you
<BR> will want to use. It is reportedly very good even though
its sorting method
<BR> is approximate. Its called vtkDepthSortPolyData and it
sorts poly data
<BR> along the camera view direction. There is an example
in the contrib directory.
<P> [The formula for blending the colors of two polygons is
a*A + (1 - a)*B
<BR> where A is the front polygon and a is its
opacity (i.e. a = 1 for an opaque
<BR> polygon and a = 0 for a transparent polygon.
This is clearly not the same
<BR> as b*B + (1 - b) * A which
shows that the result is order dependent. ]
<P> Dave
<PRE>--
David E Jones
Du Pont Central Research
Experimental Station, Bldg 320
Wilmington, DE 19880-0320</PRE>
</HTML>