[osg-users] osgOcean in CompositeViewer with multiple views
kcbale at googlemail.com
Sun Apr 17 08:05:10 PDT 2011
Firstly thanks for the recent set of commits, much appreciated.
Now onto your problem. I had a feeling that that there would be problems
when using osgOcean with multiple views, largely because of the LOD system
that it employs relying on the main camera. I've had a play with your
composite viewer code and what I don't understand is why the reflection pass
renders correctly in both views but not the refraction pass, they both use
the same view matrix and despite the multiple render targets their
implementations are the same.
I wonder if it could be to do with the way that I get the current camera:
osg::Camera* currentCamera =
I understood this to take the view matrix from the root (main) camera but
I'm unsure how it behaves with multiples views. But again since the
reflection pass appears to work the same in both views I don't understand
why this should differ for the refraction pass.
My only experience with a multiview camera setup and FBOs is when I wrote an
order independent transparency effect for a stereo work wall. In that case I
discovered that I had to duplicate all FBOs for each eye otherwise it would
simply take the last view that was rendered, that effect was simply
rendering to a fullscreen quad though. When I was thinking about how to get
osgOcean to work in stereo I came to the conclusion that I would need to
implement a similar solution.
Ultimately I think the ViewData approach you suggested is sound, it sounds
like the solution mentioned above and I'm pretty sure it's needed to get the
post processing effects to work as well. But I would be keen to dig a bit
deeper to figure out why reflections work but refractions don't as this
sounds like a bug somewhere.
In the mean time I'll knock up a little test application to test the
behaviour of FBOs and multiple views.
Let me know your thoughts.
On 15 April 2011 13:48, Jean-Sébastien Guay <jean-sebastien.guay at cm-labs.com
> Hi all,
> I'll be thankful for any comments / suggestions.
> One full day and no suggestions, so I'll assume that my idea of using an
> approach similar to the ViewDependentShadow techniques (with ViewData) is in
> the right vein, and I think I'll start working on that.
> I'd still appreciate any input on these issues.
> Jean-Sebastien Guay jean-sebastien.guay at cm-labs.com
> osg-users mailing list
> osg-users at lists.openscenegraph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users