![]() |
iTool User's Guide: Common Operations |
![]() |
Within iTools, you can set the transparency of an object to make it appear totally opaque, transparent, or translucent. Isosurface objects are just such a case. Text objects can also be made partially transparent so that you can see through the labels on a complex plot and still see both the labels and the data. In the majority of scenarios where you will utilize opaque data objects and translucent text labeling, this translucent rendering works very well.
It is important to know, however, that translucent rendering does not always work well in more complex situations. This is because translucent objects must be strictly rendered from the back (far from the viewer) towards the front (closer to the viewer). IDL accomplishes translucent rendering by blending the pixels already drawn on the device with the pixels that are drawn to represent a translucent object. Therefore, it is important that the objects that are positioned behind the translucent object be rendered before the translucent object. If the ordering is not correct, then you will not be able to see the objects behind the translucent object.
For most cases in iTools, ordering is not a problem. If you encounter it as a problem, the Bring to Front (and related) operation can help you improve the appearance of your translucent objects. In some cases, however, the ordering is not easily accomplished. For example, a complex isosurface rendered as a translucent object does not always appear correct from all angles.
An isosurface is composed of a large number of triangles stored in an IDLgrPolygon object. The triangles are always drawn in the same order, the order in which they are stored in the object. Thus, as the viewing angle changes, the apparent back-to-front ordering of the triangles also changes. In some cases, the triangles closest to the viewer draw first and end up blocking the view of other triangles drawn later and behind them that should be visible through the translucent triangles drawn first.
For all these reasons, transparency should be used with care in dealing with objects like a complex isosurface. The rendering of these objects ultimately may not appear correct.
Note For more detailed information on alpha channel support in IDL Object Graphics, see Controlling Object Transparency. |
IDL Online Help (March 01, 2006)