Board index FlightGear Development New features

VNC clients as texture

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

VNC clients as texture

Postby Torsten » Mon Dec 06, 2010 11:18 am

Hi all,

not really a new feature but worth knowing:
OpenSceneGraph has the ability to render the output from a VNC client as a texture onto any surface in the scene graph. This might come in handy to display foreign hardware output within 3d-cockpits.
Alex Perry had a session at LinuxTag 2010 showcasing the output of an Android using this technology. See his slides here.
I just succeeded to try it out by following his advice. I placed a tablet-pc like object into the Seneca's cockpit rendering the entire desktop of my Windows pc onto one surface. Here you can see FlightGear running on Linux with the VNC-output of FlightGear running on Windows (with VisualStudio and fg-sources in the background).
Image
Currently only left-mouse-clicks are forwarded to the VNC session, so controlling the remote fg is barely possible. A nice usecase might be to run one of these full-featured Garmin simulators (like for the G1000) on one machine and present this in a 3d-glass cockpit.

Requirements:
[*]OSG source codes
[*]Apply Alex's patch from here
[*]Compile OSG
[*]Probably rebuild SimGear/FlightGear from source
[*]Create an object with texture named hostname.vnc where hostname is the hostname of the machine running the VNC server
[*]A VNC server like TightVNC
flightgear.org - where development happens.
User avatar
Torsten
 
Posts: 645
Joined: Fri Feb 01, 2008 9:22 pm
Location: near Hamburg, Germany
Callsign: offline
Version: next
OS: Linux

Re: VNC clients as texture

Postby MdMax » Mon Dec 06, 2010 12:49 pm

Very nice and interesting ! :D
User avatar
MdMax
 
Posts: 46
Joined: Sun Nov 22, 2009 12:17 pm
Location: France
Version: Git
OS: Ubuntu GNU/Linux

Re: VNC clients as texture

Postby Gijs » Mon Dec 06, 2010 12:55 pm

Would this also support " reflective mirros"? If you connect the other PC and tilt the view till it is positioned in the mirror's viewing direction?
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9355
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: VNC clients as texture

Postby Torsten » Mon Dec 06, 2010 3:45 pm

Hmm - I don't know if I fully understand your question.
There are two things happening here:
1. There is your usual FlightGear running on machine A. The Aircraft has an object with some kind of special material animation that allows the texture to be changed.
2. There is another Machine B running some arbitrary software, FlightGear if you want so or a moving map application or whatever.

Now there is a process that creates screenshots from your machine B, either from a single window or the entire desktop. That screenshot is transferred over the network to machine A, converted into a texture and applied to the object with the special material animation, telling the object "texture has changed, please update!". All this at framerate.
You don't necessarily need two individual machines. If you have enough idle cores in your CPU, this can be hosted within a single box. If you spawn a VNC server and open your entire desktop, than start FlightGear and display your desktop within your VNC-model in the cockpit, you can see your FlightGear session rendered to a 3D-model. Of course, this is recursion - you display a rendered session within a rendered session within a... (you get the idea). It's like standing in front of a mirror, holding a mirror.
flightgear.org - where development happens.
User avatar
Torsten
 
Posts: 645
Joined: Fri Feb 01, 2008 9:22 pm
Location: near Hamburg, Germany
Callsign: offline
Version: next
OS: Linux

Re: VNC clients as texture

Postby Ouacaze » Tue Dec 07, 2010 9:58 am

Nice feature :)

Gijs wrote:Would this also support " reflective mirros"? If you connect the other PC and tilt the view till it is positioned in the mirror's viewing direction?

Juste curious: isn't the "rear view mirror" feature already implemented into Flightgear ? I suppose OSG can handle this.
Last edited by Ouacaze on Wed Dec 08, 2010 1:41 pm, edited 1 time in total.
Ouacaze
 
Posts: 23
Joined: Mon Aug 03, 2009 7:03 pm
Location: Toulouse

Re: VNC clients as texture

Postby Torsten » Wed Dec 08, 2010 9:54 am

Ouacaze wrote:Juste curious: isn't this already implemented into Flightgear ? I suppose OSG can handle this.

Yes and No. The main work is done in OSG, unfortunately their implementation is broken. This is what the patch from Alex is for. SimGear GIT (not 2.0.0) has the <vncation> element for pick animations to send mouse clicks as mouse events to the VNC window.
flightgear.org - where development happens.
User avatar
Torsten
 
Posts: 645
Joined: Fri Feb 01, 2008 9:22 pm
Location: near Hamburg, Germany
Callsign: offline
Version: next
OS: Linux

Re: VNC clients as texture

Postby Ouacaze » Wed Dec 08, 2010 1:40 pm

Torsten wrote:
Ouacaze wrote:Juste curious: isn't this already implemented into Flightgear ? I suppose OSG can handle this.

Yes and No. The main work is done in OSG, unfortunately their implementation is broken. This is what the patch from Alex is for. SimGear GIT (not 2.0.0) has the <vncation> element for pick animations to send mouse clicks as mouse events to the VNC window.

Sorry, I was talking about the "rear view mirror" feature :). I will edit my post to make it less confusing.
Ouacaze
 
Posts: 23
Joined: Mon Aug 03, 2009 7:03 pm
Location: Toulouse

Re: VNC clients as texture

Postby Crashpilot » Sat Dec 11, 2010 4:26 pm

Wow, imagine a total immersion situation, like with 3D-helmets, and there is a notebook lying on the copilots seat, which shows your desktop, so you can chat and email from inside the virtual world...

Or use a desktop computer in the ATC tower...
Crashpilot
 
Posts: 28
Joined: Tue Jan 29, 2008 9:38 pm
Location: Cologne

Re: VNC clients as texture

Postby Johan G » Sat Dec 11, 2010 5:13 pm

Crashpilot wrote:Or use a desktop computer in the ATC tower...

While you're flying in FlightGear? :wink:
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 6094
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: VNC clients as texture

Postby Armchair Ace » Sat Dec 11, 2010 10:33 pm

Johan G wrote:
Crashpilot wrote:Or use a desktop computer in the ATC tower...

While you're flying in FlightGear? :wink:


Since when did ATC Towers fly?! :shock:

But the possibilities opened up by this development are manifold! I mean, we can have pretty moving maps with satellite imagery (grabbed from Google Maps, provided that they have no qualms qith us displaying their web pages in our software), or perhaps the ability to flip through the POH of an aircraft while you are still in the simulator.

~Tom
Member of the FlightGear Flying Club

Current Projects :
Miscellaneous texture and sound work
User avatar
Armchair Ace
 
Posts: 1373
Joined: Sun Sep 27, 2009 7:48 pm
Location: EGP?
Callsign: G-ATPF
IRC name: ArmchairAce
OS: Mac OSX

Re: VNC clients as texture

Postby Johan G » Mon Dec 13, 2010 9:20 pm

Armchair Ace wrote:Since when did ATC Towers fly?! :shock:

Since the sixties, though not civilian ones. :wink: (OK, maybe not the towers, but the ATC, sort of...)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 6094
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: VNC clients as texture

Postby Crashpilot » Fri Dec 17, 2010 12:57 pm

Armchair Ace wrote:[...] we can have pretty moving maps with satellite imagery (grabbed from Google Maps, provided that they have no qualms qith us displaying their web pages in our software), [...]


Actually their web pages aren't displayed in flightgear. They are displayed by a browser on a desktop. This desktop is exported via VNC. Flightgear in this scenario is nothing else than a very special VNC viewer/client...
Crashpilot
 
Posts: 28
Joined: Tue Jan 29, 2008 9:38 pm
Location: Cologne

Re: VNC clients as texture

Postby MAKG » Fri Jan 07, 2011 10:07 pm

While that's technically interesting, I think you're guaranteed to have a performance problem. Not due to texturing; that can be very fast. But VNC is network intensive and very slow -- it generally cannot benefit from hardware rendering. It may be useful for static views or things that change at very low rates. But not a lot more than that.
MAKG
 
Posts: 1152
Joined: Sun Oct 19, 2008 6:11 pm
Location: California Central Coast

Re: VNC clients as texture

Postby chris_blues » Fri Jan 07, 2011 10:21 pm

maybe the FlightGear Map Server/MP-Viewer? Like on a TomTom-car navigation system. :)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1569
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: VNC clients as texture

Postby curt » Sat Jan 08, 2011 12:07 am

I need to figure out how to get vnc running here ... anyone know of a vnc for dummies howto page that steps it out pretty simply? I want to go linux -> linux. I spent about 15 minutes on it a few months ago and didn't get the magic to work right ... it's probably not that hard once I figure out the right server to run and how it's supposed to be configured.
curt
Administrator
 
Posts: 1168
Joined: Thu Jan 01, 1970 12:00 am
Location: Minneapolis, MN

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 3 guests