Changes between Version 6 and Version 7 of XmlModuleConfiguration


Ignore:
Timestamp:
Feb 18, 2011, 5:17:28 PM (13 years ago)
Author:
Torben Dannhauer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • XmlModuleConfiguration

    v6 v7  
    2323}}}
    2424
    25 == distortion ==
     25== Distortion ==
     26You 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.
     27The distortion requires three files:
     28 * distort_<channelname>.bmp: The distortion map, with the distortion vector encoded in the RGB values of each pixel of the distortion map.
     29 * blend_<channelname>.bmp: The blend map which contains the soft edge blending mask for seamless blending between video projectors.
     30 * 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").
     31
     32The XML configuration is as followed:
    2633{{{
    2734#!xml
    2835<module name="distortion" enabled="no">
    29   <!-- XML configuration of the module "distortion"
    30     channelname = name of the channel, used to load the distortion- and blendmaps
    31     renderimplementation = technique to distort.
    32     Available options:
    33         fbo : renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT
    34         pbuffer : renderImplementation = osg::Camera::PIXEL_BUFFER
    35         pbuffer-rtt :  renderImplementation = osg::Camera::PIXEL_BUFFER_RTT
    36         fb : renderImplementation = osg::Camera::FRAME_BUFFER
    37         window : renderImplementation = osg::Camera::SEPERATE_WINDOW
    38   -->
    3936  <distortion channelname="center" renderimplemmentation="fbo" width="2048" height="2048" useshader="yes" hdr="yes" usetexturerectangle="no"></distortion>
    4037  <!-- optional: <distortionmap filename="distmap.png"></distortionmap> to set distortionmap independend from channel map-->
    4138  <!-- optional: <blendmap filename="blendmap.png"></blendmap> to set blendmap independend from channel map -->
     39</module>
     40}}}
     41
     42You can select the technique which should be used to distort the images. The available renderImplementations are:
     43 * fbo : renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT
     44 * pbuffer : renderImplementation = osg::Camera::PIXEL_BUFFER
     45 * pbuffer-rtt :  renderImplementation = osg::Camera::PIXEL_BUFFER_RTT
     46 * fb : renderImplementation = osg::Camera::FRAME_BUFFER
     47 * window : renderImplementation = osg::Camera::SEPERATE_WINDOW
     48
     49You 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.
     50To distort HDR renderings enable the flag "hdr". The Flag "usetexturerectangle" indicated whether a texture rectangle should be used to display the distorted image.
     51
     52'''OPTIONAL'''[[br]]
     53If 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):
     54{{{
     55#!xml
     56<module name="distortion" enabled="yes">
     57  <distortion ...></distortion>
     58  <distortionmap filename="yourDistmap.png"></distortionmap>
     59  <blendmap filename="yourBlendmap.png"></blendmap>
    4260</module>
    4361}}}