Board index FlightGear Development Canvas

Gear view in cockpit computer

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: Gear view in cockpit computer

Postby Hooray » Sat Sep 02, 2017 7:31 pm

I wouldn't bother testing/applying any patches for the time being, we are still in the process of getting things into shape - so unless you know C++ and some OSG basics, the patches we have been sharing will be of little use actually. That is one of the reasons why we have been sharing the screen shots
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: Gear view in cockpit computer

Postby www2 » Sat Sep 02, 2017 7:55 pm

Thanks i say only for the nasal patch not the simgear patch.
Current i have some canvas show blank screen, but i check out that is fix with a clean build.
www2
 
Posts: 319
Joined: Thu Apr 16, 2009 2:58 pm
OS: Ubuntu

Re: Gear view in cockpit computer

Postby Hooray » Sat Sep 02, 2017 8:00 pm

Don't bother, we haven't yet been sharing everything that we worked on, because some things became obsolete so quickly.
However, in the light of Stuart's offer to get involved in helping getting this reviewed and committed, we are hoping to provide a set of git repos/topic branches with the changes included.
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: Gear view in cockpit computer

Postby 5H1N0B1 » Wed Nov 15, 2017 12:19 pm

Hi all,
Sorry to bother you, but this is a really exciting dev. I just wanted to know if a method have been decided yet to integrate these camera of different view in canvas.
On some fighters aircrafts (I know, this is not a priority) but we could use it to configure sniper pods on mfd. So if a method exist and we can use it on several aircraft this would be very cool.
Thanks.
5H1N0B1
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Gear view in cockpit computer

Postby Hooray » Sat Nov 18, 2017 12:21 pm

5H1N0B1 wrote in Wed Nov 15, 2017 12:19 pm: this is a really exciting dev. I just wanted to know if a method have been decided yet to integrate these camera of different view in canvas.


The way this is currently set up to work is just like a convention Canvas element - the main thing is element specific stuff, and in this case, all it needs to "just work" is a number specifying the view number to be used for retrieving the correct view from the view manager - that is how F-JJTH implemented the whole thing originally. Icecode GL then took the code and used a Canvas element - thus, for aircraft developers wanting to use this, they'd primarily add a new Element (e.g. "camera-view") to their Canvas texture setting the view-number property to a valid view.

And that's really all there is to it: it will ask the view manager to look up the view specific camera settings and then render the view to a texture in the scene using the Canvas system.

Everything else we were talking about is a different topic, because it's more complex to also use it for other views (and possibly rendering stages)
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: Gear view in cockpit computer

Postby 5H1N0B1 » Sun Nov 19, 2017 4:51 pm

And that's really all there is to it: it will ask the view manager to look up the view specific camera settings and then render the view to a texture in the scene using the Canvas system.


This is very cool. So can you confirm that all the C++ stuff has been added ? On which FG version this is available (Currently using 2017.3.1) ? Should I compile to make it work ?
(it says to me
Code: Select all
'canvas.Group.createChild(): unknown type (viewcam)'
,that why I'm asking)

Thanks a lot for your answer.
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Gear view in cockpit computer

Postby Hooray » Sun Nov 19, 2017 5:03 pm

No, actually I don't think this is available in any of the "stock" builds - I haven't been following Fg development much recently, but last I checked, this was a separate set of patches and still considered "experimental". Stuart offered to help getting this reviewed and integrated once it is working well enough - if I remember correctly the only remaining issue there was, is the fact that the element needed to be explicitly updated to trigger an update - otherwise the RTT cam would remain static until the next explicit update. Other than that, it is actually working and nothing else needs to be added functionality-wise. If you know C++ and how to rebuild SG/FG you could obviously get in touch with Icecode GL to get involved in testing the patches.
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: Gear view in cockpit computer

Postby 5H1N0B1 » Sun Nov 19, 2017 6:34 pm

if I remember correctly the only remaining issue there was, is the fact that the element needed to be explicitly updated to trigger an update - otherwise the RTT cam would remain static until the next explicit update.


It means we "just" (I don't know the difficullty of that) add a kind of auto updating feature in the C++ source ?

BTW, I 'm ok for testing. I didn't compile FG for 2 or 3 years, but I can do it in order to help.
5H1N0B1
"Each day, with every person you meet, there is something to learn"
5H1N0B1
 
Posts: 222
Joined: Thu Aug 30, 2012 10:36 am
Location: France
Callsign: 5H1N0B1
IRC name: _5H1N0B1
Version: GIT
OS: Ubuntu

Re: Gear view in cockpit computer

Postby Alant » Sun Nov 19, 2017 6:58 pm

I don´t think anything has happened since my last post in this thread https://forum.flightgear.org/viewtopic.php?f=71&t=23929&start=15#p317486

It nearly works, but you will need to apply patches to FG source code and re-compile.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Gear view in cockpit computer

Postby Hooray » Sun Nov 19, 2017 7:25 pm

Actually, that is not accurate: All the screenshots that we posted after your posting were indeed taken using a new Canvas based viewcam element that didn't suffer from the issues you were pointing out. Obviously, this isn't using the exact same code that F-JJTH once shared, but only uses his viewmgr based approach to render a sub-camera to a Canvas texture.

Technically, this works correctly - there are no known issues at all. Even though I do admit, that I never explicitly tested Rembrandt myself
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: Gear view in cockpit computer

Postby Alant » Sun Nov 19, 2017 8:04 pm

I must have missed it, despite following the thread. You mention the wiki, but the updated code does not jump out of the page.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Gear view in cockpit computer

Postby Hooray » Sun Nov 19, 2017 9:05 pm

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

The underlying boilerplate code is still spot-on though, i.e. all that is needed is F-JJTH's code integrating the view-mgr lookup.
I could obviously post the missing bits here, but if I remember correctly, Icecode GL wanted to get Stuart involved before sharing his code, because it was work-in-progress at the time (i.e. late August 2017).

If in doubt, I'd suggest to get in touch with Icecode GL - especially if you should know how to use git, and how to patch/rebuild fgfs from source, ideally with some C++/OSG expertise. Feel free to ping me if Icecode GL is currently n/a, and I will be updating the wiki with the original patches that we used to create those screenshots.

But again, if you'd like to see this "fly", I really suggest to spread the word and get people involved who can help with C++/OSG side of things, or this may linger on our hard drives for another couple of months (or even years). After all, this wouldn't be the first Canvas related addition that doesn't make it back upstream ...

Anyway, but tinkering with this at this point, makes really only sense if you already know how to use Nasal/Canvas - and ideally, how to patch SG/FG and rebuild the whole shebang. Otherwise, it's just going to be a frustrating experience - which is one of the reasons why we didn't update the wiki to contain the WIP patches.
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: Gear view in cockpit computer

Postby icecode » Wed Nov 22, 2017 3:27 pm

Sorry for the late response. There is nothing new regarding the Canvas view element, but I don't remember if I pushed any code to my SF fork. Although it works I don't really like the approach taken: it's not easily expandable, quite inefficient and I personally am not too happy with it. I'll try to paste the code to the wiki as soon as I can so anyone can review it/work on it.
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Gear view in cockpit computer

Postby Alant » Wed Nov 22, 2017 3:44 pm

Thanks

I look forward to seeing it.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: Gear view in cockpit computer

Postby Hooray » Thu Dec 28, 2017 3:05 pm

FYI, I have forwarded the corresponding set of patches to cyrfer, because he expressed an interest in taking those patches and extending them - I suggested to create a public repository so that people can more easily track related developments, and to also update the wiki in the meantime.
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

Previous

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest