Canvas news: Difference between revisions

Jump to navigation Jump to search
6,501 bytes added ,  26 August 2017
m (fix/broaden scope)
Line 8: Line 8:


== 2017 ==
== 2017 ==
=== Canvas & Slave Cameras ===
Former FlightGear core developer F-JJTH shared a patch implementing a proof-of-concept to render an arbitrary slave view to a FBO/RTT using a new dedicated "camera-display" instrument. This would be the kind of feature to implement many interesting features that cannot currently be added easily; Rear view mirrors in fighters could become a reality, as well as camera displays in SAR helicopters, outside views in airliners, backing view displays in cars etc.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317462#p317462
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Johan G </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
The patch seems not to break anything else, and does nothing unless the aircraft side code is added. It is therefore reasonably safe to add the patch to your working copy of FG. No git branch expertise is required.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317493#p317493
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Alant </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
it's using the standard view-manager interface, so you primarily need to set the view-number property to change the view (untested, feedback is just based on looking at the patch in question).
Specifically, when running the patched fgfs binary, look for: '''/instrumentation/camera-display''' and the '''view-number''' property underneath<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317488#p317488
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
The current state is... well, it "works" ;-)
However there are some bugs:
* The image jumps all over the place when the aircraft is moving.
* The colours are wrong.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317475#p317475
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Alant </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
# The colours are wrong with Rembrandt. It looks as if the wrong buffer is being used.
# Jumping around is the same with and without Rembrandt.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317486#p317486
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Alant </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
The jumping around effect seems to be in all views. The control tower view jumps back and forward, showing the whole tower at times.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317489#p317489
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Alant </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
if anybody is interested in working out what is missing or what can be improved, we should review working features doing similar things, e.g. the screenshot/streaming  handlers or the camera setup routines used by CameraGroup.cxx itself.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317477#p317477
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
before looking at some of our most advanced use-cases, it's best to tinker with a really simple scenario, to see how well this works, and what needs to be polished.<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317487#p317487
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
The patch itself seems overlapping with Zan's original "new-cameras" effort, as mentioned at: [[Canvas Development#Supporting Cameras]]
If this patch should work well enough, it would probably make sense to integrate it with the Canvas system to come up with a dedicated "camera" element for the Canvas system, that would be configurable using the format/properties used by the view manager: [[Howto:Configure views in FlightGear]]
At that point, it would actually be a terrific idea to review Zan's original patches and see if any of the features there could/should be integrated with the new Canvas::Camera element - like you say, once this is properly working, "the sky is the limit"  (or not even that, think shuttle cams)<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317466#p317466
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
Thus, the patch needs some TLC - however, it's definitely a very solid foundation, and very compelling as a prototype, especially given that the patch is pretty lightweight.
Much of the OSG machinery to set up the FBO/RTT (render to texture) is overlapping with Canvas functionality, so we could do away with that by using a dedicated Canvas element (which may fix some issues, e.g. colors being off).
Besides, if/when we actually use the approach used by Torsten's screenshot handler routines (mongoose/Phi), the "jumping" may also be gone (just a guess).
At this point, we need to get more people involved who are able to patch/rebuild sg/fg from source and test these patches, so that we can come up with a team of folks to help with testing/developing. Hooray can certainly help with the Canvas side of this, which means that the FBO/RTT setup routines can be simplified, and he can help turn the whole thing into a dedicated Canvas "camera" element.
<ref>{{cite web
  |url    =  https://forum.flightgear.org/viewtopic.php?p=317490#p317490
  |title  =  <nowiki> Re: Gear view in cockpit computer </nowiki>
  |author =  <nowiki> Hooray </nowiki>
  |date  =  Aug 26th, 2017
  |added  =  Aug 26th, 2017
  |script_version = 0.40
  }}</ref>
=== G1000 & MapStructure improvements ===
=== G1000 & MapStructure improvements ===


Navigation menu