Board index FlightGear Development Canvas

Canvas G1000

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.

Re: Canvas G1000

Postby Hooray » Sat Feb 03, 2018 3:51 pm

Regarding the use of CAD tools, keep in mind that in Canvas space, many things can be accomplished procedurally (via Code) that would take quite a bit of time if done manually using an image editor like Inkscape.

Thus, if in doubt, it would be best to discuss such issues here upfront - it's not that unlikely that we can come up with a Nasal/Canvas based solution. I believe Thorsten's shuttle work is using primarily procedurally-drawn vector graphics anyway.
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby www2 » Sat Feb 03, 2018 10:25 pm

@Michat
I use the Tiled clones option with a pixel offset and create a group for easy handling.
www2
 
Posts: 242
Joined: Thu Apr 16, 2009 1:58 pm

Re: Canvas G1000

Postby Michat » Sun Feb 04, 2018 8:47 pm

@Hooray Thanks. The last question is coming from the numerous MP groups, Can you throw out some light if this project is gonna be generic? Executed by FG menu, independent of the aircraft, in sim, Not only in those aircraft where we suppose also may be adopted by developer. Also want to know if Emesary is born to solve MP exchange properties for the most demanded questions I use to receive is Dual control and CDU.

@ww2 thanks was puzzled to me. Interesting cluster carrier spacer. Cool.


29.92 but lot of Gitubers
User avatar
Michat
 
Posts: 958
Joined: Mon Jan 25, 2010 6:24 pm
Location: Spain
Version: 191b
OS: GNewSense

Re: Canvas G1000

Postby Hooray » Sun Feb 04, 2018 9:28 pm

It's generic in the way that it's aircraft-agnostic, as is exemplified by being provided via the built-GUI (see the debug menu in-sim).
However, it can be trivially added "as is" to any aircraft at the mere cost of providing the corresponding 3D models (which I believe www2 offered to do a few days ago).
That being said, Stuart is prototyping the whole thing using the c172p as reference aircraft - which is to say that there are going to be certain c172p related assumption (think number of engines, availability of systems etc) - but that is not to say that this cannot be changed, Stuart is using a combination of Richard's MFD/Emesary frameworks, which means that there is a clear separation in place, so that aircraft developers can easily adapt the integration layer for their own aircraft to make the whole thing work there - even though some adjustments may still be needed/beneficial.

Regarding your other questions, Richard's recent postings relating to Emesary suggest that he is in the process of of refining the MP protocol to better support the Emesary use-case/integration, while also considering to provide a native C++/Nasal bridge (probably using TheTom's cppbind framework) - conceptually, this could obviously be considered the "groundwork" to solve long-standing challenges that are commonly perceived to belong into the HLA/RTI department (think dual-control and other multi-instance setups).

Speaking realistically however, features like dual-control and the hard-coded master/slave protocols are dating back years, and even decades ago (in the case of the master/slave protocol) - which means that might be more straightforward to start afresh using "just" Emesary instead of adapting existing features to make them work with Emesary, because existing features like AndersG's dual-control framework were basically created in response to hard-coded restrictions, i.e. to work around those - thus, their design/nature and underlying operating mode is likely to be affected by those design constraints, which are unlikely to be an issue when it comes to Emesary.

As things are standing right now, it seems that the FG1000 is very likely to become the "reference implementation" for anybody considering to implement modern MFD-style avionics in FlightGear in a generic fashion using the Nasal/Canvas systems and having an IPC mechanism in place that makes sure not to introduce "hard-coded" assumption about the underlying aircraft/systems etc.

Given that Stuart said that he is considering to extend svg.nas as needed (e.g. referring to the patch adding raster image support or external SVG files), that also means that non-coders (e.g. Inkscape/GIMP experts) can get involved much more easily without having to know anything about Nasal, Canvas or other coding stuff.

Concerning your comment on CDUs, my take on this is that the answer is basically pretty much in the same ballpark as the "dual-control" stuff - simplly because we don't currently have any well-developed CDU framework in place that is using a similarly sophisticated architecture as the FG1000 - which also applies to other existing "framework", including the original ND/PFD framework shown on various Boeing/Airbus aircraft.

It is my expectation that, over time, the FG1000 will be established as the "go-to" reference for people wanting to do similar stuff - including comparatively simple "single-page" MFDs like an PFD or ND - sooner or later, we will see more aircraft developers adopt the instruments, and probably reach out to Stuart to add more features - which will probably be the time to review how styling/theming and skinning is currently handled at the MFD layer, because if these concepts are well-encapsulated, other experienced aircraft developer teams could get involved in Stuart's FG1000 effort - e.g. folks like the extra5000/Avidyne Entegra R9 team which have been testing the limits of the Nasal/Canvas approach for 5+ years meanwhile, and whose expertise could become instrumental to turn the FG1000 into a generic framework to help simulate similar devices, including the R9 specifically - which would also benefit them, while also making some of their work available to other aircraft/aircraft developers, without them having to use any copy/paste.

Anyway, that's just my 2c obviously ... Stuart, Richard and others (especially the E500 folks) may obviously have a completely different take on the current situation and ramifications of the Fg1000 effort :D
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby www2 » Sun Feb 04, 2018 10:21 pm

@Hooray
I have send the 3d models for GDU-104X and GMA 1347, texture and the source .blend and gimp files files to stuart.
www2
 
Posts: 242
Joined: Thu Apr 16, 2009 1:58 pm

Re: Canvas G1000

Postby Hooray » Sun Feb 04, 2018 10:24 pm

Sounds great, thanks for the update !
This effort is really coming along nicely !! :D
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby Michat » Sun Feb 04, 2018 11:57 pm

Thank for the explanation, don't put it on debug menu cause is overflow :)

Good to see project coming alone.
User avatar
Michat
 
Posts: 958
Joined: Mon Jan 25, 2010 6:24 pm
Location: Spain
Version: 191b
OS: GNewSense

Re: Canvas G1000

Postby Hooray » Tue Feb 06, 2018 6:04 pm

Yes, I do agree about the debug menu ... besides, I also think that the current default resolution might be too much to handle for most people's systems - it definitely is too much for my laptop. I guess, I would show a down-sized version if the default resolution exceeds the size of the window. Alternatively, we could register a scrollwheel handler for the fascia/skin (or possibly a custom fgfs specific control) to change the size of the whole instrument - right now, it's barely usable due to its size, even though I do understand that Stuart is trying to keep it close to the original.

I guess we could also offer a Canvas based configuration dialog to make some of these things configurable using the userarchive attribute - e.g. stuff like showing tooltips etc, which might also distract power users already familiar with the device.
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby TheTom » Wed Feb 07, 2018 9:56 am

To resize a window with the mouse just set "resize" on the window to 1. Currently it is not possible to limit it to keep the aspect ratio. If you set window.onResize = nil; then the canvas will always fit to size of the window.
TheTom
 
Posts: 321
Joined: Sun Oct 09, 2011 10:20 am

Re: Canvas G1000

Postby Hooray » Wed Feb 07, 2018 6:09 pm

TheTom wrote in Wed Feb 07, 2018 9:56 am:Currently it is not possible to limit it to keep the aspect ratio.



FWIW, right now, we're seeing two different approaches to provide the "fascia" (skin): http://wiki.flightgear.org/images/2/20/Mirrored_MFD.png

  • SVG/raster image based (commonly used in GUI dialogs)
  • an actual 3D model (for aircraft/cockpit placements

Given the limitations of svg.nas, as well as the current requirement to export the SVG image to a raster image before it can be used as a "skin", we could also revisit the idea of adding 3D model support to the Canvas in the form of a native sc::Element - i.e. along the lines of the previously posted patch illustrating the concept, which adds an osg::PositionAttitudeTranformMatrix on top of the 3D model - that way, we could use single 3D model for both use-cases, i.e. by loading the 3D model from disk and using an ortographic view to get rid of the SVG=> raster image step, without sacrificing any flexibility

As a matter of fact, we could even add a scripted parser to load existing model.xml files and set up the corresponding hotspots/bindings directly, I believe that this would also address the aspect ratio handling requirement ?

http://wiki.flightgear.org/Howto:Extend ... _3D_models
Image
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby www2 » Thu Feb 08, 2018 11:35 pm

Update i have found an later and better version of some instruments for G1000 as wiglets.
Example:
Image
www2
 
Posts: 242
Joined: Thu Apr 16, 2009 1:58 pm

FG1000 PFD

Postby Hooray » Sat Feb 10, 2018 12:17 pm

That's looking really good - but like I said before, please do coordinate your work with Michat, so that there's hopefully no redundant work done/wasted here (even if that should mean that he'll postpone/stop his current work).

That being said, once the PFD artwork is available, the corresponding elements can be animated - but for the synthetic vision part, we will probably want to revisit the idea of adding a dedicated view-camera element to the Canvas system to render a custom view-manager view to a Canvas sub-texture to implement support for synthetic vision PFDs like this one:

Image


In conjunction with custom draw-masks to disable certain scenery elements (think AI traffic, weather/environment and custom textures etc), this should make for a pretty compelling "synthetic vision system" probably. Maybe with support for element-specific effects/shaders to implement support for stuff like this:

Image



Gear view in cockpit computer
Hooray wrote:I do think that all screenshots posted here are from said wiki article, I don't think all the code changes have been added there though - as far as I recall, we began using git at some point, while the original patches were just added to the wiki "verbatim", i.e. the wiki may not contain the latest changes reflected in the screenshots posted here, but that should be obvious given that those are showing Canvas GUI dialogs and a number of independent/separate views:

viewtopic.php?f=71&t=23929&start=30#p317930
Image
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby Michat » Sat Feb 10, 2018 7:35 pm

@ww2
Update i have found an later and better version of some instruments for G1000 as wiglets.


Looking really good, how cool is to have 2D readable panels.

@Hooray
That's looking really good - but like I said before, please do coordinate your work with Michat, so that there's hopefully no redundant work done/wasted here (even if that should mean that he'll postpone/stop his current work).


For your information guys since ww2 provided existent solution for PFD I stopped working on duplicates, and it seems he did, and is doing excellent job.

I'll share with you my svgs with the last modifications that I did for the skin (sd card inserts mainly) and some G1000 icon set. So if ww2 needed to take a look, or use some of my created elements he can freely do it. I'll share those svg as soon I/ll organize them on the sandbox.
User avatar
Michat
 
Posts: 958
Joined: Mon Jan 25, 2010 6:24 pm
Location: Spain
Version: 191b
OS: GNewSense

Re: Canvas G1000

Postby Hooray » Sat Feb 10, 2018 7:48 pm

okay, sounds good - just wanted to make sure that you guys don't up duplicating any of your work, which would have been a pity obviously.
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: 11312
Joined: Tue Mar 25, 2008 8:40 am

Re: Canvas G1000

Postby www2 » Sat Feb 10, 2018 8:04 pm

@Hooray
This are my old file from Farmin (not yet pubish and current working on Speed and altimeter.
Thx Michat Plans for G1000 NXi?
For my file I post the files after i finish the Speed (95% done), altimeter(70-80% done), forground Attitude Indicator/slip skip (80% done need be port to his own file) and compass (90% done clean up and need to port to his own file), background Attitude indicator background is (done svg and export to png ) is finish.
www2
 
Posts: 242
Joined: Thu Apr 16, 2009 1:58 pm

PreviousNext

Return to Canvas

Who is online

Users browsing this forum: No registered users and 3 guests