Re: [osg-users] Dragger rendering issue
Hi Ruqin, Which version of OSG are you building my example against? It sounds like you may be having the 'subgraph relative camera problem' I hinted at below. This problem can affect the location and picking of things below the subgraph camera, so you won't be able to use the example with an unmodified OSG2.6 I think Robert put in a fix to help with this after OSG 2.6 but I can't remember the detail. I could probably did out the OSG changes required if necessary, but best to avoid patching OSG if possible. Cheers. Chris. - Original Message - From: Ruqin Zhang To: Chris Denham ; OpenSceneGraph Users Sent: Friday, February 13, 2009 10:56 PM Subject: Re: [osg-users] Dragger rendering issue Hi Chris, Thanks for the example code. It's really good that I can see the dragger rendered on top of the scene. While, seems I cannot move or even juct select the dragger. Is there any problem with it? Anyone know the problem? Thanks a lot! Ruqin On Wed, Jan 28, 2009 at 3:46 AM, Chris Denham wrote: Hi Ruqin, I have attached an example VC2005 project that I put together whilst working on this. At some point I'd like to formally submit it as an example to OSG but it probably needs a bit more 'polishing' before Robby would be let in ;-). I built the example against a modified OSG 2.6 so you may need to build against the trunk to get the fix for subgraph relative camara problems. But in any case, I hope the source code gives you food for thought. Note that if you get my example to work, the translate, rotate and scale draggers are activated by pressing 'w' 'e' 'r' respectively, and view rotation is enabled by holding down alt key. My objective in the project was to create an interface similar to my favourite 3D modelling pakage... Maya. Chris.___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hi Chris, Thanks for the example code. It's really good that I can see the dragger rendered on top of the scene. While, seems I cannot move or even juct select the dragger. Is there any problem with it? Anyone know the problem? Thanks a lot! Ruqin On Wed, Jan 28, 2009 at 3:46 AM, Chris Denham wrote: > Hi Ruqin, > I have attached an example VC2005 project that I put together whilst > working on this. > At some point I'd like to formally submit it as an example to OSG but it > probably needs a bit more 'polishing' before Robby would be let in ;-). > I built the example against a modified OSG 2.6 so you may need to build > against the trunk to get the fix for subgraph relative camara problems. > But in any case, I hope the source code gives you food for thought. > Note that if you get my example to work, the translate, rotate and scale > draggers are activated by pressing 'w' 'e' 'r' respectively, and view > rotation is enabled by holding down alt key. My objective in the project was > to create an interface similar to my favourite 3D modelling pakage... Maya. > Chris. > > - Original Message - > *From:* Ruqin Zhang > *To:* Chris Denham > *Cc:* osg-users@lists.openscenegraph.org > *Sent:* Tuesday, January 27, 2009 11:29 PM > *Subject:* Re: [osg-users] Dragger rendering issue > > Hi Chris, can I have a look of the chunk of code you mentioned? Thanks a > lot! > > Ruqin > > On Tue, Jan 27, 2009 at 11:04 AM, Chris Denham wrote: > >> Have you tried my earlier suggestion?i.e. adding a post render camera >> just above the dragger. >> Can be a bit fiddly to manage the scenegraph, so might be worth trying any >> other ideas first. >> But I can give you some code snippets if you want to try it. >> Chris. >> >> ----- Original Message - From: Ruqin Zhang >> To: Chris Denham ; osg-users@lists.openscenegraph.org >> Sent: Tuesday, January 27, 2009 4:45 PM >> >> Subject: Re: [osg-users] Dragger rendering issue >> >> >> Thank you guys! I tried the idea of turning off the depth test. It works >> ok but not perfect. Just as Chris mentioned, there is some rendering problem >> of the dragger geometries. Anyone has idea of solving this problem? Thanks >> again! >> >> Ruqin >> >> >> On Tue, Jan 27, 2009 at 9:20 AM, Chris Denham >> wrote: >> >> Hi Ruqin, >> Just wanted to add to this as Robert and JS suggested switching off the >> depth test for the dragger. >> I have actually tried that and found the results "less than ideal" for the >> normal dragger geometries. >> The problem is that the parts of the dragger geometries may not render >> correctly over each other with depth test off. >> Chris. >> >> - Original Message - From: "Chris Denham" >> To: >> Sent: Tuesday, January 27, 2009 9:33 AM >> Subject: Re: [osg-users] Dragger rendering issue >> >> >> >> Hi Ruqin, >> I had the same problem with Draggers, and the solution was to put the >> dragger object in the scenegraph below a post render camera. >> This works well for me as I can now also drag the selected object when it >> is behind other objects in the scene. To do this you may need a version of >> OSG later that 2.6 though, because I had some problems in relation to >> transforms and subgraph cameras which Robert helped me to fix. >> The other 'enhancement' I made was to add an autotransform node to keep >> the dragger geometry the same size on the screen regardless of the >> size/scale of the object. >> Chris. >> >> >> Date: Mon, 26 Jan 2009 17:47:44 -0600 >> From: Ruqin Zhang >> Subject: [osg-users] Dragger rendering issue >> To: OpenSceneGraph Users >> Message-ID: >> >> Content-Type: text/plain; charset="iso-8859-1" >> >> Hi, >> >> >> I got an issue about osgManipulator::dragger. When I set up a dragger, >> sometime it just hide (totally or partially) inside the selected object. >> So, >> I am wondering if there is some sort of way that I could always force the >> dragger rendered on top of the selected object to make it fully visible to >> user? Thanks a lot! >> >> >> Ruqin >> > > -- Research Assistant Human Computer Interaction Program Virtual Reality Applications Center(VRAC) Iowa State University ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hi Chris, can I have a look of the chunk of code you mentioned? Thanks a lot! Ruqin On Tue, Jan 27, 2009 at 11:04 AM, Chris Denham wrote: > Have you tried my earlier suggestion?i.e. adding a post render camera > just above the dragger. > Can be a bit fiddly to manage the scenegraph, so might be worth trying any > other ideas first. > But I can give you some code snippets if you want to try it. > Chris. > > - Original Message - From: Ruqin Zhang > To: Chris Denham ; osg-users@lists.openscenegraph.org > Sent: Tuesday, January 27, 2009 4:45 PM > > Subject: Re: [osg-users] Dragger rendering issue > > > Thank you guys! I tried the idea of turning off the depth test. It works ok > but not perfect. Just as Chris mentioned, there is some rendering problem of > the dragger geometries. Anyone has idea of solving this problem? Thanks > again! > > Ruqin > > > On Tue, Jan 27, 2009 at 9:20 AM, Chris Denham > wrote: > > Hi Ruqin, > Just wanted to add to this as Robert and JS suggested switching off the > depth test for the dragger. > I have actually tried that and found the results "less than ideal" for the > normal dragger geometries. > The problem is that the parts of the dragger geometries may not render > correctly over each other with depth test off. > Chris. > > ----- Original Message - From: "Chris Denham" > To: > Sent: Tuesday, January 27, 2009 9:33 AM > Subject: Re: [osg-users] Dragger rendering issue > > > > Hi Ruqin, > I had the same problem with Draggers, and the solution was to put the > dragger object in the scenegraph below a post render camera. > This works well for me as I can now also drag the selected object when it > is behind other objects in the scene. To do this you may need a version of > OSG later that 2.6 though, because I had some problems in relation to > transforms and subgraph cameras which Robert helped me to fix. > The other 'enhancement' I made was to add an autotransform node to keep the > dragger geometry the same size on the screen regardless of the size/scale of > the object. > Chris. > > > Date: Mon, 26 Jan 2009 17:47:44 -0600 > From: Ruqin Zhang > Subject: [osg-users] Dragger rendering issue > To: OpenSceneGraph Users > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > > I got an issue about osgManipulator::dragger. When I set up a dragger, > sometime it just hide (totally or partially) inside the selected object. > So, > I am wondering if there is some sort of way that I could always force the > dragger rendered on top of the selected object to make it fully visible to > user? Thanks a lot! > > > Ruqin > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Sure, I'd like to try it. Thanks! Ruqin On Tue, Jan 27, 2009 at 11:04 AM, Chris Denham wrote: > Have you tried my earlier suggestion?i.e. adding a post render camera > just above the dragger. > Can be a bit fiddly to manage the scenegraph, so might be worth trying any > other ideas first. > But I can give you some code snippets if you want to try it. > Chris. > > - Original Message - From: Ruqin Zhang > To: Chris Denham ; osg-users@lists.openscenegraph.org > Sent: Tuesday, January 27, 2009 4:45 PM > > Subject: Re: [osg-users] Dragger rendering issue > > > Thank you guys! I tried the idea of turning off the depth test. It works ok > but not perfect. Just as Chris mentioned, there is some rendering problem of > the dragger geometries. Anyone has idea of solving this problem? Thanks > again! > > Ruqin > > > On Tue, Jan 27, 2009 at 9:20 AM, Chris Denham > wrote: > > Hi Ruqin, > Just wanted to add to this as Robert and JS suggested switching off the > depth test for the dragger. > I have actually tried that and found the results "less than ideal" for the > normal dragger geometries. > The problem is that the parts of the dragger geometries may not render > correctly over each other with depth test off. > Chris. > > - Original Message ----- From: "Chris Denham" > To: > Sent: Tuesday, January 27, 2009 9:33 AM > Subject: Re: [osg-users] Dragger rendering issue > > > > Hi Ruqin, > I had the same problem with Draggers, and the solution was to put the > dragger object in the scenegraph below a post render camera. > This works well for me as I can now also drag the selected object when it > is behind other objects in the scene. To do this you may need a version of > OSG later that 2.6 though, because I had some problems in relation to > transforms and subgraph cameras which Robert helped me to fix. > The other 'enhancement' I made was to add an autotransform node to keep the > dragger geometry the same size on the screen regardless of the size/scale of > the object. > Chris. > > > Date: Mon, 26 Jan 2009 17:47:44 -0600 > From: Ruqin Zhang > Subject: [osg-users] Dragger rendering issue > To: OpenSceneGraph Users > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > > I got an issue about osgManipulator::dragger. When I set up a dragger, > sometime it just hide (totally or partially) inside the selected object. > So, > I am wondering if there is some sort of way that I could always force the > dragger rendered on top of the selected object to make it fully visible to > user? Thanks a lot! > > > Ruqin > -- Research Assistant Human Computer Interaction Program Virtual Reality Applications Center(VRAC) Iowa State University ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Have you tried my earlier suggestion?i.e. adding a post render camera just above the dragger. Can be a bit fiddly to manage the scenegraph, so might be worth trying any other ideas first. But I can give you some code snippets if you want to try it. Chris. - Original Message - From: Ruqin Zhang To: Chris Denham ; osg-users@lists.openscenegraph.org Sent: Tuesday, January 27, 2009 4:45 PM Subject: Re: [osg-users] Dragger rendering issue Thank you guys! I tried the idea of turning off the depth test. It works ok but not perfect. Just as Chris mentioned, there is some rendering problem of the dragger geometries. Anyone has idea of solving this problem? Thanks again! Ruqin On Tue, Jan 27, 2009 at 9:20 AM, Chris Denham wrote: Hi Ruqin, Just wanted to add to this as Robert and JS suggested switching off the depth test for the dragger. I have actually tried that and found the results "less than ideal" for the normal dragger geometries. The problem is that the parts of the dragger geometries may not render correctly over each other with depth test off. Chris. - Original Message - From: "Chris Denham" To: Sent: Tuesday, January 27, 2009 9:33 AM Subject: Re: [osg-users] Dragger rendering issue Hi Ruqin, I had the same problem with Draggers, and the solution was to put the dragger object in the scenegraph below a post render camera. This works well for me as I can now also drag the selected object when it is behind other objects in the scene. To do this you may need a version of OSG later that 2.6 though, because I had some problems in relation to transforms and subgraph cameras which Robert helped me to fix. The other 'enhancement' I made was to add an autotransform node to keep the dragger geometry the same size on the screen regardless of the size/scale of the object. Chris. Date: Mon, 26 Jan 2009 17:47:44 -0600 From: Ruqin Zhang Subject: [osg-users] Dragger rendering issue To: OpenSceneGraph Users Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, I got an issue about osgManipulator::dragger. When I set up a dragger, sometime it just hide (totally or partially) inside the selected object. So, I am wondering if there is some sort of way that I could always force the dragger rendered on top of the selected object to make it fully visible to user? Thanks a lot! Ruqin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Thank you guys! I tried the idea of turning off the depth test. It works ok but not perfect. Just as Chris mentioned, there is some rendering problem of the dragger geometries. Anyone has idea of solving this problem? Thanks again! Ruqin On Tue, Jan 27, 2009 at 9:20 AM, Chris Denham wrote: > Hi Ruqin, > Just wanted to add to this as Robert and JS suggested switching off the > depth test for the dragger. > I have actually tried that and found the results "less than ideal" for the > normal dragger geometries. > The problem is that the parts of the dragger geometries may not render > correctly over each other with depth test off. > Chris. > > - Original Message - From: "Chris Denham" > To: > Sent: Tuesday, January 27, 2009 9:33 AM > Subject: Re: [osg-users] Dragger rendering issue > > > Hi Ruqin, >> I had the same problem with Draggers, and the solution was to put the >> dragger object in the scenegraph below a post render camera. >> This works well for me as I can now also drag the selected object when it >> is behind other objects in the scene. To do this you may need a version of >> OSG later that 2.6 though, because I had some problems in relation to >> transforms and subgraph cameras which Robert helped me to fix. >> The other 'enhancement' I made was to add an autotransform node to keep >> the dragger geometry the same size on the screen regardless of the >> size/scale of the object. >> Chris. >> >> Date: Mon, 26 Jan 2009 17:47:44 -0600 >>> From: Ruqin Zhang >>> Subject: [osg-users] Dragger rendering issue >>> To: OpenSceneGraph Users >>> Message-ID: >>> >>> Content-Type: text/plain; charset="iso-8859-1" >>> >>> Hi, >>> >>> I got an issue about osgManipulator::dragger. When I set up a dragger, >>> sometime it just hide (totally or partially) inside the selected object. >>> So, >>> I am wondering if there is some sort of way that I could always force the >>> dragger rendered on top of the selected object to make it fully visible >>> to >>> user? Thanks a lot! >>> >>> Ruqin >>> >> >> > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hi Ruqin, Just wanted to add to this as Robert and JS suggested switching off the depth test for the dragger. I have actually tried that and found the results "less than ideal" for the normal dragger geometries. The problem is that the parts of the dragger geometries may not render correctly over each other with depth test off. Chris. - Original Message - From: "Chris Denham" To: Sent: Tuesday, January 27, 2009 9:33 AM Subject: Re: [osg-users] Dragger rendering issue Hi Ruqin, I had the same problem with Draggers, and the solution was to put the dragger object in the scenegraph below a post render camera. This works well for me as I can now also drag the selected object when it is behind other objects in the scene. To do this you may need a version of OSG later that 2.6 though, because I had some problems in relation to transforms and subgraph cameras which Robert helped me to fix. The other 'enhancement' I made was to add an autotransform node to keep the dragger geometry the same size on the screen regardless of the size/scale of the object. Chris. Date: Mon, 26 Jan 2009 17:47:44 -0600 From: Ruqin Zhang Subject: [osg-users] Dragger rendering issue To: OpenSceneGraph Users Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, I got an issue about osgManipulator::dragger. When I set up a dragger, sometime it just hide (totally or partially) inside the selected object. So, I am wondering if there is some sort of way that I could always force the dragger rendered on top of the selected object to make it fully visible to user? Thanks a lot! Ruqin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hello Ruqin, I got an issue about osgManipulator::dragger. When I set up a dragger, sometime it just hide (totally or partially) inside the selected object. So, I am wondering if there is some sort of way that I could always force the dragger rendered on top of the selected object to make it fully visible to user? Thanks a lot! Well, you could set the depth test off (or GL_ALWAYS) and render it last, but if it's inside your object then you won't be able to pick it anyways (with the mouse) unless you set your intersection visitor to only pick the dragger. Another possible solution would be just scaling your dragger so that it's bigger than the object. You can use object->getBound() to get a bounding sphere, and then set a scale on the dragger itself which inherits from MatrixTransform. Which solution you decide to use is dependent on the effect you want to achieve. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hi Ruqin, I had the same problem with Draggers, and the solution was to put the dragger object in the scenegraph below a post render camera. This works well for me as I can now also drag the selected object when it is behind other objects in the scene. To do this you may need a version of OSG later that 2.6 though, because I had some problems in relation to transforms and subgraph cameras which Robert helped me to fix. The other 'enhancement' I made was to add an autotransform node to keep the dragger geometry the same size on the screen regardless of the size/scale of the object. Chris. Date: Mon, 26 Jan 2009 17:47:44 -0600 From: Ruqin Zhang Subject: [osg-users] Dragger rendering issue To: OpenSceneGraph Users Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, I got an issue about osgManipulator::dragger. When I set up a dragger, sometime it just hide (totally or partially) inside the selected object. So, I am wondering if there is some sort of way that I could always force the dragger rendered on top of the selected object to make it fully visible to user? Thanks a lot! Ruqin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dragger rendering issue
Hi Ruqin, You could disable the depth test on the subgraph that rendered the dragger. Robert. On Mon, Jan 26, 2009 at 11:47 PM, Ruqin Zhang wrote: > Hi, > > I got an issue about osgManipulator::dragger. When I set up a dragger, > sometime it just hide (totally or partially) inside the selected object. So, > I am wondering if there is some sort of way that I could always force the > dragger rendered on top of the selected object to make it fully visible to > user? Thanks a lot! > > Ruqin > > ___ > 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] Dragger rendering issue
Hi, I got an issue about osgManipulator::dragger. When I set up a dragger, sometime it just hide (totally or partially) inside the selected object. So, I am wondering if there is some sort of way that I could always force the dragger rendered on top of the selected object to make it fully visible to user? Thanks a lot! Ruqin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org