Re: [osg-users] Using OsgSim Overlay
Thanks Glenn for the tip J Best Regards Vaibhav Bansal From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Saturday, November 21, 2009 12:20 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Vaibhav, You may also want to investigate the shapefile_stencil.earth example (which uses the model_feature_stencil plugin). This uses a stencil buffer technique to drape vector data on the terrain. Make sure you get the absolute latest SVN though. For lines, you'll need to build in the GEOS support as well (use geos 3.1.1 on windows) to get geometry buffering. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Fri, Nov 20, 2009 at 1:53 AM, Vaibhav Bansal vaib...@darshan3d.com wrote: Hello Glenn, Thanks for your help. I was working on osgearth1.2 till now, however on your advice I updated to latest svn. I ran shapefile_overlay.earth provided with osgearth tests on osgviewer. However it seems that the artifacts were still reproducible L at certain viewing angles. (It was not there just for a fration for texture update but persisted at that viewing angle) Attached ScreenShots. It seems that I will have to look into the code of overlay node. Regards Vaibhav Bansal From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, November 19, 2009 9:31 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay I'm no shader expert, so I cannot answer that. I do know that osgEarth plays well with OverlayNode though -- it has some built-in vector overlay support that uses OverlayNode in perspective mode (see the osgearth_feature_overlay driver). Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Thu, Nov 19, 2009 at 10:24 AM, Vaibhav Bansal vaib...@darshan3d.com wrote: Hello Glenn, The view dependent-with-perspective-overlay uses a shader, I am already using a shader for my terrain(base geometry, osgearth). Secondly for VIEW_DEPENDENT_WITH_ORTHOGRAPHIC mode the projected texture resolution does not decrease(/projected area does not increase) even when the viewing direction is near parallel to terrain, it stretches 'only' at certain specific angles. Is there a way to use overlay if I am already using a shader on my base terrain? Thanks and Regards Vaibhav Bansal From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, November 19, 2009 6:52 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Vaibhav, The area covered by the projected texture changes based on your view angle. As your angle of view gets less steep, the texture resolution appears to descrease since it has to cover a larger area. Try view-dependend-with-perspective-overlay, which helps with this issue. Also, increase the texture size hint in the OverlayNode api. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Thu, Nov 19, 2009 at 7:29 AM, Vaibhav Bansal vaib...@darshan3d.com wrote: Yes, this is what the overlay node does for me. But I am unable to understand, why the stretching occurs only 'at' some specific angles. Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 3:47 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi, Vaibhav Bansal wrote: Hello jp, Thanks for the quick reply. How do I check if the 'resolution' of ovelay geometry is changing. imagine the following: You want to overlay a 1024x1024 checkerboard onto the earth and you have a 512x512 overlay texture. If you view the whole earth it obviously would not look good - too much detail to fit into the texture. What the view dependent modes try to do is this: When you zoom in, you only see a piece of the checkerboard, so now the 512x512 texture can contain only a piece of the checkerboard and so you see more detail of the overlayed geometry. I think this is the effect you are seeing when you are moving the view around. jp Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 2:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi Vaibhav, Vaibhav Bansal wrote: Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The texture coordinates might be OK
[osg-users] Using OsgSim Overlay
Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The white area is the overlaySubgraph geometry, and the colored area is the Overlay Node (base) geometry. The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION. Can anyone suggest where should I start troubleshooting. Thanks Vaibhav Bansal attachment: UnDistorted.JPGattachment: Distorted.JPG___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using OsgSim Overlay
Hello jp, Thanks for the quick reply. How do I check if the 'resolution' of ovelay geometry is changing. Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 2:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi Vaibhav, Vaibhav Bansal wrote: Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The texture coordinates might be OK, but the resolution of your overlayed geometry might change in the generated overlayed texture. What happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the resolution/stretch stay the same? jp The white area is the overlaySubgraph geometry, and the colored area is the Overlay Node (base) geometry. The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION. Can anyone suggest where should I start troubleshooting. Thanks Vaibhav Bansal ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Using OsgSim Overlay
Yes, this is what the overlay node does for me. But I am unable to understand, why the stretching occurs only 'at' some specific angles. Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 3:47 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi, Vaibhav Bansal wrote: Hello jp, Thanks for the quick reply. How do I check if the 'resolution' of ovelay geometry is changing. imagine the following: You want to overlay a 1024x1024 checkerboard onto the earth and you have a 512x512 overlay texture. If you view the whole earth it obviously would not look good - too much detail to fit into the texture. What the view dependent modes try to do is this: When you zoom in, you only see a piece of the checkerboard, so now the 512x512 texture can contain only a piece of the checkerboard and so you see more detail of the overlayed geometry. I think this is the effect you are seeing when you are moving the view around. jp Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 2:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi Vaibhav, Vaibhav Bansal wrote: Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The texture coordinates might be OK, but the resolution of your overlayed geometry might change in the generated overlayed texture. What happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the resolution/stretch stay the same? jp The white area is the overlaySubgraph geometry, and the colored area is the Overlay Node (base) geometry. The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION. Can anyone suggest where should I start troubleshooting. Thanks Vaibhav Bansal ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Using OsgSim Overlay
Hello Glenn, The view dependent-with-perspective-overlay uses a shader, I am already using a shader for my terrain(base geometry, osgearth). Secondly for VIEW_DEPENDENT_WITH_ORTHOGRAPHIC mode the projected texture resolution does not decrease(/projected area does not increase) even when the viewing direction is near parallel to terrain, it stretches 'only' at certain specific angles. Is there a way to use overlay if I am already using a shader on my base terrain? Thanks and Regards Vaibhav Bansal From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, November 19, 2009 6:52 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Vaibhav, The area covered by the projected texture changes based on your view angle. As your angle of view gets less steep, the texture resolution appears to descrease since it has to cover a larger area. Try view-dependend-with-perspective-overlay, which helps with this issue. Also, increase the texture size hint in the OverlayNode api. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Thu, Nov 19, 2009 at 7:29 AM, Vaibhav Bansal vaib...@darshan3d.com wrote: Yes, this is what the overlay node does for me. But I am unable to understand, why the stretching occurs only 'at' some specific angles. Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 3:47 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi, Vaibhav Bansal wrote: Hello jp, Thanks for the quick reply. How do I check if the 'resolution' of ovelay geometry is changing. imagine the following: You want to overlay a 1024x1024 checkerboard onto the earth and you have a 512x512 overlay texture. If you view the whole earth it obviously would not look good - too much detail to fit into the texture. What the view dependent modes try to do is this: When you zoom in, you only see a piece of the checkerboard, so now the 512x512 texture can contain only a piece of the checkerboard and so you see more detail of the overlayed geometry. I think this is the effect you are seeing when you are moving the view around. jp Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 2:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi Vaibhav, Vaibhav Bansal wrote: Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The texture coordinates might be OK, but the resolution of your overlayed geometry might change in the generated overlayed texture. What happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the resolution/stretch stay the same? jp The white area is the overlaySubgraph geometry, and the colored area is the Overlay Node (base) geometry. The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION. Can anyone suggest where should I start troubleshooting. Thanks Vaibhav Bansal ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Using OsgSim Overlay
Smooth, I would say distortions occur in certain angle ranges. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 8:43 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi, Vaibhav Bansal wrote: Yes, this is what the overlay node does for me. But I am unable to understand, why the stretching occurs only 'at' some specific angles. Are the transitions smooth or are you seeing jumps? jp Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 3:47 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi, Vaibhav Bansal wrote: Hello jp, Thanks for the quick reply. How do I check if the 'resolution' of ovelay geometry is changing. imagine the following: You want to overlay a 1024x1024 checkerboard onto the earth and you have a 512x512 overlay texture. If you view the whole earth it obviously would not look good - too much detail to fit into the texture. What the view dependent modes try to do is this: When you zoom in, you only see a piece of the checkerboard, so now the 512x512 texture can contain only a piece of the checkerboard and so you see more detail of the overlayed geometry. I think this is the effect you are seeing when you are moving the view around. jp Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Thursday, November 19, 2009 2:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Using OsgSim Overlay Hi Vaibhav, Vaibhav Bansal wrote: Hello, I have added a geometry as an overlay over another geometry. The overlay texture seems to distort(stretch) under certain viewing angles. It seems the projected texture is generating incorrect texture coordinates. The texture coordinates might be OK, but the resolution of your overlayed geometry might change in the generated overlayed texture. What happens in OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY? Does the resolution/stretch stay the same? jp The white area is the overlaySubgraph geometry, and the colored area is the Overlay Node (base) geometry. The overlay mode is VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_PROJECTION. Can anyone suggest where should I start troubleshooting. Thanks Vaibhav Bansal ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Overlay nodes and Lod's
Hello, Does overlay subgraph support LOD's? I tried to assign a paged lod as overlaysubgraph for overlay node, but it does not seem to page the lod's. Is there any special way to use lod's with overlay? Thanks and Regards Vaibhav Bansal ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Text Problem
Hello Robert, The osgText example runs fine. I tested on two machines with different cards/drivers, the problem remains. I am using these modes : text-setCharacterSizeMode(osgText::Text::OBJECT_COORDS); text-setAxisAlignment(osgText::Text::SCREEN); I am using position values of the order of 1438137.375, and font size of 1.6. Could this be related to precision. Thanks and Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Sunday, July 12, 2009 9:51 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Text Problem Hi Vaibahv, I've never seen a problem like this before. Exactly how are you setting your text? Do you see the problem across platforms and different hardware/drivers? What happens you run the osgtext example. Robert. On Sun, Jul 12, 2009 at 3:41 PM, Vaibhav Bansalvaib...@darshan3d.com wrote: Hello I was trying to place some osgText in my scene, the text seems to become distorted however. A picture of the distorted text is attached, please comment if any one has faced such problem before. I am using osg2.6.1. Thanks and Regards Vaibahv Bansal ___ 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] Text Problem
Hello Robert, Thanks for the advice for placing geometries in local cords, it worked wonderfully. Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Monday, July 13, 2009 12:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Text Problem HI Vailbhav, Try moving your text nearer to a local origin to see if the problem is a precision issue. A good technique to use when dealing with large model coordinates is to place a MatrixTransform above the local geometries to place them in world coords, and to enable the local geometries to have a local origin to maximize precision. Robert. On Mon, Jul 13, 2009 at 8:01 AM, Vaibhav Bansalvaib...@darshan3d.com wrote: Hello Robert, The osgText example runs fine. I tested on two machines with different cards/drivers, the problem remains. I am using these modes : text-setCharacterSizeMode(osgText::Text::OBJECT_COORDS); text-setAxisAlignment(osgText::Text::SCREEN); I am using position values of the order of 1438137.375, and font size of 1.6. Could this be related to precision. Thanks and Regards Vaibhav Bansal -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Sunday, July 12, 2009 9:51 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Text Problem Hi Vaibahv, I've never seen a problem like this before. Exactly how are you setting your text? Do you see the problem across platforms and different hardware/drivers? What happens you run the osgtext example. Robert. On Sun, Jul 12, 2009 at 3:41 PM, Vaibhav Bansalvaib...@darshan3d.com wrote: Hello I was trying to place some osgText in my scene, the text seems to become distorted however. A picture of the distorted text is attached, please comment if any one has faced such problem before. I am using osg2.6.1. Thanks and Regards Vaibahv Bansal ___ 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 ___ 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] Text Problem
Hello I was trying to place some osgText in my scene, the text seems to become distorted however. A picture of the distorted text is attached, please comment if any one has faced such problem before. I am using osg2.6.1. Thanks and Regards Vaibahv Bansal attachment: imageProb.jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org