Hi Alexandre, Thanks for the updated example and screenshot, this makes it much clearer. I'm fixing another bug right now, but once that is complete I'll have another look at this example.
Robert. On Mon, Jan 26, 2009 at 4:32 PM, Alexandre Amalric <[email protected]> wrote: > Hi Robert, > > Well I attached new version from my sample file. > > If you launch sample file without argument you should see > no_slave_camera.png. > > If you launch with argument "--addslave", it's activate a piece of code wich > add a slave camera to an osg::View and you'll see attached screenshot > with_slave_camera.png. > > You see that in with_slave_camera.png screenshot there's no light, because > of adding this slave camera to the view. > > Maybe like you said it's only an incorrect usage from slave cameras but It > will be nice if you confirm that I'm mistaken if it's. > > 2009/1/26 Robert Osfield <[email protected]> >> >> HI Alexandre, >> >> I read your explanation but am still am confused. Could you modify >> the code so that you use a command line argument to add/remove the >> code this will make it easy to test the two configuration without >> recompile. >> >> As for it being a serious issue, well it could well still be an >> incorrect usage issue rather than a bug. Could you explain by what >> you mean by corrupt. >> >> Robert. >> >> On Mon, Jan 26, 2009 at 4:04 PM, Alexandre Amalric >> <[email protected]> wrote: >> > Hi Robert, >> > >> > I'm sorry If my explanation wasn't clear enough but it seems to be to be >> > a >> > serious issue so I will take more time to make myself clear. >> > >> > In the file osgLight.cpp previously attached there is a piece of code in >> > main function at line 397 to 400 : >> > >> > /////////////////////////////////////////// >> > // SLAVE CAM REMOVE LIGHT >> > osg::ref_ptr<osg::Camera> camera = new osg::Camera; >> > camera->setGraphicsContext(view->getCamera()->getGraphicsContext()); >> > camera->setViewport(new osg::Viewport(0, 0 , traits->width/2, >> > traits->height/2)); >> > view->addSlave(camera.get(), osg::Matrixd(), osg::Matrixd()); >> > /////////////////////////////////////////// >> > >> > If you launch this sample file by this piece of code the scene is well >> > lighted, but if you try to launch the same file without commenting those >> > lines, the scene isn't well lighted. >> > >> > It seems to me that when we add a slave camera to an osg::View the >> > lighting >> > from the scene is corrupt. >> > >> > I hope I was clear enough. >> > >> > Kind regards, >> > >> > 2009/1/26 Robert Osfield <[email protected]> >> >> >> >> HI Alexandre, >> >> >> >> I can't find the code you are referring to in the osglight.cpp you >> >> provided. >> >> >> >> I'm afraid I really don't understand what you are trying to achieve, >> >> and what is happening that is wrong. Given this there is nothing I >> >> can do till you provide a clear example code and a better explanation. >> >> >> >> Robert. >> >> >> >> On Mon, Jan 26, 2009 at 8:29 AM, Alexandre Amalric >> >> <[email protected]> wrote: >> >> > Hi osg-users, >> >> > >> >> > I recently have found something weird about adding slave camera to >> >> > osgViewer::View when managing my own lightning. >> >> > >> >> > I'm using OSG SVN version. >> >> > >> >> > I derived osgLight example to show you my problem, please compile >> >> > attached >> >> > code with uncommenting following lines : >> >> > // Adding slave camera, uncomment to show bug !! >> >> > and you'll see that lighting has disappear... >> >> > >> >> > when you remove comments scene isn't lighted has expected because of >> >> > adding >> >> > slave camera... >> >> > >> >> > Kind regards, >> >> > >> >> > -- >> >> > Alexandre AMALRIC Ingénieur R&D >> >> > =================================== >> >> > PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille >> >> > http://www.pixxim.fr >> >> > >> >> > _______________________________________________ >> >> > osg-users mailing list >> >> > [email protected] >> >> > >> >> > >> >> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> > >> >> > >> >> _______________________________________________ >> >> osg-users mailing list >> >> [email protected] >> >> >> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >> > >> > >> > -- >> > Alexandre AMALRIC Ingénieur R&D >> > =================================== >> > PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille >> > http://www.pixxim.fr >> > >> > _______________________________________________ >> > osg-users mailing list >> > [email protected] >> > >> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> > >> > >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > -- > Alexandre AMALRIC Ingénieur R&D > =================================== > PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille > http://www.pixxim.fr > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

