For cockpit shadows, it may be fast to generate the precomputed opacity maps used by ALS within the sim as the compositor supports (?) rendering environment maps (like cubemaps) to texture. The idea being to generate one at start up if a craft doesn't have them, and the results could be cached by model hash id if it's not fast.
I don't think there's currently any support for persistent textures/caching - however, Fernando once had working Canvas integration, and we do have patches that demonstrate how to serialize a canvas buffer to a texture on disk. And it would be a good feature to have regardless of the use case - TheTom actually mentioned persistence support back when he was still prototyping the Canvas several years ago.
It would need the ability to load/unload scenes at startup and render(?). Objects inside the cockpit that cause a lot of shadowing may (??) need a flag to be turned off, or multiple maps generated for some areas.
There is also an existing patch to load/render arbitrary 3D models from disk to a Canvas:
http://wiki.flightgear.org/Howto:Extend ... _3D_models If it's hard to automate using existing camera positions, maybe an aircraft specified list of points to generate opacity maps around will work. It may even be possible to bake canopy tints and scratches into the window opacity map. Just a thought.
The original "canvas view" patches were all about implementing support for custom camera views to be rendered to a canvas texture, where the camera position/offset would be specified via properties, analogous to how the view manager works - this would also be required to support tail-cam view, mirror textures etc:
http://wiki.flightgear.org/Howto:Canvas ... ra_ElementAs you can surely see, we do have quite a few patches related to your idea, it's just that those are currently not yet integrated - however, Stuart offered to help getting the canvas/view patches committed, because he was planning on using that feature for a synthetic terrain view/mode for his FG1000 effort:
Gear view in cockpit computerstuart wrote:Hi,
I'm happy to review any patches and get them committed. Please ping me when you think the code is worth checking in. It doesn't have to be perfect - Particularly once the current release is out.