well, thanks for answering,
actually, the image gets distorted... Just to highlight, we're using camera
space coordinates.. so, the plane corners are something like
OSG::Pnt3f( -w, -h, -near );
OSG::Pnt3f( w, -h, -near );
OSG::Pnt3f( w, h, -near );
OSG::Pnt3f( -w, h, -near );
where w and h measure both half the size of width and height of my
projection plane in camera space.. so, they map each corner of the
projection plane.. we set those very same corners for both decorators... as
follow:
_decoLeft = OSG::ProjectionCameraDecorator::create();
_decoLeft->setDecoratee( _mainCamera );
_decoLeft->setLeftEye( true );
_decoLeft->setEyeSeparation( 0.06f );
_decoLeft->editMFSurface()->push_back( OSG::Pnt3f( -w, -h, -near )
);
_decoLeft->editMFSurface()->push_back( OSG::Pnt3f( w, -h, -near )
);
_decoLeft->editMFSurface()->push_back( OSG::Pnt3f( w, h, -near )
);
_decoLeft->editMFSurface()->push_back( OSG::Pnt3f( -w, h, -near )
);
_decoLeft->setUser( userNode );
_leftViewport->setCamera( _decoLeft );
_decoRight = OSG::ProjectionCameraDecorator::create();
_decoRight->setDecoratee( _mainCamera );
_decoRight->setLeftEye( false );
_decoRight->setEyeSeparation( 0.06f );
_decoRight->editMFSurface()->push_back( OSG::Pnt3f( -w, -h, -near )
);
_decoRight->editMFSurface()->push_back( OSG::Pnt3f( w, -h, -near )
);
_decoRight->editMFSurface()->push_back( OSG::Pnt3f( w, h, -near )
);
_decoRight->editMFSurface()->push_back( OSG::Pnt3f( -w, h, -near )
);
_decoRight->setUser( userNode );
_rightViewport->setCamera( _decoRight );
this produces distorted images... any hints?
thanks
On Fri, Feb 26, 2010 at 2:17 PM, Dirk Reiners <dirk.rein...@gmail.com>wrote:
> Hi Pablo,
>
> On Fri, Feb 26, 2010 at 11:23 AM, Pablo Carneiro Elias
> <pablo.c...@gmail.com> wrote:
> > Thanks,
> >
> > well, in my test here I set user transform as identity... Im trying to
> > render the scene using stereo with 2 viewports, each one with is own
> > decorator and a single plane wich is the camera space coordinates of the
> > projection plane placed at distance= - near ... shouldn't it work?
> Actually,
> > im trying to use projection decorators without headtraking for now..
> setting
> > user as identity... whats wrong with this picture?
>
> sounds fine. What do you see that you don't expect? Can you put o\up
> screenshots somewhere?
>
> Dirk
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Opensg-users mailing list
> Opensg-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users