Check the osgdistortion example and don't add the screen camera (the second camera) to the scene. That's more or less what you are looking for.
If not, can you describe what did you do and what didn't work? ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of nicolas pe?a Sent: Monday, February 18, 2008 2:08 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Different frame ratio for different cameras? Thanks for your answer, and sorry for my monolithic post. I will try to make them more readable. Now that I see that in order to control the frame rates I need to use an independent viewer for each simulated camera; - How can a set it to just render to a image and not display in the screen at all? I have tried to attach an image to the viewer's camera and set its render implementation to FRAME_BUFFER_OBJECT but obviously I am missing something as it didn't work. Thanks a lot, Nicolas. 2008/2/18, Robert Osfield <[EMAIL PROTECTED]>: Hi Nicolas, For future posts could you break you posts into several paragraphs so the various questions and points are easier to spot and follow, this will make it easier to read and answer without getting misunderstandings. I think the question are asking is how to do a viewer with different views running at different frame rates. CompositeViewer doesn't support this, all the Views are synchronized to have the same FrameStamp. This is done for practicability as relaxing things so that all views could have different frame rates would really complicate the code internally as well as the public interface. There are also issues like the fact that all cameras on a graphics window have to be update all at the same time thanks to the way that double buffering works, this put constraints on the views that share a single window needing to update at the same time, keeping the CompositeViewer so it only has one frame stamp, and one frame loop fits this constraint automatically as well as keeping the internals and API clean. If you want two views with separate windows running at a different frame rate with their own frame loops then you'll need use two separate viewers. Robert. On Feb 18, 2008 10:00 AM, nicolas peña <[EMAIL PROTECTED]> wrote: > Hello, I work in a Spanish research group that mainly works on mobile > robotics and I am going to use OSG 2.2 to build an application (simulator of > multi-robot collaborative perception) that has a main view that the user > interact with, and a dynamic number of secondary views (one camera each) > that render to a file, usually much lower frame rate that the main view, to > simulate virtual cameras whose images are the used to feed the algorithms > of collaborative perception. I am quite new to OSG, and after learning a > bit I think that may at way to achieve this is using a composite viewer with > a view as the main one and adding others with their respective camera set to > render to a off screen pixel buffer, images attached to these cameras and > post draw callbacks that send a copy of these images where they are needed. > Many questions have arisen, to start with is the approach of using a > composite viewer wrong?, how can I achieve different frame rates with the > different views?. I had the idea of modifying the "renderingTraversals()" > method of the viewer base class in order to accept as a parameter a > std::vector<int> that contained the indexes of the desired cameras to render > in the internal vector that holds all the cameras, but with the threading > model that its in use (really nice actually) this is just not that simple. > Can any one help me with ideas on how to achieve my goal? Thanks a lot in > advance!. > > Nicolas, > > _______________________________________________ > 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
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org