Talk:Hackathon Proposal: Shaderbased ND features: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(my 2c / food for thought)
 
m (fix up URLs)
Line 4: Line 4:
Thus, if you are serious about developing this, it would ideally be done in tandem with the Compositor/CompositeViewer efforts, because having those two features in place, will greatly simplify your job. Also, even if you have a working build environment, and even if you have years of professional background in C++/OSG, this isn't something that is prototyped during a single weekend. You only need to look at the time frames involved in the prototyping of the Compositor/CompositeViewer efforts, to see for yourself that such projects aren't delivered in just a few days.
Thus, if you are serious about developing this, it would ideally be done in tandem with the Compositor/CompositeViewer efforts, because having those two features in place, will greatly simplify your job. Also, even if you have a working build environment, and even if you have years of professional background in C++/OSG, this isn't something that is prototyped during a single weekend. You only need to look at the time frames involved in the prototyping of the Compositor/CompositeViewer efforts, to see for yourself that such projects aren't delivered in just a few days.
If in doubt, it would be best to check back with the developers mailing list, and ask specifically Fernando, Jules and James for their opinions.
If in doubt, it would be best to check back with the developers mailing list, and ask specifically Fernando, Jules and James for their opinions.
In the meantime, if you are specifically interested in bringing effects/shader functionality to current and future NDs, the lowest hanging fruit is indeed adding effects support to the Canvas system - which is something that has been previously prototyped, and something that's even be suggested by the creator of the canvas system a while ago: [[Canvas Development#Effects & Shaders]]
In the meantime, if you are specifically interested in bringing effects/shader functionality to current and future NDs, the lowest hanging fruit is indeed adding effects support to the Canvas system - which is something that has been previously prototyped, and something that's even be suggested by the creator of the canvas system a while ago: [[Canvas Development#Effects / Shaders]]
Realistically, this kind of change is strictly opt-in, and touches less than 50 lines of code - and we've done this previously: [[File:Canvas-Fragment-Shader-circles.png|thumb]]
Realistically, this kind of change is strictly opt-in, and touches less than 50 lines of code - and we've done this previously: [[File:Canvas-Fragment-Shader-circles.png|thumb|unmodified airport selection [[Canvas_Development#Effects_.2F_Shaders|canvas with fragment shader applied]]]]


All that being said, your idea is indeed good and a long-standing one, too - in fact, even prior to the Compositor framework, people have been wanting to create support for orthographic terrain views, for some pointers to related discussions see the following wiki article (inspired by ideas that TorstenD posted on the forum, which favors an atlas-based approach, because it predates the Compositor by many years): [[Canvas_Tile_Element]]
All that being said, your idea is indeed good and a long-standing one, too - in fact, even prior to the Compositor framework, people have been wanting to create support for orthographic terrain views, for some pointers to related discussions see the following wiki article (inspired by ideas that TorstenD posted on the forum, which favors an atlas-based approach, because it predates the Compositor by many years): [[Canvas_Tile_Element]]

Revision as of 13:52, 10 October 2020

Hi, the idea is great (and has in fact been previously discussed on the forum and devel list) - but I would suggest to consider postponing working on this, simply because there is so much related work going on at the moment. Like you said, this would be ideally done by using the Compositor. Since you mention the ND (NavDisplay) specifically, you will probably agree that such a feature would be developed with the Canvas in mind, because that's what non-legacy avionics in FlightGear are using to create such instrumentation. So, this would be best done by extending the Canvas system (as in creating a dedicated canvas element). Namely, by rendering a scenery sub-camera to a texture. Fernando, who has developed the Compositor, also came up with patches to render such a sub-camera to a texture. And he also made quite a bit of progress at the time. However, since then, many things have changed/progressed quite a bit - on the one hand, there's Fernando's Compositor work, and on the other hand there is Jules' CompositeViewer Support effort. Thus, if you are serious about developing this, it would ideally be done in tandem with the Compositor/CompositeViewer efforts, because having those two features in place, will greatly simplify your job. Also, even if you have a working build environment, and even if you have years of professional background in C++/OSG, this isn't something that is prototyped during a single weekend. You only need to look at the time frames involved in the prototyping of the Compositor/CompositeViewer efforts, to see for yourself that such projects aren't delivered in just a few days. If in doubt, it would be best to check back with the developers mailing list, and ask specifically Fernando, Jules and James for their opinions. In the meantime, if you are specifically interested in bringing effects/shader functionality to current and future NDs, the lowest hanging fruit is indeed adding effects support to the Canvas system - which is something that has been previously prototyped, and something that's even be suggested by the creator of the canvas system a while ago: Canvas Development#Effects / Shaders

Realistically, this kind of change is strictly opt-in, and touches less than 50 lines of code - and we've done this previously:

unmodified airport selection canvas with fragment shader applied

All that being said, your idea is indeed good and a long-standing one, too - in fact, even prior to the Compositor framework, people have been wanting to create support for orthographic terrain views, for some pointers to related discussions see the following wiki article (inspired by ideas that TorstenD posted on the forum, which favors an atlas-based approach, because it predates the Compositor by many years): Canvas_Tile_Element

And even aside from the Compositor/Terrain overlay, having effect/shader support per canvas could come in very handy - and it could also speed up rendering, e.g. some senior core devs have been toying with the idea to implement symbol instancing via effects/shaders, i.e. for those maps/charts where hundreds of symbols are drawn - which is currently expensive to do via Canvas, and could become much cheaper if shaders were used instead. Check the archives for comments posted by James or ThorstenR to learn more.

--Hooray (talk) 09:50, 10 October 2020 (EDT)