So, all OSG state (including Uniforms) are managed in a hierarchical
manner, with override rules. So, you can select a section of the graph and
designate all of it to have Uniforms defining transparency and all of the
scene below that Uniform state will have those Uniforms applied and be
transparent.

BUT, you can also apply a State and Uniform(s) to a subset of the graph
WITHIN that transparent graph to override the first set of uniforms and
make it non-transparent. This would achieve the effect you are looking for.


You could do this with either shader-based transparency or just with
simple blending mode states with OpenGL Fixed Function features.


On Mon, Feb 18, 2019 at 1:02 PM Claudio Benghi <claudio.ben...@gmail.com>
wrote:

> Thanks Chris,
> that's very helpful. I'll have a look at your code.
>
> I've uploaded a video that might give you an idea of what I'm aiming at.
>
> In the video, I have a similar functionality in a open source WPF viewer
> that I've produced.
> The slider on the bottom left of the UI makes all objects transparent to
> allow to see the location of the selected walls through the walls of a
> building.
>
> https://youtu.be/7n3K52c1GtU
>
> Any selected wall, instead, is kept opaque.
>
> I think an uniform could be the solution, but it would need a way to
> exclude some elements of the scene from its application.
>
> Any suggestion is welcome.
>
> All the best,
> Claudio
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75634#75634
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@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]
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to