Resent sans HTML, which I have now turned off - with any luck, for good.

I have encountered two strange behaviors with alpha blending.

The context: I am rendering a set of markers and paths atop a map. The
markers are textured quads attached to AutoTransforms which keep them
aligned with the screen and at a constant size, surrounded by translucent
spheres ( 1, 0, 0, 0.25 ).  The paths are drawn with GL points and lines,
surrounded by translucent cylinders ( 0, 0, 1, 0.25 ).  The map is a large
textured quad.  The root level stateset has the BlendFunc( SRC_ALPHA,
ONE_MINUS_SRC_ALPHA ), the BlendEquation( FUNC_ADD ), and texture unit 0
(the only one in use) has TexEnv( REPLACE ).

The first strange behavior is that if I set the root-level stateset's
rendering hint to TRANSPARENT_BIN, the translucent geometry becomes
suddenly opaque as its nominal location moves such that its viewing volume
z-coordinate lies behind that of the map.  At various locations the
translucent geometry also occludes the GL points and lines without becoming
opaque with respect to the map.  If the rendering hint is set to
OPAQUE_BIN, this does not happen and the scene renders with correct
blending.  Is this expected?

The second strange behavior is that the textured quad markers are
completely occluded by the transparent geometry, which is instead rendered
with a blend of the geometry's color and that of the map lying behind the
marker.  The marker texture image is in .bmp format and has no alpha
channel, but the quad it is attached to has color ( 1, 1, 1, 1 ), and the
OpenGL documentation indicates that when GL_REPLACE is in effect the
geometry alpha is used where the texture does not supply an alpha value.  I
can't tell if this behavior is caused by odd texture behavior, or by some
strange interaction of the AutoTransform with blending, or by something
else entirely.  I would greatly appreciate any suggestions.
- Ian Zeilstra




This is an e-mail from General Dynamics Land Systems. It is for the intended 
recipient only and may contain confidential and privileged information.  No one 
else may read, print, store, copy, forward or act in reliance on it or its 
attachments.  If you are not the intended recipient, please return this message 
to the sender and delete the message and any attachments from your computer. 
Your cooperation is appreciated.

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to