Algernon wrote in Wed Sep 03, 2014 5:55 pm:The idea of a canvas airframe texture is a fascinating one, and might be considered almost heretical over at FGUK!
But although I'm finding Canvas a bit inaccessible at the moment, if I can achieve combined textures with controllable transparency that works equally well with or without Rembrandt, I'd certainly be interested in using this idea as an entry point.
Canvas should work fairly well actually - Tom added support for pretty much "arbitrary" placements, so that canvas textures can be placed anywhere on the aircraft, but also in the scenery (and obviously also in GUI dialogs/windows). We once toyed with the idea of also making effects and shaders available to Canvas - Tom also mentioned this once on the devel list, and we have code doing this for the whole canvas - even though Tom said that it would be better to support this "per-element". Obviously, that would bring a ton of flexibility to Canvas-based efforts like yours.
I am not sure why you find Canvas "inaccessible" - but maybe you should consider posting a few more specific questions so that we can fill in any gaps - or even post some code snippets.
I do realize that most code snippets recently added to the wiki are about different use-cases - i.e. not specifically about airframe textures/liveries, but then again - the Canvas doesn't care at all where you use a certain texture - in other words, you could prototype the whole thing using a GUI dialog and once you are satisifed with the outcode you would use another placement to show the texture elsewhere. The good thing about your particular use case is that it low-bandwidth, i.e. the texture probably doesn't need to be updated per frame - so performance issues due to Nasal/Canvas overhead should not be a factor.
I think you could certainly prototype the whole thing fairly quickly - and if/once effects and shaders become available to Canvas, your approach could be updated accordingly.
For starters, you could look at this:
http://wiki.flightgear.org/Howto:Using_ ... ash_ScreenThis will open an existing splash screen image and show it in a Canvas dialog.
You can copy/paste the code to load a few different images, to learn more about Canvas image handling, see:
http://wiki.flightgear.org/Canvas_ImageNote that you can also use/apply sub-textures and overlay/transform those arbitrarily - i.e. a lot of fancy stuff without having to know anything about effects or shaders
You can also overlay individual images using the "z-index" attribute:
http://wiki.flightgear.org/Canvas_Element#z-indexAnd then, you can basically do pretty much anything using the core Nasal APIs documented at:
http://wiki.flightgear.org/Canvas_Nasal_APITo adjust transparency, you'll want to use the alpha channel.
To animate the livery/texture, you'd basically use a timer/listener to change the texture's canvas property tree - i.e. by hiding/showing some sub-texture, or transforming groups/elements.
Feel free to start a new thread in the Canvas sub forum and let us know if you got stuck somewhere (please post your code).
I don't know if we have placement-related docs anywhere, but you could take a look at any aircraft using a dynamic Canvas-based texture, the c172p-canvas should be a fairly lighweight example compared to the 777/747 probably
If you're interested in pursuing this, I'd love to see the whole effort documented via the wiki so that we can turn this into a "Canvas Liveries" tutorial/howto if you agree