Canvas scenery overlays: Difference between revisions

Jump to navigation Jump to search
Line 229: Line 229:


In its current form it will just look for <tilename>.dds files and drape them over the tile using 2 modified effects/shaders, and a patched obj.cxx that exposes the corresponding lat/lon tuples to shader space.
In its current form it will just look for <tilename>.dds files and drape them over the tile using 2 modified effects/shaders, and a patched obj.cxx that exposes the corresponding lat/lon tuples to shader space.
=== Canvas Effects ===
These days you aren't limited to 8 bit texture components. There is a rich set of data formats for textures: 32 bit floats, 16 bit floats, exotic combinations of different length floats per RGB component... I don't know if there is a better way to create your texture offline than write C++ code in simgear. OSG will read a TIFF file with 32bits per component as a floating point texture... assuming you can create such a thing.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/29587121/
  |title  =  <nowiki> Re: [Flightgear-devel] Functions to textures? </nowiki>
  |author =  <nowiki> Tim Moore </nowiki>
  |date  =  Jul 25th, 2012
  |added  =  Jul 25th, 2012
  |script_version = 0.40
  }}</ref>
It would be nice if the Effects framework had a way to load arbitrary textures and make them available to effects.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/29587121/
  |title  =  <nowiki> Re: [Flightgear-devel] Functions to textures? </nowiki>
  |author =  <nowiki> Tim Moore </nowiki>
  |date  =  Jul 25th, 2012
  |added  =  Jul 25th, 2012
  |script_version = 0.40
  }}</ref>
If you want to apply effects to other kinds of models, you would need to generalie MakeEffectVisitor "in both directions." StateSet objects can appear in any scene graph node and also in the Geometry nodes that sit below osg::Geode. A more general effects visitor needs to track the graphics state as it traverses the scene graph and also needs to examine the geometry. Effects sit at the Geode level. <ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/26794801/
  |title  =  <nowiki> Re: [Flightgear-devel] Comments and questions about model loading,
model formats, and effects.... </nowiki>
  |author =  <nowiki> Tim Moore </nowiki>
  |date  =  Dec 22nd, 2010
  |added  =  Dec 22nd, 2010
  |script_version = 0.40
  }}</ref>

Navigation menu