[osg-users] Viewing Stacked Semi-Transparent Geodes
Erik Hensens
ehensens at hunter.com
Thu Feb 4 09:01:38 PST 2016
Thank you very much for your response. I actually was calling setRenderingHint(StateSet::TRANSPARENT_BIN), but I commented that line out and it actually started working properly. Thanks for the direction!
Voerman, L. wrote:
> 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 < ()> 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 (http://forum.openscenegraph.org/viewtopic.php?p=66186#66186)
> >
> >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> >
> >
>
>
> ------------------
> Post generated by Mail2Forum
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66202#66202
More information about the osg-users
mailing list