Re: [osg-users] Flicker in osgviewer, multiple channels
Hi guys, thanks for the quick replies. My code is ported from SGI Performer and for some reason the predraw switching technique used to work in there. I've tested nodemasks now and they work fine, but I suppose I could use switches in each of the slave cameras as well if I want the flexibility to show/hide things on the fly. cheers, /Per 2009/2/26 Jean-Sébastien Guay > Hi Daniel, > > This might be too simple a solution, but have you tried assigning nodemasks >> to the objects in question along with the appropriate nodemask for the >> various cameras? The "osgstereoimage" example shows how this works. >> > > That would work too, but you run out of bits in the nodemask pretty quickly > if you start using the node mask for such simple things. I find adding the > objects as children of only the required cameras works well. > > > J-S > -- > __ > Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ >http://whitestar02.webhop.org/ > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Flicker in osgviewer, multiple channels
Hi Daniel, This might be too simple a solution, but have you tried assigning nodemasks to the objects in question along with the appropriate nodemask for the various cameras? The "osgstereoimage" example shows how this works. That would work too, but you run out of bits in the nodemask pretty quickly if you start using the node mask for such simple things. I find adding the objects as children of only the required cameras works well. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Flicker in osgviewer, multiple channels
Hi Per, This might be too simple a solution, but have you tried assigning nodemasks to the objects in question along with the appropriate nodemask for the various cameras? The "osgstereoimage" example shows how this works. Hope this helps, -- Dan > -Original Message- > From: Jean-Sébastien Guay [mailto:jean-sebastien.g...@cm-labs.com] > Sent: Thursday, February 26, 2009 7:13 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] Flicker in osgviewer, multiple channels > > Hello Per, > > > Now I am trying to hide an object (using a osg::Switch) in > one channel > > and show it in the others. > > What I normally do to get this effect is add the object directly as a > child of the camera(s) where you want to see the object, but not as > child of the others. > > This doesn't solve your problem, but gives you another way of getting > the effect you want. I think you were on a bad track trying > to change an > osg::Switch in a camera's pre-draw callback. > > Hope this helps, > > J-S > -- > __ > Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Flicker in osgviewer, multiple channels
Hello Per, Now I am trying to hide an object (using a osg::Switch) in one channel and show it in the others. What I normally do to get this effect is add the object directly as a child of the camera(s) where you want to see the object, but not as child of the others. This doesn't solve your problem, but gives you another way of getting the effect you want. I think you were on a bad track trying to change an osg::Switch in a camera's pre-draw callback. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Flicker in osgviewer, multiple channels
Hello all, Kind of a newbie question I'm afraid. I hope somebody can push me into the right direction. I am using osgViewer with several attached camera slaves to render multiple overlapping views of the same scenegraph. Now I am trying to hide an object (using a osg::Switch) in one channel and show it in the others. I am doing the switching in each of the cameras predraw function. While this works in a singlethreaded setup (at a huge performance loss), it creates chaotic flickering in any multithreaded dito probably since I am globally altering the scenegraph from one thread. So, am I pushing the limits of osgViewer, do I need to switch to compositeviewer to achive this or is there some other way? (I am using Fedora, OSG 2.8) Thanks in advance, Per Nordqvist ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org