It sounds like what you are trying to do is similar to the 20MaterialSort
tutorial of 1.8.  You may want to use the SortKey field of Materials.  Set
the sort key of your internal geometries material to -1, and the sort key of
your outside geometries material to 0.

On Mon, May 17, 2010 at 12:59 PM, Michael Raab <michael-r...@gmx.de> wrote:

> Hi Carsten,
>
> we tried to remove the depth chunk but nothing changes. More suggestions?
>
> Thx,
> Michael
>
> Am 17.05.2010 16:32, schrieb Carsten Neumann:
> >       Hello Michael,
> >
> > Michael Raab wrote:
> >
> >> we're trying to render 2 boxes that have both a certain transparency
> factor assigned . The smaller box is fully enclosed by the larger one.
> Depending on the viewing position sorting errors occur, occluding parts of
> the smaller box.
> >>
> > yes, that is expected. OpenSG does sort transparent geometry from back
> > to front for correct blending, but it does not sort at the primitive
> > (triangle) level.
> >
> >
> >> We're using a ChunkMaterial including a MaterialChunk, a DepthChunk and
> a BlendChunk.
> >>
> >> DepthFuction: GL_LEQUAL
> >>
> > this is the default.
> >
> >
> >> BlendFunction: GL_GEQUAL src: GL_SRC_ALPHA dest: GL_ONE_MINUS_SRC_ALPHA
> >>
> >> According to some older mailing list messages we tried to put each
> triangle of the box into a separate geometry node, that brought no
> improvement.
> >>
> >> Ideas?
> >>
> > by placing every face of the boxes in a separate geometry the object
> > level sorting should get this right. One thing that could happen is that
> > by using an explicit DepthChunk you enable depth writes for transparent
> > objects (OpenSG normally makes the depth buffer read only while
> > rendering transparent objects). Can you try removing the depth chunk or
> > setting _sfReadOnly on it to true (dc->setReadOnly(true);).
> >
> >       Cheers,
> >               Carsten
> >
> >
> ------------------------------------------------------------------------------
> >
> > _______________________________________________
> > Opensg-users mailing list
> > Opensg-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/opensg-users
> >
> >
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------

_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to