Normally I'd do this with some kind of shader and a Uniform to control the transparency.
If you haven't seen it already, I'd take a look at this set of code we did for a client a few years ago: http://alphapixel.com/project/osg-transparency-toolkit/ It was made for large complex CAD scenes where z-sorting is not always an option. It has a couple of non-sorted transparency approximations with various side-effects, plus an Order Independent Transparency implementation you can easily slap into a scene. I'm not totally sure what you mean by transparency "channel". Channel usually refers to an image-based transparency/alpha channel, which isn't usually necessary in order to make a whole subgraph transparent. You'd just need to set some blend state and such on a parent node and then remove it when you didn't want it. Maybe explain more clearly what you think you need and what difficulty you are imagining it will have? On Fri, Feb 15, 2019 at 5:41 PM Claudio Benghi <claudio.ben...@gmail.com> wrote: > Hi, > > Is there a way to override the transparency channel of a sub tree in the > scene? > > My application shows buildings and their components and I want to give the > user a sort of x-ray vision in some circumstances to help locate items > behind walls. > > I know that ideally this would require to z-sort all the elements in the > view, but I'm not much concerned with the correct sorting at the moment. > > These models are sometimes *very* large, so something that uses an > override value that I can then cheaply remove would be ideal. > > Any ideas? > > Thanks, > Claudio > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=75632#75632 > > > > > > _______________________________________________ > 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