Canvas properties: Difference between revisions

Jump to navigation Jump to search
m
Line 43: Line 43:


== Planned Features ==
== Planned Features ==
* Support drawing to textures for aircraft instruments (supported already)
* Support drawing to textures for aircraft instruments {{Done}}
* Support drawing to aircraft HUDs (supported already)
* Support drawing to aircraft HUDs {{Done}}
* Support drawing to GUI widgets (PUI puObjects) (initial support added as of 07/2012)
* Support drawing to GUI widgets {{Done}}
* Support implementing GUI widgets using Canvas/Nasal (currently being discussed)
* Support implementing GUI widgets using Canvas/Nasal {{Pending}} (see [[Canvas Widgets]])
* Static image files should be handled like any other element on the canvas. Only instead of specifying a path you'll have to set the file system path to an image which will be loaded with osg.
* Static image files should be handled like any other element on the canvas. Only instead of specifying a path you'll have to set the file system path to an image which will be loaded with osg. {{Not done}}
* Support placing canvas textures into the scenery, so that dynamic scenery features (i.e. a [http://en.wikipedia.org/wiki/Visual_Docking_Guidance_System visual docking guidance system] or runway skid marks) can be implemented using the canvas system (being discussed and planned as of 08/2012)
* Support placing canvas textures into the scenery, so that dynamic scenery features (i.e. a [http://en.wikipedia.org/wiki/Visual_Docking_Guidance_System visual docking guidance system] or runway skid marks) can be implemented using the canvas system (being discussed and planned as of 08/2012) {{Not done}}
* '''TheTom''': "vertical projection seems not too complicated as its basically just calculating segment lenghts on a sphere, or maybe just direct distance calculations. I think the error in comparison to the real sphere can be neglected while using typical distances (eg. at a distance of 300 miles the error is about 2.8 miles, which is ~0.9%)."
* '''TheTom''': "vertical projection seems not too complicated as its basically just calculating segment lenghts on a sphere, or maybe just direct distance calculations. I think the error in comparison to the real sphere can be neglected while using typical distances (eg. at a distance of 300 miles the error is about 2.8 miles, which is ~0.9%)." {{Pending}} (see [[Canvas Maps]])
* '''TheTom''': "If each widget/tool/whatever don't creates an own canvas, but instead just attaches itself to a given group infinite nesting of "canases" would be easily possible already with the current implementation. Maybe I should add means to define clipping regions to guarantee widgets can't draw outside their assigned regions, i.e. perform clipping only if there is actually a clipping region specified."
* '''TheTom''': "If each widget/tool/whatever don't creates an own canvas, but instead just attaches itself to a given group infinite nesting of "canases" would be easily possible already with the current implementation. Maybe I should add means to define clipping regions to guarantee widgets can't draw outside their assigned regions, i.e. perform clipping only if there is actually a clipping region specified." {{Not done}}
* '''Hooray''': "yes, sounds like the best and most powerful design to me, because everything would still be a canvas, but nesting/recursion would be supported, i.e. "piping" the output from one canvas into another canvas group, so that canvases can be reused and nested"
* '''Hooray''': "yes, sounds like the best and most powerful design to me, because everything would still be a canvas, but nesting/recursion would be supported, i.e. "piping" the output from one canvas into another canvas group, so that canvases can be reused and nested"


=== Canvas Scenery Placement ===
=== Canvas Scenery Placement {{Pending}} ===
* '''Hooray''': "We talked about placing skid marks dynamically via multiplayer traffic [http://flightgear.org/forums/viewtopic.php?f=5&t=17024&p=162579#p162579]. The canvas textures can already be placed in aircraft, HUDs and dialogs - if they could also be added to the scenery (runways in this case), people could implement some pretty cool effects using the canvas system. Flug's bombable addon could also make use of this, what do you think?"
* '''Hooray''': "We talked about placing skid marks dynamically via multiplayer traffic [http://flightgear.org/forums/viewtopic.php?f=5&t=17024&p=162579#p162579]. The canvas textures can already be placed in aircraft, HUDs and dialogs - if they could also be added to the scenery (runways in this case), people could implement some pretty cool effects using the canvas system. Flug's bombable addon could also make use of this, what do you think?"
* '''TheTom''': "Adding the canvas to the secenery is a good idea  A while ago I was thinking about implementing VDGS, which could be easily realized with a canvas."
* '''TheTom''': "Adding the canvas to the secenery is a good idea  A while ago I was thinking about implementing VDGS, which could be easily realized with a canvas."
Line 59: Line 59:
* '''Hooray''': "Placement-wise, it would obviously be cool to directly support geographic coordinates for placing textures - placing runway skids would then be pretty simple to accomplish actually, i.e. for each touchdown point (gear locations) continously get the terrain position and place the skid marks on the asphalt. Yes, the VDGS seems like another good candidate here - ideally, these would be 3D models with a canvas texture and some Nasal code loaded from a model.xml file (supported already)."
* '''Hooray''': "Placement-wise, it would obviously be cool to directly support geographic coordinates for placing textures - placing runway skids would then be pretty simple to accomplish actually, i.e. for each touchdown point (gear locations) continously get the terrain position and place the skid marks on the asphalt. Yes, the VDGS seems like another good candidate here - ideally, these would be 3D models with a canvas texture and some Nasal code loaded from a model.xml file (supported already)."


=== Depth Sorting ===
=== Depth Sorting {{Pending}} ===
I think I have to look at depth ordering of groups and especially the ability to hide groups. Not too complicated but not possible from Nasal yet (you could do it by deleting and re-adding all elements but that's not a good solution
I think I have to look at depth ordering of groups and especially the ability to hide groups. Not too complicated but not possible from Nasal yet (you could do it by deleting and re-adding all elements but that's not a good solution


=== Static Textures & Cascaded Canvases ===
=== Static Textures & Cascaded Canvases {{Pending}} ===
We talked about supporting static textures via file names and handling them via OSG, it just occurred to me that it would be pretty powerful to support two more features
We talked about supporting static textures via file names and handling them via OSG, it just occurred to me that it would be pretty powerful to support two more features


Navigation menu