25 | | == distortion == |
| 25 | == Distortion == |
| 26 | 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. |
| 27 | The 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 | |
| 32 | The XML configuration is as followed: |
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 | | --> |
| 39 | </module> |
| 40 | }}} |
| 41 | |
| 42 | You 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 | |
| 49 | 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. |
| 50 | To 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]] |
| 53 | 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): |
| 54 | {{{ |
| 55 | #!xml |
| 56 | <module name="distortion" enabled="yes"> |
| 57 | <distortion ...></distortion> |
| 58 | <distortionmap filename="yourDistmap.png"></distortionmap> |
| 59 | <blendmap filename="yourBlendmap.png"></blendmap> |