View Transparency

In this topic: Hide

 

View Transparency refers to the opacity of the image within a view annot. To alter the degree of transparency, slide the bar between Solid and Invisible. Moving the slider bar towards Invisible will make any markers on the opposite sides and interior of the view visible. The Transparency slider must be combined with one of the options from the dropdown menu. Some settings will provide faster rendering, while others give you better quality (the highest quality type is Sorted Layers Blend).

3D Image File Transparency

If you are using a 3D image file that has transparency settings defined in the image file, then the predefined transparency settings will be imported along with the image into CM4D.

Coin3D Transparency Definitions

The following definitions have been acquired from the Coin3D website, a Systems in Motion AS© product:

None

Turns off transparency for objects, even if transparency is set using an SoMaterial node.

Add

Transparent objects are rendered using additive alpha blending. Additive blending is probably mostly used to create special transparency effects. The new pixel color is calculated as the current pixel color plus the source pixel color multiplied with the source pixel alpha value.

Blend

Transparent objects are rendered using multiplicative alpha blending. Multiplicative alpha blending is the blending type that is most often used to render transparent objects. The new pixel value is calculated as the old pixel color multiplied with one minus the source alpha value, plus the source pixel color multiplied with the source alpha value. We recommend that you use this transparency mode if you have only one transparent object in your scene, and you know that it will be rendered after the opaque objects.

Delayed Add

Transparent objects are rendered using additive alpha blending, in a second rendering pass with depth buffer updates disabled.

Delayed Blend

Transparent objects are rendered using multiplicative alpha blending, in a second rendering pass with depth buffer updates disabled. Use this transparency type when you have one transparent object, or several transparent object that you know will never overlap (when projected to screen). Since the transparent objects are rendered after opaque ones, you'll not have to worry about putting the transparent objects at the end of your scene graph. It will not be as fast as the BLEND transparency type, of course, since the scene graph is traversed twice.

Screen Door

Transparent triangles are rendered with a dither pattern. This is a fast (on most GFX cards) but not-so-high-quality transparency mode. One particular feature of this mode is that you are guaranteed that it always renders the transparent parts of the scene correct with regard to internal depth ordering of objects / polygons, something which is not the case for any other transparency mode. Polygons rendered with only transparent textures are not shown as being transparent when using this mode. The reason being that the SCREEN_DOOR mode is working on polygons, not pixels. To render polygons with dither pattern, a material node has to be inserted into the scenegraph with it's transparency field set.

Sorted Layers Blend

By using this transparency type, the SoGLRenderAction will render normal and intersecting transparent objects correctly independent of rendering order. It is the only transparency type rendering mode which is guaranteed to do so. This mode is different from all other modes in that it overrides the SoTransparencyType nodes in the scenegraph; all objects are drawn using SORTED_LAYERS_BLEND. There are currently two separate code paths for this mode. Both paths are heavily based on OpenGL extensions. The first method is based on extensions which are only available on NVIDIA chipsets (GeForce3 and above, except GeForce4 MX). These extensions are GL_NV_texture_shader, GL_NV_texture_rectangle or GL_EXT_texture_rectangle, GL_NV_register_combiners, GL_ARB_shadow and GL_ARB_depth_texture. Please note that this transparency type occupy all four texture units on the NVIDIA card for all the rendering passes, except the first. Textured surfaces will therefore only be textured if they are not occluded by another transparent surface.

Sorted Object Add

Transparent objects are rendered using additive alpha blending. Opaque objects are rendered first, and transparent objects are rendered back to front with z-buffer updates disabled.

Sorted Object Blend

Transparent objects are rendered using multiplicative alpha blending, Opaque objects are rendered first, and transparent objects are rendered back to front with z-buffer updates disabled. Use this transparency mode when you have several transparent object that you know might overlap (when projected to screen). This method will require 1 + num_transparent_objects rendering passes. Path traversal is used when rendering transparent objects, of course, but it might still be slow if you have lots of state changes before your transparent object. When using this mode, we recommend placing the transparent objects as early as possible in the scene graph to minimize traversal overhead.

Sorted Object Sorted Triangle Add

Transparent objects are rendered back to front, and triangles in each object are sorted back to front before rendering.

Sorted Object Sorted Triangle Blend

Transparent objects are rendered back to front, and triangles in each object are sorted back to front before rendering. Use this transparency type when you have one (or more) transparent object(s) where you know triangles might overlap inside the object. This transparency type might be very slow if you have an object with lots of triangles, since all triangles have to be sorted before rendering, and an unoptimized rendering loop is used when rendering. Lines and points are not sorted before rendering. They are rendered as in the normal SORTED_OBJECT_BLEND transparency type. Please note that this transparency mode does not guarantee "correct" transparency rendering. It is almost impossible to find an algorithm that will sort triangles correctly in all cases, and intersecting triangles are not handled. Also, since each object is handled separately, two intersecting object will lead to incorrect transparency.

  • The detection of whether or not the SORTED_LAYERS_BLEND mode can be used will be done automatically by the Coin internals. If one or more of the necessary conditions listed above are unavailable, SoGLRenderAction::SORTED_OBJECT_BLEND will be used as the transparency type instead.

Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.

http://doc.coin3d.org/Coin/classSoGLRenderAction.html