Michat wrote in Mon Dec 21, 2015 2:58 pm:Somebody should consider some other visual techniques. Soon, later, or never, it will resides in your organization, the human components.
A number of core developers have been wanting to unify the FGRenderer infrastructure so that different rendering schemes (think fixed-function vs. Rembrandt vs. ALS) can be prototyped/implemented and maintained:
http://wiki.flightgear.org/Supporting_m ... _renderersA few years ago, even prior to Rembrandt, Zan was experimenting with the whole CameraGroup code to make it entirely XML-configurable:
Subject: Improved camera configuration optionsZan wrote:I've been working on improving the camera configuration system in FG. It is almost done, but needs some cleanup before I can put up a merge request. Here is the list of new features:
- Support for setting the rendering order of cameras
- Can set the clear mask (color, depth and stencil buffer separately)
- Can set the texture format in render-to-texture (which already was there, but had almost no use before this update), rgb, rgba, depth or depth-stencil at the moment.
- Can set the texture type (normalized 2d or rectangle)
- Support for multiple render targets, via just specifying multiple texture targets. This needs modification to shaders though, but works.
- Can set whether camera uses scene data or a custom model (e.g. screen aligned quad)
- Can bind render target textures to texture units for rendering to screen. (In the future should allow using these in models by specifying the texture name...)
Maybe I forgot something, but those are the main points. And what this allows:
- Rendering a different view to texture, then binding that to a texture unit to be used in a model on another camera:

(Rear view is rendered first, then cube has an effect/shader which draws that view on all sides of the cube. The view updates when moving, so could be used in aircraft models etc.) - "Real" reflections on aircraft. Might work with some tuning?
- Distorted views etc. (which are used in simulators with multiple projectors) without the need to change source code and compile for editing.
- Post processing effects, here is an example of blue filtering the scene. Everything is rendered to texture, and then a filter is applied to that texture in post processing:

- Chaining of post processing effects.
Note though that the camera settings need to be done in preferences.xml, so an aircraft model cannot define any new views. Also, the camera positions are relative to the current view (i.e. cockpit, chase etc) and cannot be fixed on the aircraft itself. And rendering to texture while using that texture in the scene has undefined result.
I'm trying to expand this so that cameras could select which parts of scene they render. For example opaque objects to a texture, then do something with it, render to screen and then render transparent objects. And after that some post processing, like bloom, to whole scene maybe. Or deferred lighting allowing multiple lights...
Maybe someone finds this interesting. I'm not sure if this should be under "Effects and Shaders" though...
Back then, Mathias, Fred and Tim were contemplating to use Zan's code as the foundation for features like Rembrandt:
http://sourceforge.net/p/flightgear/mai ... /28946515/Mathias Fröhlich wrote:I was not aware of your work. But given what you write here, this looks pretty
promising. Fred mentioned your name in an offline mail.
IMO the complexity of this kind of rendering method in terms of requirements
to the driver makes me frighten a bit when I think that we have currently no
fallback to the old style renderer. Even back to the fixed function pure oldest
style stuff which is still the fastest thing we have.
Keep in mind that plenty of people will likely trade speed/deterministic frame
rates for any eye candy. And beyond that all people that cannot see anything
with rembrandt but a black window will love to have something that at least
shows the old style stuff (may be just fixed function?).
So, wherever we end, I would highly apprechiate that we do not lock out low
end graphics boards by not having any fallback.
May you both should combine forces?
Something like this would allow schemes like Rembrandt to be entirely prototyped/configured and implemented using XML, properties and effects/shaders - without requiring any major C++ changes.
For the full discussion, see:
http://sourceforge.net/p/flightgear/mai ... /28939805/At some point, it is likely that this will be overlapping with ongoing Canvas developments, simply because Canvas encapsulates the whole concept of RTT/FBO by providing a SGPropertyChangeListener-based subsystem on top of OSG RTT/FBO functionality, so that it would make sense to adapt Zan's newcameras and Fred's Rembrandt code accordingly.
For a more technical explanation, see:
viewtopic.php?f=37&t=24288&p=221229&hilit=#p221229Or just search the forum for: "FBO + Rembrandt + Canvas + OSG:
search.php?st=0&sk=t&sd=d&sr=posts&keywords=OSG+Rembrandt+FBO+CanvasWhen searching the devel list archives, you will primarily want to look for postings from Mathias, Tim, Fred and James.