[osg-users] Draw two translucent geometries in specific order

Chris Hanson xenon at alphapixel.com
Sun May 20 08:14:05 PDT 2018


You might also look at OSGTransparencyToolkit.
http://alphapixel.com/project/osg-transparency-toolkit/

There are several Order Independent Transparency implementation out there
that let you not worry about the object draw order.

On Fri, May 18, 2018 at 10:04 AM, Kristofer Krus <kristofer.krus at liu.se>
wrote:

> Hi,
>
> Thanks for the reply Robert! I think the concept of render bin sounds
> logical, but I'm slightly confused about how RenderBins work in OSG
> (OpenSceneGraph). I’ve tried to find information about what RenderBins are
> and how to use them, but what I’ve been able to find so far has been
> limited, so I still have some questions about them:
>
> 1. Why does a bin have both a number and a name? Wouldn’t just one of
> those be enough as an identifier?
>
> 2. The article http://www.bricoworks.com/articles/stategraph/
> stategraph.html seems to imply that there are two default RenderBins: One
> with number 0 in which OSG puts all opaque objects and one with number 10
> in which it puts all translucent objects. Is that how it works?
>
> 3. What are the names of those bins? (Or is that unimportant?)
>
> 4. How does OSG determine whether an object is translucent in order to put
> it into the correct bin? Does it look at all the colors and textures that
> are associated with the object and check whether at least some polygon or
> some pixel is translucent?
>
> 5. Will OSG’s choice of RenderBin to put each object in, based on
> translucency, be overridden if I use setRenderBinDetails (
> http://public.vrac.iastate.edu/vancegroup/docs/
> OpenSceneGraphReferenceDocs-3.0/a00762.html#a498095c3811e00b2fc6123a24ef5e
> c81)? I see that this method also takes an optional mode (
> http://public.vrac.iastate.edu/vancegroup/docs/
> OpenSceneGraphReferenceDocs-3.0/a00762.html#a43d4fd1ed6001ab862e89e7c4e877
> ff1). Does this variable have something to do with that? What does it do?
>
> 6. When I call setRenderBinDetails, if I specify a bin number that doesn’t
> exist, will this create a new bin?
>
> 7. If a bin with than number already exists, will the function call change
> the name and mode of that bin?
>
> 8. In your reply, you used the numbers 5 and 6. Was there some reason you
> did so, or was the choice of numbers arbitrary?
>
> Finally, is there some other source, except from
> http://www.bricoworks.com/articles/stateset/stateset.html and
> http://www.bricoworks.com/articles/stategraph/stategraph.html (and the
> OpenSceneGraph source code) that you can recommend that explains how render
> bin works in OpenSceneGraph in greater detail?
>
> Cheers,
> Kristofer
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=73673#73673
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180520/b622ef34/attachment.html>


More information about the osg-users mailing list