Hackathon Proposal: CompositeViewer and Canvas: Difference between revisions

Jump to navigation Jump to search
Some refactoring
mNo edit summary
(Some refactoring)
Line 4: Line 4:
|sponsor=[[User|Cgdae]]
|sponsor=[[User|Cgdae]]
|supporters=
|supporters=
|status=several years ago, people on the forum came up with a working proof-of-concept patches implementing experimental support, predating Compositor/CompositeViewer support: [[Canvas_View_Camera_Element#Proof_of_Concept]]
|status=
|summary = make it possible to render arbitrary scene views to a canvas, so that the canvas can be reused to implement modern avionics (exterior views, synthetic terrain, shuttle RMS arm/END EFF mode <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&p=282898&#p282898</ref> <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&hilit=&start=2160#p326104</ref> etc) <ref>https://sourceforge.net/p/flightgear/mailman/message/37147262/</ref> <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&hilit=&start=2160#p326182</ref>
|summary=[[CompositeViewer_Support]] already allows us to create multiple top-level windows showing different views of the same scenery.
This feature would also make it possible to configure views, and windows, in-sim - i.e. while providing "live" preview.
 
We want to extend CompositeViewer to render different views of the scenery to [[Canvas_Sandbox#CanvasCamera|Canvas elements]].
 
Then by displaying these canvas elements in a cockpit we will be able to implement things like:
 
* Modern avionics:
** Exterior views (tail cam, gear cam etc).
** Synthetic terrain.
* Rear-view mirrors.
* Shuttle RMS arm/END EFF mode <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&p=282898&#p282898</ref> <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&hilit=&start=2160#p326104</ref> etc) <ref>https://sourceforge.net/p/flightgear/mailman/message/37147262/</ref> <ref>https://forum.flightgear.org/viewtopic.php?f=87&t=25747&hilit=&start=2160#p326182</ref>
 
|background=
|background=
[[CompositeViewer_Support|CompositeViewer]] allows us to create multiple windows showing different views of the same scenery.
[[CompositeViewer_Support]].


We should be able to extend CompositeViewer to render these different views of the scenery to [[Canvas_Sandbox#CanvasCamera|Canvas elements]] instead of top-level OSG windows. Then if these canvas elements are displayed in a cockpit we will get things like tail cams, gear view and rear view mirrors. Which is a long standing feature request: [[Howto:Use a Camera View in an Instrument]].
Information about Canvas from Hooray


The original set of patches (touching SimGear and fgdata) implements a new Canvas::Element by creating a sub-class named Canvas::View. The meat of it is in the constructor, i.e. Canvas::View::View(), where an off-screen camera (RTT/FBO) is set up, the FGCanvasSystemAdapter file has been extended to provide access to the FlightGear view manager to compute/obtain the view-specific view matrix, which is then used by this new canvas view element to update the offscreen camera in Canvas::View::update() accordingly.
The original set of patches (touching SimGear and fgdata) implements a new Canvas::Element by creating a sub-class named Canvas::View. The meat of it is in the constructor, i.e. Canvas::View::View(), where an off-screen camera (RTT/FBO) is set up, the FGCanvasSystemAdapter file has been extended to provide access to the FlightGear view manager to compute/obtain the view-specific view matrix, which is then used by this new canvas view element to update the offscreen camera in Canvas::View::update() accordingly.
Line 24: Line 34:
* https://forum.flightgear.org/viewtopic.php?f=71&t=27985&p=264172&#p264175
* https://forum.flightgear.org/viewtopic.php?f=71&t=27985&p=264172&#p264175


|skills=C++, [[OpenSceneGraph]] 3.6
|skills=C++
|opportunities= <p/>
|opportunities= <p/>
* OpenSceneGraph
* Canvas
* Canvas
* CompositeViewer
* CompositeViewer
219

edits

Navigation menu