Hi Akos, hi Gerrit,

On Mon, 2003-10-27 at 20:10, Gerrit Voss wrote:
> > 
> > I did the same and it still doesn't work... :( (See attachment, the tree
> > seems not to use the zbuffer at all)
> > 
> > I use OpenSG CVS from 2nd September.
> > 
> > Might this be a driver issue? I'm using the NVidia driver 44.96 on Linux,
> > RH8 with a GF4 at the moment.
> 
> ah ok sorry I got you wrong, the result you see is correct for this 
> kind of blending as we do not do polygon based Z sorting. What you need
> is either this or better alpha keying. I have a look how you can get
> this ;-)

actually it looks like the two polygons are intersecting. Those won't
work either with correct sorting.

By default we don't write the Z-Buffer for transparent polygons. That's
a little fallback for cases where the sorting doesn't work right, to at
least show the transparent objects in the wrong order. 

In general intersecting transparent polygons are pretty hard in OpenGL.
You have to split them across the intersection line and draw them
separately. But your polygons are not really transparent, you're just
using an alpha key, which does work with intersecting polygons.

So here's what you can do: call renderact->setZWriteTrans(true); on your
RenderAction to make the transparent polygons change the Z-Buffer or
change the BlendChunk to use an alpha key (setAlphaFunc(GL_NOTEQUAL);
setAlphaValue(0);). 

Alternatively you can use four non-intersecting polygons instead of the
two, but for correct sorting you would still have to put them in
separate objects, which I really don't recommend.

Hope it helps

        Dirk




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to