Board index FlightGear Development Canvas

"Half" the FG window?

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

"Half" the FG window?

Postby seabutler » Fri Jan 24, 2014 12:38 pm

Hello,

I wasn't sure what subsection to place this under, but I was wondering if it were possible to restrict the camera output to only one half of the running FG window? I'm hoping to do this so that I may have the map and route manager GUIs active in the other half, so that they aren't obscuring the camera view (and also have the entire HUD visible). So basically, half the window straight down the center - left half is just black, right half is the camera.

Although this would also be solved if there were an external FG dynamic navigational map program, that also displayed waypoints... (I don't think there is one, right?).

Additionally, I would love to hear that this question can be answered with Nasal, as I really can't afford to edit the source code and recompile (it's for a project, and I have no admin rights on the laboratory machines).

Thanks for your help.
seabutler
 
Posts: 18
Joined: Wed Dec 04, 2013 3:49 am

Re: "Half" the FG window?

Postby Hooray » Fri Jan 24, 2014 11:19 pm

seabutler wrote in Fri Jan 24, 2014 12:38 pm:Hello,

I wasn't sure what subsection to place this under, but I was wondering if it were possible to restrict the camera output to only one half of the running FG window?

nope, that isn't currently possible, even though there is support for multiple sub-windows per OS window.

I'm hoping to do this so that I may have the map and route manager GUIs active in the other half, so that they aren't obscuring the camera view (and also have the entire HUD visible). So basically, half the window straight down the center - left half is just black, right half is the camera.

that would seem like a useful feature, and it could be implemented by extending the existing window/view manager code, but it's not directly supported at the moment.

Although this would also be solved if there were an external FG dynamic navigational map program, that also displayed waypoints... (I don't think there is one, right?).

You could use a second FG instance for this, that reads the waypoints/route from the master instance and is using a canvas windows to show the route.
I don't think atlas can currently process waypoints directly.

Additionally, I would love to hear that this question can be answered with Nasal, as I really can't afford to edit the source code and recompile (it's for a project, and I have no admin rights on the laboratory machines).

I don't think you can realistically accomplish this with just Nasal, it would definitely require C++ changes and rebuilding FG from source. But the idea itself is pretty good and the feature would be useful for other purposes, so I would suggest to file a feature requests in the issue tracker.

For example, for quite a while, people have been discussing extending the canvas system to render scenery views as a special CanvasElement - the wiki should have more pointers on this, but basically this is all about wrapping the existing view manager code as a CanvasElement - and you could even support multiple osg Windows by wrapping the multi-window code via canvas placements.

There are other approaches possible of course, but that would be the most straightforward method, and most flexible in the long run. There's been talk about supporting multiple "native" windows via canvas on the devel list - so it definitely is a good idea, and people have requested being able to use scenery/camera views in textures for years - so it's really all about identifying common requirements here.

https://code.google.com/p/flightgear-bu ... %20request

(Funnily, a broken ATI setup minus the ATI viewport hack could provide what you're lookin for)
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: "Half" the FG window?

Postby Necolatis » Fri Jan 24, 2014 11:32 pm

Maybe a solution would be to be able to drag the menu panels outside the main window.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: "Half" the FG window?

Postby Hooray » Fri Jan 24, 2014 11:49 pm

Being able to create/address/support multiple osgviewer windows via canvas placements could be useful for a number of things, and has been previously discussed on the devel list: https://www.mail-archive.com/flightgear ... 37875.html
And we've had a number of people asking for custom scenery views rendered as texture, even predating the canvas, see: http://wiki.flightgear.org/Howto:Use_a_ ... Instrument
In the meantime, it would simply make sense to identify the canvas as the common foundation here, so that people could allocate new OSG windows for their canvas windows, but also render scenery/camera views inside any canvas. Last year we actually had someone working on the latter, but I haven't heard back from him in a while.

However, even long before the canvas, Zan was working on this, and his progress was really promising: viewtopic.php?f=6&t=13798
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: "Half" the FG window?

Postby hamzaalloush » Sat Jan 25, 2014 12:05 am

i am a noob here, but couldn't this happen with X11 if you are using Linux? just a thought dont know how true, but a different approach
hamzaalloush
 
Posts: 631
Joined: Sat Oct 26, 2013 10:31 am
OS: Windows 10

Re: "Half" the FG window?

Postby Philosopher » Sat Jan 25, 2014 1:47 am

How about just zooming in and adjusting the view slightly? Thus you would effectively see the same thing, though without many problems at all. That could be done with a small Nasal script, and it could even be made to work while changing views instead of only once at startup.
Philosopher
 
Posts: 1593
Joined: Sun Aug 12, 2012 7:29 pm

Re: "Half" the FG window?

Postby seabutler » Sun Jan 26, 2014 5:39 pm

Sorry for taking so long to reply, busy weekend. That's unfortunate to hear there isn't a direct way to approach this. Philosopher, I have currently been doing sort-of what you stated, I have zoomed out, and moved the camera slightly to the left and just covered the left side with the map and route manager. The only problem with this is that it covers the HUD, but that can be dealt with through the XML files I guess. Thanks for your replies!
seabutler
 
Posts: 18
Joined: Wed Dec 04, 2013 3:49 am

Re: "Half" the FG window?

Postby Hooray » Sun Jan 26, 2014 6:03 pm

I don't think that supporting the required features would be such a bad thing, it could be useful for a number of different purposes - and probably people familiar with the project and code are going to agree with this - quite some effort went into supporting "multiple osgviewer windows" per instance, but also into fgviewer support - your use-case sounds sensible to me, so I would make sure to file a feature request, people working on -or familiar with- related features will surely appreciate this kind of feedback.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: "Half" the FG window?

Postby Cpt Goosnen » Fri Feb 14, 2014 3:53 pm

Well actually it would be pretty simple:
Image
http://goosnens-hangar.forumieren.com/t ... version#11
shows a view where the target offset is more to the nose and some meters above center, so the aircraft is in the lower half (then juggling with the view offsets in the prop-browser, to get the viewpoint also higher) so i guess u could do that also by having it on the left or right side, just by setting the views in the xml... or as philosopher said maybe by Nasal... BUT

Why dont just slide the windows out of the view meanwhile they not in need ;~)
Last edited by Cpt Goosnen on Fri Feb 14, 2014 4:12 pm, edited 1 time in total.
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: "Half" the FG window?

Postby Hooray » Fri Feb 14, 2014 4:03 pm

you can use various workarounds, see the "ATC aircraft" for example: http://wiki.flightgear.org/ATC-aircraft
Image

But it would still be good to support such use-cases without having to use weird workarounds like these ...
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: "Half" the FG window?

Postby Cpt Goosnen » Fri Feb 14, 2014 4:23 pm

" use-cases without having to use weird workarounds like these"

"Why dont just slide the windows out of the view meanwhile they not in need ;~)"

meant: slide for example the map or AP completely out of the FG window, that u have just view pixels of the AP where u can go with the mouse to slide it back in view.... but maybe i just think to straight, why should we need another feature of something like that ? there cockpit maps, and stuff

dont get it^^
ok i got it...

is there a cockpitmap which shows waypoints????

i would more push somebody to implement the browser mpmap on an instrument (MFD) !!!!!


(edit: ah ok its for a project... sorry didnt saw this)
actually quite still naive
User avatar
Cpt Goosnen
 
Posts: 154
Joined: Mon May 13, 2013 6:08 am
Location: direct north of EDDF's rnwy18
Callsign: Arse
Version: 3.0
OS: atari

Re: "Half" the FG window?

Postby Hooray » Fri Feb 14, 2014 4:48 pm

why should we need another feature of something like that ?

For the same reasons why we have XML, the property tree and Nasal scripting: generalization rocks, because it's a technology-enabler, allowing people to come up with new features without having to use huge workarounds, and without nagging core developers to implement end-user features directly.

We have about half a dozen of feature requests related to better windowing support, but also related to rendering scenery/camera views to textures:

http://www.mail-archive.com/flightgear- ... 27114.html
http://wiki.flightgear.org/Howto:Use_a_ ... Instrument
http://wiki.flightgear.org/CompositeViewer_Support

Also, quite a few people in the project are interested in doing UAV projects where being able to process live video streams would be extremely useful - this is something of particular interest to academic and professional users.

And it would involve having a capability where canvas textures could be either streamed, or where input streams could be mapped to Canvas. Some of our most-senior rendering experts (such as Curt or Tim themselves) have previously expressed interest in supporting this eventually, see for example: http://www.mail-archive.com/flightgear- ... 15464.html

Also, work is going on to eventually phase out our existing GUI and use a new fully canvas-driven GUI, which would ideally also support multiple windows (unlike our existing solution) - see the comments on the devel list (TheTom, Zakalawe and Tim Moore): http://www.mail-archive.com/flightgear- ... 37875.html

The point being, yes: we can use workarounds - but these days, it would be better to identify the required building blocks to enable people to implement such features by combining existing features - and here, extending the Canvas system accordingly would be pretty straightforward.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Canvas

Who is online

Users browsing this forum: No registered users and 3 guests