Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Paul, There are several messages on the board that imply that INHERIT_RENDERBIN_DETAILS, when specified with a bin number, influences the CullVisitor to create a nested render order. I was under the impression that, if an application has a top-level rendering order over objects that it was possible to impose a rendering order over sub-elements of one of those objects. You see, we have polygons that occupy the same space, but we want the smaller ones to show up on top of the larger ones whenever possible. Is it not possible to do that, then? Seems like it would be something that OSG would want to allow. I'd prefer a solution that uses order, rather than some kind of polygon offset or funky state. John From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz Sent: Tuesday, June 10, 2008 8:05 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] INHERIT_RENDERBIN_DETAILS INHERIT_RENDERBIN-DETAILS tells the CullVisitor to ignore a StateSet's bin number and bin name, and instead simply keep using the current number/name. So, in your example, I'd think both Drawables would go into the same bin, and their order would be determined by the sorting associated with name RenderBin. Is that not what's happening? -Paul From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Tuesday, June 10, 2008 3:25 PM To: [EMAIL PROTECTED] Subject: [osg-users] INHERIT_RENDERBIN_DETAILS Robert, I'm not convinced that INHERIT_RENDERBIN_DETAILS does what it's supposed to do. I've done this: _group-getOrCreateStateSet()-setRenderBinDetails( 3, RenderBin ); _geode1-getOrCreateStateSet()-setRenderBinDetails( 1, RenderBin, osg::StateSet::INHERIT_RENDERBIN_DETAILS ); _geode2-getOrCreateStateSet()-setRenderBinDetails( 2, RenderBin, osg::StateSet::INHERIT_RENDERBIN_DETAILS ); _group-addChild( _geode1 ); _group-addChild( _geode2 ); _geode1-addDrawable( _draw1 ); _geode2-addDrawable( _draw2 ); And _draw2 gets drawn before _draw1. I know how much you love to read code on this forum, so dare I ask, can you tell me what I've done wrong, or is this a bug? John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
INHERIT_RENDERBIN-DETAILS tells the CullVisitor to ignore a StateSet's bin number and bin name, and instead simply keep using the current number/name. So, in your example, I'd think both Drawables would go into the same bin, and their order would be determined by the sorting associated with name RenderBin. Is that not what's happening? -Paul _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Tuesday, June 10, 2008 3:25 PM To: [EMAIL PROTECTED] Subject: [osg-users] INHERIT_RENDERBIN_DETAILS Robert, I'm not convinced that INHERIT_RENDERBIN_DETAILS does what it's supposed to do. I've done this: _group-getOrCreateStateSet()-setRenderBinDetails( 3, RenderBin ); _geode1-getOrCreateStateSet()-setRenderBinDetails( 1, RenderBin, osg::StateSet::INHERIT_RENDERBIN_DETAILS ); _geode2-getOrCreateStateSet()-setRenderBinDetails( 2, RenderBin, osg::StateSet::INHERIT_RENDERBIN_DETAILS ); _group-addChild( _geode1 ); _group-addChild( _geode2 ); _geode1-addDrawable( _draw1 ); _geode2-addDrawable( _draw2 ); And _draw2 gets drawn before _draw1. I know how much you love to read code on this forum, so dare I ask, can you tell me what I've done wrong, or is this a bug? John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Hi John -- Can you post an .osg file that demonstrates the problem in osgviewer? -Paul Robert, We are using getOrCreateStateSet()-setRenderBinDetails. What we have is this: osg::group1-osg::group2-osg::group3-osg::geode-osg::geomet ry, where group3 contains multiple geode-geometry children. group3 has setRenderBinDetails called without specifying INHERIT_RENDERBIN_DETAILS, Which means it is setting to USE_RENDERBIN_DETAILS by default, correct? geode has setRenderBinDetails called, specifying INHERIT_RENDERBIN_DETAILS. None of the other stuff has renderbin details set in the statesets, HOWEVER, there may be other statesets in the chain that do exist (I call getOrCreate). Maybe they all exist regardless of whether I call getOrCreate, but I am not sure of this. The geode/geometry subtrees also have a texture associated with them. They also have GL_DEPTH_TEST disabled, so that we should see the most recently drawn (highest renderbin #) when two geometries overlap or would normally conceal one another. This is not what's happenning however. Any ideas why this might be the case? I have been over the code and I'm quite sure that I've described the situation more accurately. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Robert, We are using getOrCreateStateSet()-setRenderBinDetails. What we have is this: osg::group1-osg::group2-osg::group3-osg::geode-osg::geometry, where group3 contains multiple geode-geometry children. group3 has setRenderBinDetails called without specifying INHERIT_RENDERBIN_DETAILS, Which means it is setting to USE_RENDERBIN_DETAILS by default, correct? geode has setRenderBinDetails called, specifying INHERIT_RENDERBIN_DETAILS. None of the other stuff has renderbin details set in the statesets, HOWEVER, there may be other statesets in the chain that do exist (I call getOrCreate). Maybe they all exist regardless of whether I call getOrCreate, but I am not sure of this. The geode/geometry subtrees also have a texture associated with them. They also have GL_DEPTH_TEST disabled, so that we should see the most recently drawn (highest renderbin #) when two geometries overlap or would normally conceal one another. This is not what's happenning however. Any ideas why this might be the case? I have been over the code and I'm quite sure that I've described the situation more accurately. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, December 12, 2007 2:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] INHERIT_RENDERBIN_DETAILS Hi John I'm afraid there is too little info provided to know what might be up and how to fix it. StateSet::RenderBinDetails is what should be used to control overall draw order, but you make not mention of this. Robert. On Dec 12, 2007 7:08 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Hello all. We are using inherit renderbin details to assign a nested set of priorities. We have a group node with a top-level priority which contains several geodes with priorities using the inherit flag. Each of the geodes has a textured polygon geometry. We want to have the polygons depth test disabled and drawn in a certain order so that they will show the last drawn on top. OSG is not drawing these in order as it should. Any ideas what the problem might be? We haven't used the override renderbin details flag anywhere, so it is bizarre that things are happening this way. We can turn on blending and lower the alphas and see that both our polygons are there. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Paul, That's not so easy to do, but I will try to create an osgViewer app that hard-codes a scenegraph that duplicates the behaviors we're seeing over the weekend so I can provide the osg file. Right now we are using osgUtil::SceneViews, and not osgViewer. Thanks. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz Sent: Friday, December 14, 2007 11:20 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] INHERIT_RENDERBIN_DETAILS Hi John -- Can you post an .osg file that demonstrates the problem in osgviewer? -Paul Robert, We are using getOrCreateStateSet()-setRenderBinDetails. What we have is this: osg::group1-osg::group2-osg::group3-osg::geode-osg::geomet ry, where group3 contains multiple geode-geometry children. group3 has setRenderBinDetails called without specifying INHERIT_RENDERBIN_DETAILS, Which means it is setting to USE_RENDERBIN_DETAILS by default, correct? geode has setRenderBinDetails called, specifying INHERIT_RENDERBIN_DETAILS. None of the other stuff has renderbin details set in the statesets, HOWEVER, there may be other statesets in the chain that do exist (I call getOrCreate). Maybe they all exist regardless of whether I call getOrCreate, but I am not sure of this. The geode/geometry subtrees also have a texture associated with them. They also have GL_DEPTH_TEST disabled, so that we should see the most recently drawn (highest renderbin #) when two geometries overlap or would normally conceal one another. This is not what's happenning however. Any ideas why this might be the case? I have been over the code and I'm quite sure that I've described the situation more accurately. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Paul, That's not so easy to do, but I will try to create an osgViewer app that hard-codes a scenegraph that duplicates the behaviors we're seeing over the weekend so I can provide the osg file. Right now we are using osgUtil::SceneViews, and not osgViewer. Hm. You should be able to just add a call to osgDB::writeNodeFile( foo.osg ) to your existing application and post the output here. You don't need to use osgViewer to do this. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim Moore wrote: Argentieri, John-P63223 wrote: osg::group1-osg::group2-osg::group3-osg::geode-osg::geometry, where group3 contains multiple geode-geometry children. ... If you want the geodes to be drawn in a relative order, you have to setRenderBinDetails on them too, with the appropriate number in the order. It doesn't sound like you're doing that. That wasn't very clear. I meant setRenderBinDetails on their StateSets. Tim -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHYrNyeDhWHdXrDRURAslbAKCLVDVxeZDhCaO+KVswRx2z9IrcagCgx9D7 LyYTkLKsUjonoAXMRWLKbfs= =KJUw -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Argentieri, John-P63223 wrote: Robert, We are using getOrCreateStateSet()-setRenderBinDetails. What we have is this: osg::group1-osg::group2-osg::group3-osg::geode-osg::geometry, where group3 contains multiple geode-geometry children. group3 has setRenderBinDetails called without specifying INHERIT_RENDERBIN_DETAILS, Which means it is setting to USE_RENDERBIN_DETAILS by default, correct? geode has setRenderBinDetails called, specifying INHERIT_RENDERBIN_DETAILS. None of the other stuff has renderbin details set in the statesets, HOWEVER, there may be other statesets in the chain that do exist (I call getOrCreate). Maybe they all exist regardless of whether I call getOrCreate, but I am not sure of this. The geode/geometry subtrees also have a texture associated with them. They also have GL_DEPTH_TEST disabled, so that we should see the most recently drawn (highest renderbin #) when two geometries overlap or would normally conceal one another. This is not what's happenning however. Any ideas why this might be the case? I have been over the code and I'm quite sure that I've described the situation more accurately. If you want the geodes to be drawn in a relative order, you have to setRenderBinDetails on them too, with the appropriate number in the order. It doesn't sound like you're doing that. Tim -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHYrHBeDhWHdXrDRURAq0qAKDEB9PWXr85UIIdR6own7bIQTfA+QCg3ovt XfwXEcua0KfRfP4X/M5paIc= =vFy+ -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] INHERIT_RENDERBIN_DETAILS
Hi John I'm afraid there is too little info provided to know what might be up and how to fix it. StateSet::RenderBinDetails is what should be used to control overall draw order, but you make not mention of this. Robert. On Dec 12, 2007 7:08 PM, Argentieri, John-P63223 [EMAIL PROTECTED] wrote: Hello all. We are using inherit renderbin details to assign a nested set of priorities. We have a group node with a top-level priority which contains several geodes with priorities using the inherit flag. Each of the geodes has a textured polygon geometry. We want to have the polygons depth test disabled and drawn in a certain order so that they will show the last drawn on top. OSG is not drawing these in order as it should. Any ideas what the problem might be? We haven't used the override renderbin details flag anywhere, so it is bizarre that things are happening this way. We can turn on blending and lower the alphas and see that both our polygons are there. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ 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] INHERIT_RENDERBIN_DETAILS
Hi -- Not sure what you mean by priority. The render bin number specifies relative drawing order of sibling Nodes and Drawables. If each of your Geodes' Drawables must get drawn in a certain order, then you should set the render bin number on the StateSet of each Geode's render bin; Drawables will be rendered in ascending render bin number order. -Paul _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Wednesday, December 12, 2007 12:08 PM To: OpenSceneGraph Users Subject: [osg-users] INHERIT_RENDERBIN_DETAILS Hello all. We are using inherit renderbin details to assign a nested set of priorities. We have a group node with a top-level priority which contains several geodes with priorities using the inherit flag. Each of the geodes has a textured polygon geometry. We want to have the polygons depth test disabled and drawn in a certain order so that they will show the last drawn on top. OSG is not drawing these in order as it should. Any ideas what the problem might be? We haven't used the override renderbin details flag anywhere, so it is bizarre that things are happening this way. We can turn on blending and lower the alphas and see that both our polygons are there. John Argentieri Software Engineer GENERAL DYNAMICS C4 Systems (407) 281-5568 [EMAIL PROTECTED] This email message is for the sole use of the intended recipient(s) and may contain GDC4S confidential or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not an intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org