Hello Michael,
On 05/07/2013 02:57 AM, Michael Raab wrote:
> we have the problem that the combination of stereo rendering and
> osg::Skybackground produces inadequate results. The sky background gets
> rendered with large disparties as the same camera settings/decorators
> are used for both the scene rendering and the background rendering. In
> my opinion the Skybackground should be excluded from stereo as it should
> be indefinitely far away from the user. On the other hand some camera
> decorators need to be applied (if present) such as
> ProjectionCameraDecorator or TileCameraDecorator. I already looked at
> the code in osg::SkyBackground::clear() but I have no clue how
> differentiate there! Any ideas?
hmm, the SkyBackground removes the translation component from the
modelview matrix. So for a stereo setup where the cameras are shifted a
bit to the right/left and use skewed frustra the Background should
produce the same image on both cameras (we have an application based on
OpenSG 2 that uses the SkyBackground with Stereo in a 3-sided projection).
As far as differentiating goes: you'll probably have to test (using
dcast()) the action's camera if it is in fact a CameraDecorator and
possibly walk the chain of decoratees until you arrive at a real camera.
Having to also check for specific types of decorators that need special
handling can get messy quickly though - we've tried to avoid this if
possible, but the tile decorator for example often needs special handling.
Cheers,
Carsten
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users