wiki:XmlModuleConfiguration

Version 7 (modified by Torben Dannhauer, 13 years ago) (diff)

--

<< Back to XML configuration overview

List of modules with available XML configuration options

Data In/Output?

<module name="dataio" enabled="yes">
  <!-- XML configuration of the module "dataIO" 
      The parameter "enabled" is ignored, because dataIO is mandatory for the visual system to place object etc.
      
      Available clusterroles:
      master: This role recieves all relevant information via the extLink implementation and sends it via cluster implementation to the slave nodes.
      slave: This role recieves all relevant rendering information via the cluster implementation.
      standalone: This role recieves all relevant data via the extLink and renders it. No cluster functionality is used.    
  -->
  <dataio clusterrole="standalone"></dataio>
  <cluster implementation="enet" hardsync="yes" master_ip="10.10.10.10" port="1234" use_zlib_compressor="yes" ></cluster>
  <extlink implementation="vcl" filename="osgVisual.xml"></extlink>
</module>

Distortion

You can enable the distortion module to distort the final image for projection on non-planar surfaces. The channel name is the suffixname of the required configuration files. The distortion requires three files:

  • distort_<channelname>.bmp: The distortion map, with the distortion vector encoded in the RGB values of each pixel of the distortion map.
  • blend_<channelname>.bmp: The blend map which contains the soft edge blending mask for seamless blending between video projectors.
  • view_<channelname>.cfg: The configuration file, which contains the frustum and the rotational and translational offset of the projector (and hence of the !OpenGL "camera").

The XML configuration is as followed:

<module name="distortion" enabled="no">
  <distortion channelname="center" renderimplemmentation="fbo" width="2048" height="2048" useshader="yes" hdr="yes" usetexturerectangle="no"></distortion>
  <!-- optional: <distortionmap filename="distmap.png"></distortionmap> to set distortionmap independend from channel map-->
  <!-- optional: <blendmap filename="blendmap.png"></blendmap> to set blendmap independend from channel map -->
</module>

You can select the technique which should be used to distort the images. The available renderImplementations are:

  • fbo : renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT
  • pbuffer : renderImplementation = osg::Camera::PIXEL_BUFFER
  • pbuffer-rtt : renderImplementation = osg::Camera::PIXEL_BUFFER_RTT
  • fb : renderImplementation = osg::Camera::FRAME_BUFFER
  • window : renderImplementation = osg::Camera::SEPERATE_WINDOW

You have to select the heights and width of the distortion map you want to use. The flag "useshader" indicates to use shaders instead of plain OpenGL. To distort HDR renderings enable the flag "hdr". The Flag "usetexturerectangle" indicated whether a texture rectangle should be used to display the distorted image.

OPTIONAL
If your distortion- or blendmap are named different from the standard naming scheme, you can define the names explicit insinde the XML <module> entry (parallel to the XML <distortion> entry):

<module name="distortion" enabled="yes">
  <distortion ...></distortion>
  <distortionmap filename="yourDistmap.png"></distortionmap>
  <blendmap filename="yourBlendmap.png"></blendmap>
</module>

Sky Silverlining

Currently sky_silverlining has no module dependend configuration. It only allows to enable or disable the sky framework.
The XML entry is:

<module name="sky_silverlining" enabled="yes"></module>

Vista 2D

The vista2D module works, but regarding to its architecture the usage in OpenSceneGraph (and hence in osgVisual) is quite performance degrading. Nevertheless, for testing purposes or for prototype usage it is available.

In the XML Entry, you have to specify the vista2D project file and the position and zoom factor it should use. To enable the animation you have to enable the attribute "playanimation". You can control the background of the vista2D project by en- or disable the attribute "paintBackground".

<module name="vista2d" enabled="yes">
  <vista2d filename="D:\osgVisual\osgVisual\bin\altimeterSimple.v" paintBackground="no" position_x="1" position_y="1" zoom="1.0" playanimation="yes"></vista2d>
</module>