CompositeViewer support: Difference between revisions

Jump to navigation Jump to search
m
more de-quoting
No edit summary
m (more de-quoting)
Line 33: Line 33:


The default OSG model is that slave cameras are different views offset from a common viewpoint. This is easy to understand when considering  a camera's view matrix, but not necessarily  intuitive when thinking about the projection matrix. Because FG has its own view system we mostly treat the slaves as independent. It seems that most other uses of cameras during rendering -- for example, render to texture cameras for effects -- are best handled by slave cameras with independent views as well.<ref>https://sourceforge.net/p/flightgear/mailman/message/36295606/</ref>
The default OSG model is that slave cameras are different views offset from a common viewpoint. This is easy to understand when considering  a camera's view matrix, but not necessarily  intuitive when thinking about the projection matrix. Because FG has its own view system we mostly treat the slaves as independent. It seems that most other uses of cameras during rendering -- for example, render to texture cameras for effects -- are best handled by slave cameras with independent views as well.<ref>https://sourceforge.net/p/flightgear/mailman/message/36295606/</ref>
People requiring multiple independent views on the same scenery, e.g. cockpit and tower view [...] these each need their own camera groups and so require OSG's CompositeViewer.<ref>https://sourceforge.net/p/flightgear/mailman/message/37059117/</ref>
And that's not really supported by the current architecture, neither by the tile cache nor by osgViewer::Viewer. We would need to move to a CompositeViewer model, which supports several scene graphs, and rely completely on the osg database paging machinery.<ref>http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg28869.html</ref>
That would require a change in current fg architecture to use a CompositeViewer instead of a single Viewer, but we're contemplating that anyway.<ref>http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17263.html</ref>


The cameras in a camera group don't need to render directly to the screen. They can render to a texture which can be used either in the scene, like in a video screen in the instrument panel, or for distortion correction in a projected or dome environment. <ref>http://sourceforge.net/p/flightgear/mailman/message/19718339/</ref>
The cameras in a camera group don't need to render directly to the screen. They can render to a texture which can be used either in the scene, like in a video screen in the instrument panel, or for distortion correction in a projected or dome environment. <ref>http://sourceforge.net/p/flightgear/mailman/message/19718339/</ref>
Line 39: Line 46:


Neither of these are supported at the present time, but it would be a good project. We would have to start using a different OSG class, CompositeViewer, to support multiple views from independent view points. Our terrain pager would need a complete overhaul to use the [[PagedLOD]] scheme of OSG, and the Flightgear view manager would need to be aware multiple active views.<ref>=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg27134.html</ref>
Neither of these are supported at the present time, but it would be a good project. We would have to start using a different OSG class, CompositeViewer, to support multiple views from independent view points. Our terrain pager would need a complete overhaul to use the [[PagedLOD]] scheme of OSG, and the Flightgear view manager would need to be aware multiple active views.<ref>=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg27134.html</ref>
People requiring multiple independent views on the same scenery, e.g. cockpit and tower view [...] these each need their own camera groups and so require OSG's CompositeViewer.<ref>https://sourceforge.net/p/flightgear/mailman/message/37059117/</ref>


== Status ==
== Status ==
Line 138: Line 143:
== Background ==
== Background ==
{{See also|Canvas Popout Windows}}
{{See also|Canvas Popout Windows}}
{{cquote|That would require a change in current fg architecture to use a CompositeViewer instead of a single Viewer, but we're contemplating that anyway.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17263.html|title=<nowiki>Re: [Flightgear-devel] Cockpit displays (rendering, modelling)</nowiki>|author=Tim Moore|date=Mon, 04 Aug 2008 02:43:52 -0700}}</ref>|Tim Moore}}
{{cquote|The cameras in a camera group don't need to render directly to the screen. They can render to a texture which can be used either in the
scene, like in a video screen in the instrument panel, or for distortion correction in a projected or dome environment.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17001.html|title=<nowiki>[Flightgear-devel] RFC: changes to views and cameras</nowiki>|author=Tim Moore|date=Thu, 26 Jun 2008 03:53:05 -0700}}</ref>|Tim Moore}}
{{cquote|Open Scene Graph supports a CompositeViewer object that supports rendering from several widely separated viewpoints, complete with
support for multiple terrain pager threads. We could move to CompositeViewer and support simultaneous views from e.g., the tower, AI
models, drones, etc.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17001.html|title=<nowiki>[Flightgear-devel] RFC: changes to views and cameras</nowiki>|author=Tim Moore|date=Thu, 26 Jun 2008 03:53:05 -0700}}</ref>|Tim Moore}}


{{cquote|Good thing to have!!! Just still support graphics context on different screens/displays too ...<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17016.html|title=<nowiki>Re: [Flightgear-devel] RFC: changes to views and cameras</nowiki>|author=Mathias Fröhlich|date=Sat, 28 Jun 2008 00:05:19 -0700}}</ref>|Mathias Fröhlich}}
{{cquote|Good thing to have!!! Just still support graphics context on different screens/displays too ...<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg17016.html|title=<nowiki>Re: [Flightgear-devel] RFC: changes to views and cameras</nowiki>|author=Mathias Fröhlich|date=Sat, 28 Jun 2008 00:05:19 -0700}}</ref>|Mathias Fröhlich}}
{{cquote|Yes, and that's not really supported by the current architecture, neither by the tile cache nor by osgViewer::Viewer. We would need to move to a
CompositeViewer model, which supports several scene graphs, and rely completely on the osg database paging machinery.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg28869.html|title=<nowiki>Re: [Flightgear-devel] Disappearing scenery</nowiki>|author=Tim Moore|date=Sun, 19 Sep 2010 11:39:32 -0700}}</ref>|Tim Moore}}


== Implementation ==
== Implementation ==

Navigation menu