[osg-users] Multi Projector edge blend and bend (distortion correction)

Robert Osfield robert.osfield at gmail.com
Wed Mar 11 09:40:08 PDT 2009

Hi John,

On Wed, Mar 11, 2009 at 4:20 PM, John Aughey <jha at aughey.com> wrote:
> I haven't thought through how the interface would look with osgViewer.  In
> my external implementation, I do have a class that holds on to the
> distortion geometry and allows new meshes to be given to change the pattern
> (for dynamic calibration).
> One thought is to have an osgViewer::DistortionManager class that could be
> retrieved through an osgView::getDistortionmanager() accessor method.  If a
> distortion system is created, it would be managed by the
> osgViewer::DistortionManager object and manipulated by getting that object
> through the osgViewer object.

One aspect that we might be able to leverage is that the Camera's that
are doing the distortion correction just contain standard OSG scene
graph that is built in a way that it contains a simple screen aligned
texture geometry.  Adjusting the distortion correction just comes down
to adjusting the geometry.  A "distortion manager" could just hang off
this distortion geometry subgraphs, or perhaps even be a custom node
that manages the subgraph for us.

One aspect you'd need to take into account is some distortion
correction techniques will take a single Texture2D as input while
others might require a Texture2DArray or a TextureCube (as in the case
of the panoramic subgraphs.)

Another little aspect to osgViewer and the .view ascii configuration
file format has been that my plan has been to serialize all viewer
cameras to a .view file, including any custom scene graphs they might
have.  This viewer configuration could then be reloaded to configure
the viewer.   Any "distortion manager" class we come up with would
need to capable of supporting serialization out to the .view
configuration file.  It's worth noting that the .view plugin just uses
the standard .osg ascii parsing code to do it's work, so embedded
standard nodes within it should be straight forward.


More information about the osg-users mailing list