Board index FlightGear Development Aircraft Autopilot and route manager

Activate Route Manager

Designing a stable autopilot is one of the hardest things. Need help?

Re: Activate Route Manager

Postby Hooray » Sun Jun 18, 2017 4:16 pm

It comes however with the territory of useful features being often added well after other systems and features have been adopted.
Anyway, integrating Canvas and effects/shaders isn't necessarily that difficult to do (Thorsten is right, it mainyl requires an OSG::StateSet to be configurable and registered for the top-level group/element you want to see customized)- we tinkered with that several years ago, and things seemed promising already back then (based on Tom's early experiments):

http://wiki.flightgear.org/Canvas_Devel ... 2F_Shaders
Image

All it takes is someone familiar with Canvas/OSG and FG/SG internals to take it from there and actually do the integration (ideally with commit access).

There's quite a bit of legacy code that could be phased out by doing this, i.e. so that the underlying C++ code could be unified and simplified.
Especially anything involving procedural texturing could greatly benefit from supporting effects/shaders per Canvas (or even per Canvas element).


If anyone around here is sufficiently interested and motivated (and able to patch/build SG/FG from source), I can provide plenty of code snippets, patches and resources to get you up and running within a few days of hacking.
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: 11340
Joined: Tue Mar 25, 2008 8:40 am

Re: Activate Route Manager

Postby Thorsten » Sun Jun 18, 2017 5:31 pm

Anyway, integrating Canvas and effects/shaders isn't necessarily that difficult to do


You lost me...

Canvas is integrated nicely - see the HUD effect - in fact it's precisely in the form we want it, we can run blur kernels over canvases and could even do things like bloom in a forward renderer (!).

Image

The question was whether OSGText shares these advantages or whether it appears in a crude way like OSGParticles which cause as much headache as they help.
Thorsten
 
Posts: 11065
Joined: Mon Nov 02, 2009 8:33 am

Re: Activate Route Manager

Postby Hooray » Sun Jun 18, 2017 5:46 pm

Yeah, I am aware of what you are doing there - per canvas/placement, but that is unrelated to the use-case we originally discussed, as in using a Canvas as the output buffer for an effect/shader, as well as the input buffer for another effect/shader - as in providing the possibility for having cascades of effects/shaders that render to a FBO/RTT represented by a Canvas, which in turn is then handed onto the next "stage" - the point of this being well covered by Zan's original work, and the discussions that Fred, Mathias and Tim had in response to that work, and the overlapping Rembrandt effort back then.

I think we also covered the potential of providing these hooks back when we were talking about any form of procedural texturing in the scene/scenery,

As a matter of fact, both psadro:gm and Zakalawe repeatedly touched on this on the devel list, too - e.g. in the context of photo-texturing parts of the scene: http://wiki.flightgear.org/Canvas_Scenery_Overlays

Tim originally implemented the effect/shader framework in a way that was actually prepared to support this (rendering a camera to an offscreen context and reusing that elsewhere) - it is just that Rembrandt, and Canvas, took shape at a much later time - and that Zan's newcameras work was not particularly well communicated.

However, as things are standing, all the machinery is already in place - it just isn't well integrated currently - otherwise, efforts like ALS (or Rembrandt, and even osgEarth) could greatly benefit from using the Canvas system as the main mechanism to implement rendering related additions in a compatible fashion that is well integrated with the rest of FlightGear, as in rendering an arbitrary camera view showing the scene to a Canvas, applying an effect/shader to it and showing that in the cockpit.


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

Note that these changes are long-standing proposals made by a number of key contributors, it's just the usual manpower issue, so that people tend to work around such limitations in the meantime.

The recent Qt/splash screen additions are symptomatic of the underlying problem, too - especially given that any splash screen can be trivially rendered using the Canvas system with arbitrary complexity, without requiring Qt5 ...
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: 11340
Joined: Tue Mar 25, 2008 8:40 am

Previous

Return to Autopilot and route manager

Who is online

Users browsing this forum: No registered users and 1 guest