Re: [osg-users] Some pictures?
Hi. Be the first to patch it up! 2016-02-02 21:33 GMT+07:00 anatoly techtonik : > Hi, > > There is a good page explaining what OSG is: > > index.php/documentation/knowledge-base/36-what-is-a-scene-graph (can't > post full links to this forum) > > but the page doesn't have any pictures! Why? Are any tools there to > express and work with that graph in a visual form? > > Thank you! > > Cheers, > anatoly > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=66176#66176 > > > > > > ___ > 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] LineOfSight intersection returning geometry
So if you have a large piece of geometry like terrain or ocean is simply a case of setting the right mask on the root node of this large geometry to avoid or allow intersections? Or do you have set the mask on all the pieces of said large geometry? Tony V -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66187#66187 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Some pictures?
Hi, There is a good page explaining what OSG is: index.php/documentation/knowledge-base/36-what-is-a-scene-graph (can't post full links to this forum) but the page doesn't have any pictures! Why? Are any tools there to express and work with that graph in a visual form? Thank you! Cheers, anatoly -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66176#66176 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Viewing Stacked Semi-Transparent Geodes
Hi everybody! I have two geodes, each is a flat circular disk with some circular holes removed. Each geode is flat in the YZ plane, and they are stacked against each other with a small amount of spacing, centered at (x1, 0, 0) and (x2, 0, 0). There is a single parent matrix transform node that is the parent of both of these geodes, and I use the matrix transform to set different rotations. Each of these disk geodes is semi-transparent by means of calling setAlpha on their materials for the FRONT_AND_BACK faces. The problem is that at certain parent matrix transform rotations certain parts of the first disk are more visually prevalent and at other rotations certain parts of the second disk are more visually prevalent, i.e. how these two semi-transparent geodes are viewed against each other changes based on the rotation of the parent matrix transform. I've attached two images to show you the difference. What is causing this effect and how can I eliminate it? I want it to look the same no matter what the rotation of the parent matrix transform is. Thanks in advance for any help! Cheers, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66186#66186 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer/Renderer ctor set wrong defaults for SceneView
Am 03.02.2016 um 12:43 schrieb Robert Osfield: I suspect this is an issue with your application not setting the correct global state in the viewer's master Camera. This issue was discussed a great deal before and shortly after the 3.2 release, but as you are just upgrading you have obviously missed this discussion. There was a bug prior to OSG-3.2 where SceneView would discard global StateSet values overwritting them with it's won global defaults. The bug fix addressed this problem so users could set the viewer's Camera's StateSet and have this settings reflected in the scene. While this change does fix a bug it inadvertently exposed a bug in applications where they create their own osg::Camera without setting any global default state then apply this directly to the viewer. This new osg::Camera then doesn't set any the defaults that are normally assumed to be enabled such as depth test and alpha blending etc. The View(er) by default actually calls StateSet::setGlobalDefaults() but this is done at intiialization of the View(er) so if you then replace the View(er)'s Camera then you replace the one with the state set up with some sensible global defaults with one with no StateSet set up. The fix is to either just reuse the View(er)'s Camera rather than replace it, or if do replace it call: viewer.getCamera()->getOrCreateStateSet()->setGlobalDefaults(); Hi Robert, this was the problem. Thanks for your fast help. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer/Renderer ctor set wrong defaults for SceneView
Hi Christian, On 3 February 2016 at 10:32, Christian Ehrlicher wrote: > Hi, > > I thought svn is the master, and not git. The git commit-id is > eb7929b85ad87316a2437da03b4bb810cded7366 - it's between osg3.1.8 and 3.1.9 Thanks. Git it now the master, we moved over not long ago. > The problem we've is that mostly all of our models in the terrain are > displayed transparent in the middle of the screen when using osgViewer > class. Using the osgviewer executable all looks find so I assume osgviewer > does not use osgViewer class. I suspect this is an issue with your application not setting the correct global state in the viewer's master Camera. This issue was discussed a great deal before and shortly after the 3.2 release, but as you are just upgrading you have obviously missed this discussion. There was a bug prior to OSG-3.2 where SceneView would discard global StateSet values overwritting them with it's won global defaults. The bug fix addressed this problem so users could set the viewer's Camera's StateSet and have this settings reflected in the scene. While this change does fix a bug it inadvertently exposed a bug in applications where they create their own osg::Camera without setting any global default state then apply this directly to the viewer. This new osg::Camera then doesn't set any the defaults that are normally assumed to be enabled such as depth test and alpha blending etc. The View(er) by default actually calls StateSet::setGlobalDefaults() but this is done at intiialization of the View(er) so if you then replace the View(er)'s Camera then you replace the one with the state set up with some sensible global defaults with one with no StateSet set up. The fix is to either just reuse the View(er)'s Camera rather than replace it, or if do replace it call: viewer.getCamera()->getOrCreateStateSet()->setGlobalDefaults(); Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] disable shadow for special camera or view
Hi, I know how off/on shadow for nodes,but... how can I disable shadow for special camera or view in compositeviewer? Thank you! Cheers, Peiman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66183#66183 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgViewer/Renderer ctor set wrong defaults for SceneView
Hi, I thought svn is the master, and not git. The git commit-id is eb7929b85ad87316a2437da03b4bb810cded7366 - it's between osg3.1.8 and 3.1.9 The problem we've is that mostly all of our models in the terrain are displayed transparent in the middle of the screen when using osgViewer class. Using the osgviewer executable all looks find so I assume osgviewer does not use osgViewer class. Christian Gesendet: Mittwoch, 03. Februar 2016 um 11:19 Uhr Von: "Robert Osfield" An: "OpenSceneGraph Users" Betreff: Re: [osg-users] osgViewer/Renderer ctor set wrong defaults for SceneView Hi Christian, I can't figure out exactly what change you are talking about, could you have a look at the the github page to figure out the commit that is relevant. Also could you explain the problems you are seeing in your application, which version of the OSG worked, which ones now fail. Thanks, Robert. On 3 February 2016 at 09:33, Christian Ehrlicher wrote: > Hi, > > in r13604 osgUtils/SceneView got a new default value for > SceneView::setDefaults(): > > Added SceneView::Options enum enetries APPLY_GLOBAL_DEFAULTS and > CLEAR_GLOBAL_STATESET to control whether a _globalStateSet->clear() and > _globalStateSet->setGlobalDefaults() should be called. > > The problem seems to be that in osgViewer/Renderer.cpp those new enum values > are not respected when sceneViewOptions for the scenes is calculated: > > Renderer.cpp:399 > > unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT; > if (view) > { > switch(view->getLightingMode()) > { > case(osg::View::NO_LIGHT): sceneViewOptions = 0; break; > case(osg::View::SKY_LIGHT): sceneViewOptions = > osgUtil::SceneView::SKY_LIGHT; break; > case(osg::View::HEADLIGHT): sceneViewOptions = > osgUtil::SceneView::HEADLIGHT; break; > } > } > ... > _sceneView[0]->setDefaults(sceneViewOptions); > _sceneView[1]->setDefaults(sceneViewOptions); > > > > This leads to a broken Scene in our application. As I've no idea about the > internals of osg (I just searched this bug) I hope this is enough to fix the > problem. > > > > Thx, > > Christian Ehrlicher > > > ___ > 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] osgViewer/Renderer ctor set wrong defaults for SceneView
Hi Christian, I can't figure out exactly what change you are talking about, could you have a look at the the github page to figure out the commit that is relevant. Also could you explain the problems you are seeing in your application, which version of the OSG worked, which ones now fail. Thanks, Robert. On 3 February 2016 at 09:33, Christian Ehrlicher wrote: > Hi, > > in r13604 osgUtils/SceneView got a new default value for > SceneView::setDefaults(): > > Added SceneView::Options enum enetries APPLY_GLOBAL_DEFAULTS and > CLEAR_GLOBAL_STATESET to control whether a _globalStateSet->clear() and > _globalStateSet->setGlobalDefaults() should be called. > > The problem seems to be that in osgViewer/Renderer.cpp those new enum values > are not respected when sceneViewOptions for the scenes is calculated: > > Renderer.cpp:399 > > unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT; > if (view) > { > switch(view->getLightingMode()) > { > case(osg::View::NO_LIGHT): sceneViewOptions = 0; break; > case(osg::View::SKY_LIGHT): sceneViewOptions = > osgUtil::SceneView::SKY_LIGHT; break; > case(osg::View::HEADLIGHT): sceneViewOptions = > osgUtil::SceneView::HEADLIGHT; break; > } > } > ... > _sceneView[0]->setDefaults(sceneViewOptions); > _sceneView[1]->setDefaults(sceneViewOptions); > > > > This leads to a broken Scene in our application. As I've no idea about the > internals of osg (I just searched this bug) I hope this is enough to fix the > problem. > > > > Thx, > > Christian Ehrlicher > > > ___ > 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] osgViewer/Renderer ctor set wrong defaults for SceneView
Hi, in r13604 osgUtils/SceneView got a new default value for SceneView::setDefaults(): Added SceneView::Options enum enetries APPLY_GLOBAL_DEFAULTS and CLEAR_GLOBAL_STATESET to control whether a _globalStateSet->clear() and _globalStateSet->setGlobalDefaults() should be called. The problem seems to be that in osgViewer/Renderer.cpp those new enum values are not respected when sceneViewOptions for the scenes is calculated: Renderer.cpp:399 unsigned int sceneViewOptions = osgUtil::SceneView::HEADLIGHT; if (view) { switch(view->getLightingMode()) { case(osg::View::NO_LIGHT): sceneViewOptions = 0; break; case(osg::View::SKY_LIGHT): sceneViewOptions = osgUtil::SceneView::SKY_LIGHT; break; case(osg::View::HEADLIGHT): sceneViewOptions = osgUtil::SceneView::HEADLIGHT; break; } } ... _sceneView[0]->setDefaults(sceneViewOptions); _sceneView[1]->setDefaults(sceneViewOptions); This leads to a broken Scene in our application. As I've no idea about the internals of osg (I just searched this bug) I hope this is enough to fix the problem. Thx, Christian Ehrlicher ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org