Re: [osg-users] Clipping planes for slave camera
Slave camera relies on main camera matrix and matrix offset, so it's meaningless to set their matrix. By contrast, view camera is independent of other view. 在 2011-9-27,23:05,"He, Yefei" 写道: > Thanks, Robert, I'll take a look at the examples. Another question: in a > composite viewer, if I set the view and projection matrices directly on the > slave camera, what are the internal differences between doing this and simply > creating another view and setting the view and projection matrices of its > camera? I'm trying to set up a composite viewer with multiple views of the > same scenegraph. I noticed that the main view (the first view added to the > composite viewer) and its slave cameras all render properly, but in the > contents of the other views, the depth sorting is incorrect, most noticeably > the skydome obscures a lot of faces that should be in front of the skydome. > > Yefei > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert > Osfield > Sent: Tuesday, September 27, 2011 3:16 AM > To: OpenSceneGraph Users > Subject: Re: [osg-users] Clipping planes for slave camera > > Hi Yefei, > > On Mon, Sep 26, 2011 at 9:20 PM, He, Yefei wrote: >> Is it possible for a slave camera to have different near and far >> clipping planes from the master camera? Are there examples for it? I >> figure it will be more complicated than changing the angle of view or >> adding a shear to the view frustum. > > You have assign different projection matrices to the slave camera either by > setting the projection offset matrix for the slave and keeping the slave > Camera's ReferenceFrame set to RELATIVE_RF (relative the master Camera) or by > setting the view and projection matrices directly on the slave Camera and > setting the ReferenceFrame to ABSOLUTE_RF. > > There isn't a specific example that illustrates what you want but the osghud > and osgdistortion examples should give you an idea of the different things > you can. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Clipping planes for slave camera
Thanks, Robert, I'll take a look at the examples. Another question: in a composite viewer, if I set the view and projection matrices directly on the slave camera, what are the internal differences between doing this and simply creating another view and setting the view and projection matrices of its camera? I'm trying to set up a composite viewer with multiple views of the same scenegraph. I noticed that the main view (the first view added to the composite viewer) and its slave cameras all render properly, but in the contents of the other views, the depth sorting is incorrect, most noticeably the skydome obscures a lot of faces that should be in front of the skydome. Yefei -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Tuesday, September 27, 2011 3:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Clipping planes for slave camera Hi Yefei, On Mon, Sep 26, 2011 at 9:20 PM, He, Yefei wrote: > Is it possible for a slave camera to have different near and far > clipping planes from the master camera? Are there examples for it? I > figure it will be more complicated than changing the angle of view or > adding a shear to the view frustum. You have assign different projection matrices to the slave camera either by setting the projection offset matrix for the slave and keeping the slave Camera's ReferenceFrame set to RELATIVE_RF (relative the master Camera) or by setting the view and projection matrices directly on the slave Camera and setting the ReferenceFrame to ABSOLUTE_RF. There isn't a specific example that illustrates what you want but the osghud and osgdistortion examples should give you an idea of the different things you can. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Clipping planes for slave camera
Hi Yefei, On Mon, Sep 26, 2011 at 9:20 PM, He, Yefei wrote: > Is it possible for a slave camera to have different near and far clipping > planes from the master camera? Are there examples for it? I figure it will > be more complicated than changing the angle of view or adding a shear to the > view frustum. You have assign different projection matrices to the slave camera either by setting the projection offset matrix for the slave and keeping the slave Camera's ReferenceFrame set to RELATIVE_RF (relative the master Camera) or by setting the view and projection matrices directly on the slave Camera and setting the ReferenceFrame to ABSOLUTE_RF. There isn't a specific example that illustrates what you want but the osghud and osgdistortion examples should give you an idea of the different things you can. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Clipping planes for slave camera
Hi, Robert, Is it possible for a slave camera to have different near and far clipping planes from the master camera? Are there examples for it? I figure it will be more complicated than changing the angle of view or adding a shear to the view frustum. Thanks, Yefei ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org