There's now a pretty comprehensive article on extending FlightGear's canvas system with custom rendering elements, this could be used to re-implement (or "port") parts of atlas to be usable via Canvas, built right into FlightGear:
Basically, Canvas works in terms of "elements", each element representing a certain drawing mode (text, OpenVG paths (vector images), raster images, geographic positions (Map) and groups).
To add support for a new element type, the "element" or "group" interfaces would need to be sub-classed normally.
But in the case of atlas, this would be primarily about extending/sub-classing existing elements, namely:
Map (which is a subclass of group, intended to manage symbols with geographic positions), and
CanvasImage (which works with raster images).
We previously discussed the idea:
bschack wrote:The code that comes closest to what you immediately need (creating map textures) is in
TileMapper.cxx and the classes that it depends on, like Bucket.cxx and Subbucket.cxx (where the real drawing takes place).
There's an existing example of CanvasImage being subclassed in FlightGear, for the "window" class, in $FG_SRC/Canvas/window.?xx
If bschack could provide a few more pointers, I could probably help and put a quick prototype together that uses "live" atlas image generation, adds those as canvas raster images and geo-aligns them using the Map mode. For starters, we would primarily need access to the classes required for rendering the heightmap to an offscreen RTT.
For additionial details please see:
http://wiki.flightgear.org/Canvas_Development#ElementsSubject: Jabiru J-170 (DEVELOPMENT)omega95 wrote:By the way, Fred can you give me an idea on how to use od_gauge to continuously render a camera view to texture? I don't really know much about it but then every says that Project Rembrandt involves continuous rendering to texture.
And, is there a way to get terrain as a view? I mean, sorta like changing the color based on terrain. Oh, and I'd also need to place my own texture on the terrain, instead of the materials textures..
So, that's not just using od_gauge, for a terrain view, I'd need to actually re-render the whole terrain with some extra stuff...
Here's a picture of the real thing..
So, I was thinking we have the basic terrain and have a checker box texture over it.
And then diffuse it according to this gradient based on altitude.
Any ideas?