Board index FlightGear Development Aircraft Cockpit development

Laser Designator Pod Simulation

Discussion about creating 2d and 3d cockpits.

Laser Designator Pod Simulation

Postby Raghav » Sat Jan 12, 2019 4:54 am

Hi,

Is there any aircarft in which camera image of Laser Designator Pod (LDP) is simulated on MFD?

Basically, I want to try Air-Groud attack simulation through LDP targeting camera on MFD.

Regards
Raghav
Raghav
 
Posts: 28
Joined: Mon Dec 28, 2009 3:30 pm

Re: Laser Designator Pod Simulation

Postby Necolatis » Sat Jan 12, 2019 6:55 am

Mirage 2000 have had for many months where you can designate targets but its in a seperate view, since FG does not support rendering 3D to texture yet.

A couple of months ago F16 got something similar, it looks like you are using a MFD but its really a seperate view. Read the second last post in this thread for basics on how to use it: viewtopic.php?f=17&t=35230

Image
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1876
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: Laser Designator Pod Simulation

Postby Hooray » Sat Jan 12, 2019 1:06 pm

Necolatis wrote in Sat Jan 12, 2019 6:55 am:Mirage 2000 have had for many months where you can designate targets but its in a seperate view, since FG does not support rendering 3D to texture yet.


People able to patch/rebuild fgfs from source can easily apply patches to add the corresponding functionality to FlightGear.
Depending on the use-case, there are basically 3 different "patches" that are relevant:

If all you need is support for loading/displaying and animating 3D models, see:
http://wiki.flightgear.org/Howto:Extend ... _3D_models
Image

If you need support for rendering slave views to a canvas texture (tail cam, gear view, FLIR/night vision, synthetic vision etc), see:
http://wiki.flightgear.org/Howto:Canvas ... ra_Element
Image

For anything else involving custom effects/shaders and off-screen rendering, see:
http://wiki.flightgear.org/Compositor
Image

Basically, in conjunction,these 3 patches can be used to implement extremely sophisticated schemes, including even a re-implementation of deferred rendering (Rembrandt) without hard-coding the underlying pipeline.

While it is admittedly somewhat unfortunate, that these patches have not yet been reviewed/integrated, that's also symptomatic of the circumstance that people tend to really just "scratch their own itch", so that such patches may have a certain shelf life, and possibly may never end up being committed at all.

Speaking in general, it would obviously be helpful to post feature requests via the issue tracker, otherwise the situation is unlikely to improve at all: https://sourceforge.net/p/flightgear/codetickets/

http://wiki.flightgear.org/Canvas_Devel ... ng_Cameras

For the sake of completeness, Thorsten ended up working around the aforementioned limitation by using a custom Nasal/Canvas based sphere "model" for the shuttle's ADI ball, but also mentioned on several occasions that a dedicated shader would be preferable instead (however, that would obviously exclude people without shader support).

http://wiki.flightgear.org/Shuttle_ADI_ball
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: 11267
Joined: Tue Mar 25, 2008 8:40 am

Re: Laser Designator Pod Simulation

Postby legoboyvdlp » Sat Jan 12, 2019 1:22 pm

But we don't want to patch FlightGear - we want something useable that works for everyone. And I think that is what we have.
User avatar
legoboyvdlp
 
Posts: 6033
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Laser Designator Pod Simulation

Postby Hooray » Sun Jan 13, 2019 4:50 pm

Yes, while that's true and a very valid concern, as well as a feasible workaround, it is also worth keeping in mind that this is not how the Canvas system came to be. In other words, if you care about more than just "workarounds", it does make sense to file feature requests for the corresponding functionality that you care about, so that FlightGear can be improved over time.

Otherwise, we would still be using all those non-Canvas workarounds.
It is one thing to want something that "just works", but that's obviously not how you'll see FlightGear improve in the future.

Which is why it's good to see whenever people share such work, so that it can be used to bootstrap new features - which is indeed how the Canvas system came to be.

And for the sake of completeness, Thorsten's work mentioned above also works "out of the box", i.e. does not require any patching at all.
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: 11267
Joined: Tue Mar 25, 2008 8:40 am

Re: Laser Designator Pod Simulation

Postby Thorsten » Sun Jan 13, 2019 5:58 pm

Which is to say, it is quite possible to write a simple 3d renderer in Nasal - whether it's a good idea really depends on the application - and your skill (the naive version will be *very* slow).
Thorsten
 
Posts: 10102
Joined: Mon Nov 02, 2009 8:33 am

Re: Laser Designator Pod Simulation

Postby Hooray » Sun Jan 13, 2019 7:02 pm

Thorsten wrote in Sun Jan 13, 2019 5:58 pm:Which is to say, it is quite possible to write a simple 3d renderer in Nasal

at least for someone with a strong background in maths/physics ... ;-)

whether it's a good idea really depends on the application - and your skill (the naive version will be *very* slow).


I don't think it is such a good idea given the degree of work involved - especially not compared to the C++ patch needed to load any supported 3D model into a scene and animate it using a handful of properties to transform it as needed.

If I remember correctly, there's roughly 50 lines of C++ code involved here - compared to another 150 lines of boilerplate code that is common to all Canvas elements. And even those 50 lines were just copy/paste-adapted from another location where a 3D model was loaded via simgear.

Assuming that it took you more than 1 hour to write the ADI ball code, and assuming that it's more than 200 lines of pre-existing code that you simply had to "adapt", I think it's fairly safe to say that it is not a good idea - especially in the light of the optimizations, and Nasal/Canvas background, required to make this work well enough from a performance standpoint - while still being restricted to a single use-case 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: 11267
Joined: Tue Mar 25, 2008 8:40 am

Re: Laser Designator Pod Simulation

Postby Thorsten » Mon Jan 14, 2019 7:08 am

I don't think it is such a good idea given the degree of work involved - especially not compared to the C++ patch needed to load any supported 3D model into a scene and animate it using a handful of properties to transform it as needed.


... which however may simply not do what you want if the display is more abstract and not a cam image and look wrong, so you need to apply toon shading techniques on top of loading the 3d model, at which point the argument may go the other way.
Thorsten
 
Posts: 10102
Joined: Mon Nov 02, 2009 8:33 am


Return to Cockpit development

Who is online

Users browsing this forum: V12 and 5 guests