[osg-users] Slave camera configuration by config file

Robert Osfield robert.osfield at gmail.com
Fri Nov 27 01:20:38 PST 2009

Hi Paul,

It would be great to be able to detect the physical arrangement when
you have multiple displays, if there are API solutions then encoding
this into the WindowingSystemInterface and implementing this in the
GraphicsWindowWin32/X11 etc would be great.

Such autodetection won't get you all the way though, powerful
configuration file support where we could write out as well as read
the full configuration would be great.  I've done part of the work
towards this with the .view plugin, but it's only partly completed -
just another one of those tasks that I've been unable to get back to
due to the great tide of work that's come my way over the past couple
of years.

I would very much like to be able to get back and complete the job...
BTW, the .view format is a variation on the the standard .osg format,
you can even potentially put OSG scene graph objects into a .view file
- this gives one the possibility of encoding distortion correction
into the setup.


On Thu, Nov 26, 2009 at 6:38 PM, Paul Martz <pmartz at skew-matrix.com> wrote:
> Hi Robert -- How would I create a config file that would tell osgViewer to
> arrange four slave cameras in a 2x2 configuration?
> I have a system with four displays arranged as a 2x2 powerwall. If I simply
> bring up "osgviewer cow.osg", osgViewer seems to think that the four
> displays are arranged horizontally. That seems like a fine default
> assumption.
> So I set about looking at the cfg plugin and the example Configuration files
> in OSG-Data to see how I might set up a camera config file that would offset
> the slaves appropriately for a 2x2 powerwall. But I'm rather stumped as to
> how to go about this.
> I see in osgViewer source code that, when it loads a config file, it
> dynamic_casts the object as a Viewer. So my initial inclination was to write
> a small OSG program that properly configured the four slaves, and dump the
> viewer out to file as an object, then use that as the config file. But this
> doesn't work. :( Obviously, I've overlooked something in the code, because I
> thought this would be the way to do it.
> I tested some of the provided config files, for example:
>     OSG_CAMERA_FILE=Configuration/AllScreens.view osgviewer cow.osg
> From looking at the AllScreens.view file, my assumption was that this would
> give me the same horizontal alignment behavior that I got with no config
> file at all. But this command fails with a "failed to set up any windows"
> error message.
> Then it's off to the OSG-Users Google Group, where I searched for info on
> camera config files. There was very little information available.
> Thanks for any info.
> --
> Paul Martz
> Skew Matrix Software LLC
> _http://www.skew-matrix.com_ <http://www.skew-matrix.com/>
> +1 303 859 9466
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

More information about the osg-users mailing list