Board index FlightGear Development New features

Mirrors

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

Mirrors

Postby 2011futuremarine » Fri Oct 16, 2009 8:40 pm

Anyone tried or thought of having the mirrors on some planes (such as the F-4) be real - that is, show the actual scenery/planes behind you etc? :)
Aircraft: primarily military
User avatar
2011futuremarine
 
Posts: 969
Joined: Thu Jun 05, 2008 9:19 pm
Location: USA
Callsign: Dodger4

Re: Mirrors

Postby Gijs » Fri Oct 16, 2009 8:55 pm

2011futuremarine wrote:Anyone tried or thought of having the mirrors on some planes (such as the F-4) be real - that is, show the actual scenery/planes behind you etc? :)

It is not supported in FG yet, but go ahead if you want to implement it! :D
It would be also useful for reallife reflections on windows and fuselages...
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Mirrors

Postby martin » Fri Oct 16, 2009 11:21 pm

Gijs wrote:
2011futuremarine wrote:Anyone tried or thought of having the mirrors on some planes (such as the F-4) be real - that is, show the actual scenery/planes behind you etc? :)

It is not supported in FG yet, but go ahead if you want to implement it! :D


Most of the infrastructure is already in place, simply by FlightGear's capability of defining arbitrary views with individual viewpoints, -directions and -sizes,

Martin.
FlightGear Scenery Release Manager
martin
 
Posts: 666
Joined: Thu Feb 15, 2007 10:03 am
Location: EDLN

Re: Mirrors

Postby Tuxklok » Sat Oct 17, 2009 12:54 pm

What you want is called render to texture, which you then apply to your 'rear view mirror' geometry. I'm sure this is something osg could do, but flightgear would have to expose a way for aircraft to create and use it. Of course that means your rendering the scene again from another viewpoint, and that's gonna have an impact on frame rate.

cheers
The Austria Scenery Project - more info
fg-scenery-tools - gitorious | videos
fgcomgui - Open source, cross platform, gui front end for fgcom. more info

More random musings and doings can be found on my personal site. (work in progress)
User avatar
Tuxklok
 
Posts: 1320
Joined: Tue Apr 21, 2009 7:04 pm
Location: Orlando, FL
Callsign: Tuxklok / N1292P
OS: GNU/Linux

Re: Mirrors

Postby 2011futuremarine » Sun Oct 18, 2009 3:59 pm

Yeah, lag would probably be a problem...
Aircraft: primarily military
User avatar
2011futuremarine
 
Posts: 969
Joined: Thu Jun 05, 2008 9:19 pm
Location: USA
Callsign: Dodger4

Re: Mirrors

Postby Liam » Wed Oct 21, 2009 6:43 pm

Why dont you just implement reflective properties, For example certain planes like the 787 have this on the wingtips. im not sure how its done but it works- although it doesnt reflect, it looks like a mirror.
User avatar
Liam
 
Posts: 1905
Joined: Tue Dec 23, 2008 4:33 pm
Location: United Kingdom
Callsign: Liam
Version: GIT
OS: MAC OS X

Re: Mirrors

Postby owenpsmith » Fri Mar 12, 2021 10:50 pm

I know this topic has been dead for a while, but I’m sure it doesn’t mean no one has been thinking about it. I’ve been working on the Canadair Tutor and been wanting to implement the mirrors in some form.

I’ve learned a lot about visual trickery during my flightgear development, and am wondering if something could be done with a generic cloudy sky/random terrain texture and using texttranslate/rotate to animate it. This would be trivial except I’m not sure how to handle a wraparound scenario such as a loop or 360 deg turn, but it would look sweet for a level roll.

You wouldn’t be able to see your wingman (or the enemy on your six) but it would provide a generic form of a dynamic reflection.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: Mirrors

Postby wkitty42 » Sat Mar 13, 2021 2:31 pm

IIRC, there's some new stuff where you place a canvas on your mirror object and then project the rear view onto the canvas so you do see everything behind you properly... i don't know anything more about it than that and that it is a pretty new feature... not sure if it is available in 2020.3 or not or which sub version of 2020.3 if it has been introduced in one of them...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Mirrors

Postby erik » Sat Mar 13, 2021 2:36 pm

Yes, mirrors are in the works using CompositeViewer and Canvas:
https://wiki.flightgear.org/CompositeViewer_Support

But it needs some more time to implement.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Mirrors

Postby wkitty42 » Sat Mar 13, 2021 2:42 pm

thanks for the confirmation, erik! :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Mirrors

Postby owenpsmith » Sun Mar 14, 2021 5:16 am

Thanks for the info! I’ll check it out and post some screenshots here when I get it working.

Owen.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Re: Mirrors

Postby Hooray » Sun Mar 14, 2021 8:09 am

There's nothing to be tried out at this point, unless you already know how to patch/rebuild SimGear & FlightGear, and some OSG/OpenGL and C++ knowledge would help, too.

If in doubt, it's best to check back with the developers mailing list - what we've got for now is basically "proof-of-concept" to integrate Jules' CompositeViewer work with Fernando's Compositor - all wrapped in a dedicated Canvas element. In addition, Jules has been working on a new view manager, so that each "view" would get its own view manager and could do all sorts of things - in conjunction with rendering to a compositor FBO, custom effects/shaders can also be applied. If that all sounds like gibberish to people, they won't be able to make use of these patches for now.

https://wiki.flightgear.org/Hackathon_P ... and_Canvas
https://wiki.flightgear.org/Canvas_View_Camera_Element
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Mirrors

Postby erik » Sun Mar 14, 2021 9:28 am

Indeed, it was not meant as an encouragement to start hacking at the code.
The people working on it know what they are doing, it just that they have limited time and a large todo-list.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2244
Joined: Thu Nov 01, 2007 2:41 pm

Re: Mirrors

Postby Hooray » Sun Mar 14, 2021 9:43 am

erik wrote in Sun Mar 14, 2021 9:28 am:Indeed, it was not meant as an encouragement to start hacking at the code.
The people working on it know what they are doing, it just that they have limited time and a large todo-list.


Actually, I'd say nobody is actively working on this for the time being due to their very todo-lists.

That is why the current set of patches/topic branches will be only of interest to people who already know how to patch/rebuild FlightGear and to people who already know C++ OSG, too.
Both, Jules and Fernando, have laid out their thoughts on how to approach this, and the two previously shared wiki pages cotain plenty of information to go into greater detail and provide additional pointers.

Thus, the opposite seems true: what we have got for now is only of interest to people wanting to start hacking, rather than those only wanting to use a finished feature.

FlightGear/next already contains the key components for this feature: 1) the Compositor and 2) CompositeViewer support.

What is missing (and what the patch is all about), is the custom Canvas element that registers its own CompositeViewer Camera to render into a custom Compositor to apply custom effects/shaders (which is why the patch affects primarily $SG_SRC/canvas/elements).
Everything else is already in place, and the missing bits are well-documented in the form of wiki pointers - as long as people have a corresponding C++/OSG background.

Besides, the shuttle folks (and numerous airliner developers) have also been waiting for tailcam/gear view support, too:
Space Shuttle - Development
eatdirt wrote:On the other hand, we don't have the luxury of having an end effector camera that project the image of the grapple target onto a pattern . So either we forbid any mismatch of roll angle greater than, let's say 10 degrees, and the grabbing becomes even more challenging, or we stay like this and tolerate mismatch? May be temporarily, just for the time to have a canvas end effector camera :) (woo, that would be cool!).



So, I would definitely encourage people with a corresponding background in C++/OSG to look at those patches and the wiki, check back with Fernando and Jules (ideally via the developers mailing list) and literally "start hacking at the code", while sharing early & often :D

And indeed, this is exactly how the current set of patches came to be, too - long before Jules and Fernando touched those (dating back to F-JJTH/Clement prototyping those in 2016): Gear view in cockpit computer

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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Mirrors

Postby owenpsmith » Mon Mar 15, 2021 7:54 am

There's nothing to be tried out at this point


Yes, I see that after reading the wiki. My original impression was that there would be some sort of beta release of it in the next FG release. I’m happy to wait for the finished product, I don’t need any more reasons for postponing my aircraft development, life is doing that for me too much as it is.

Thanks,

Owen.
Aircraft: Bristol Freighter Mk.31, Canadair CL-41 Tutor

Learn from the mistakes of others, only in FlightGear will you live long enough to make them all yourself.
owenpsmith
 
Posts: 86
Joined: Wed Jan 13, 2010 2:26 am
Location: Port Coquitlam, BC, Canada
Version: 2020.3.11
OS: Windows 10

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 5 guests