[osg-users] Viewing Stacked Semi-Transparent Geodes

Voerman, L. l.voerman at rug.nl
Thu Feb 4 00:31:15 PST 2016


Hi Erik,
the effect you see is caused by your blend function being order dependent,
for a good result transparent triangles need to be drawn back to front.
Did you set the rendering_hint to TRANSPARENT_BIN (binNumber 10 / binName
DepthSortedBin)?
like in stateSet->setRenderingHint(StateSet::TRANSPARENT_BIN);
Regards, Laurens.

On Wed, Feb 3, 2016 at 9:48 PM, Erik Hensens <ehensens at hunter.com> wrote:

> Hi everybody!
>
> I have two geodes, each is a flat circular disk with some circular holes
> removed. Each geode is flat in the YZ plane, and they are stacked against
> each other with a small amount of spacing, centered at (x1, 0, 0) and (x2,
> 0, 0). There is a single parent matrix transform node that is the parent of
> both of these geodes, and I use the matrix transform to set different
> rotations. Each of these disk geodes is semi-transparent by means of
> calling setAlpha on their materials for the FRONT_AND_BACK faces.
>
> The problem is that at certain parent matrix transform rotations certain
> parts of the first disk are more visually prevalent and at other rotations
> certain parts of the second disk are more visually prevalent, i.e. how
> these two semi-transparent geodes are viewed against each other changes
> based on the rotation of the parent matrix transform. I've attached two
> images to show you the difference.
>
> What is causing this effect and how can I eliminate it? I want it to look
> the same no matter what the rotation of the parent matrix transform is.
>
> Thanks in advance for any help!
>
> Cheers,
> Erik
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=66186#66186
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160204/f717247d/attachment-0003.htm>


More information about the osg-users mailing list