Re: problem with blending

New Message Reply Date view Thread view Subject view Author view

Robert Grzeszczuk (rg@hoek.engr.sgi.com)
Tue, 11 May 1999 16:09:34 -0700 (PDT)


Ricardo,

What is the purpose of glBlendFunc(GL_SRC_ALPHA , GL_SRC_ALPHA)? In general
mixing volumes (semi-transparent geometry) with surfaces (semi-transparent
or
opaque) requires some visibility sorting. If a semi transparent plne
penetrates a volume, it is best to draw the part of the volume behind the
plane
(using OpenGL clipping plane), then the plane itself, to be followed by the
near part of the volume (using the other side of the same OpenGL clipping
plane). If lines are not anti-aliased they can be drawn first (otherwise,
they
also need to be sorted wrt to remaining semi-transparent geometry). All of
this would use the same blending function (glBlendFunc(GL_SRC_ALPHA ,
GL_ONE_MINUS_SRC_ALPHA)).

Having said that, you should still see an image of the volume modulated by
the
alpha of the plane that you're drawing. What happens if you do not draw the
plane? Is the volume still there? Is it possible that it is not being drawn
at all (e.g., due to Zbuffer test or some such thing)?

-rg

On May 10, 7:25pm, Riccardo Grassi - Gandolfo Luca wrote:
> Subject: problem with blending
> Hi!
>
> We're developing an application in which we have a picture composed by
> OpenGL and Volumizer. In OpenGL we have a plane and three lines and a
> Volumizer Volume , the plane cut the volume in two , so the lines and a
> part of the volume stay beyond the plane .
> The plane should be transparent but we can see through it only the
> lines but not the volume .
> The volume is drawn with
> glBlendFunc(GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA);
>
> The plane is drawn, after the volume, with
> glBlendFunc(GL_SRC_ALPHA , GL_SRC_ALPHA);
>
>
> Any info will help
>
> Grassi Riccardo
> Gandolfo Luca
> Vosilla Loris
>-- End of excerpt from Riccardo Grassi - Gandolfo Luca


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Nov 01 1999 - 13:42:01 PST