[osg-users] osgTerrain and osgDEM...
Hello, I'm new to OSG and I'm looking at the osgTerrain nodekit for terrain rendering. My question is, is how is this used with Virtual Planet builder (osgdem) for rendering terrain? Is VPB osgdem used to construct the terrain database and then osgTerrain used to traverse the terrain in OSG? Is there a Wiki available on how to use osgTerrain? I've looked at the osgTerrain example packaged with OSG but I can't get my head around how it is used. Any input would be most appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgTerrain and osgDEM...
Robert, Thanks much for the info. I will forge ahead with VPB using the --terrain option and see where things go from there. On a related note, I'm seeing an error when I run through the osgdem step guide for building a terrain database. After I run the command: osgdem --xx 10 --yy 10 -t ps_texture_16k.tif \ --xx 10 --yy 10 -d ps_height_16k.tif \ -l 8 -v 0.1 -o puget.ive -a pegout.osga I get the following error messages: ERROR 1: ps_height_16k.tif: No space to read TIFF directory ERROR 1: TIFFReadDirectory: Failed to read directory at offset 537067676 Any idea why I'm getting these errors? I've followed the instructions to the letter... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, May 23, 2008 2:05 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgTerrain and osgDEM... Hi Shayne, osgTerrain functionality has evolve alot of the last six months, so not much is documented about it yet. VirtualPlanetBuilder has an option for building databases using standard nodes like osg::MatrixTransform/osg::Geode/osg::Geometry (which is the original and still default option) and now the ability to create osgTerrain::TerrainTile based terrain - you access this via the --terrain option. When you use VPB to generate databases you just load the topmost tile of the database and the viewer and supporting classes will work out what to NodeKits to load and what threads to start up, you won't actually need to know the details about the what form the database itself takes, whether its a convetional geometry based database or a osgTerrain one. There are advatanges with a osgTerrain based database though - they are much faster to generate in VPB, they create small tiles for a given resolution, the sample density of tiles can be altered at runtime. The osgmultitexturecontrol example provides an example of controlling sample density by decorating the loaded database with osgTerrain::Terrain node and controlling its parameters. Robert. On Thu, May 22, 2008 at 10:40 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, I'm new to OSG and I'm looking at the osgTerrain nodekit for terrain rendering. My question is, is how is this used with Virtual Planet builder (osgdem) for rendering terrain? Is VPB osgdem used to construct the terrain database and then osgTerrain used to traverse the terrain in OSG? Is there a Wiki available on how to use osgTerrain? I've looked at the osgTerrain example packaged with OSG but I can't get my head around how it is used. Any input would be most appreciated. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgTerrain and osgDEM...
I ran gdalinfo on ps_height_16k.tif and I get the following: ERROR 1: ps_height_16k.tif: No space to read TIFF directory ERROR 1: TIFFReadDirectory: Failed to read directory at offset 537067676 Driver: GTiff/GeoTIFF Files: ps_height_16k.tif Size is 16385, 16385 Coordinate System is `' Image Structure Metadata: INTERLEAVED=BAND Corner Coorinates: Upper Left ( 0.0, 0.0) Lower Left ( 0.0, 16385.0) Upper Right(16385.0, 0.0) Lower Right(16385.0, 16385.0) Center (8192.5, 8192.5) Band 1 Block=16385x1 Type=UInt16, ColorInterp=Gray Any input on this? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, May 23, 2008 9:13 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgTerrain and osgDEM... Its a a GDAL error. Try gdalinfo of the problem file. On Fri, May 23, 2008 at 4:11 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Robert, Thanks much for the info. I will forge ahead with VPB using the --terrain option and see where things go from there. On a related note, I'm seeing an error when I run through the osgdem step guide for building a terrain database. After I run the command: osgdem --xx 10 --yy 10 -t ps_texture_16k.tif \ --xx 10 --yy 10 -d ps_height_16k.tif \ -l 8 -v 0.1 -o puget.ive -a pegout.osga I get the following error messages: ERROR 1: ps_height_16k.tif: No space to read TIFF directory ERROR 1: TIFFReadDirectory: Failed to read directory at offset 537067676 Any idea why I'm getting these errors? I've followed the instructions to the letter... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, May 23, 2008 2:05 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgTerrain and osgDEM... Hi Shayne, osgTerrain functionality has evolve alot of the last six months, so not much is documented about it yet. VirtualPlanetBuilder has an option for building databases using standard nodes like osg::MatrixTransform/osg::Geode/osg::Geometry (which is the original and still default option) and now the ability to create osgTerrain::TerrainTile based terrain - you access this via the --terrain option. When you use VPB to generate databases you just load the topmost tile of the database and the viewer and supporting classes will work out what to NodeKits to load and what threads to start up, you won't actually need to know the details about the what form the database itself takes, whether its a convetional geometry based database or a osgTerrain one. There are advatanges with a osgTerrain based database though - they are much faster to generate in VPB, they create small tiles for a given resolution, the sample density of tiles can be altered at runtime. The osgmultitexturecontrol example provides an example of controlling sample density by decorating the loaded database with osgTerrain::Terrain node and controlling its parameters. Robert. On Thu, May 22, 2008 at 10:40 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, I'm new to OSG and I'm looking at the osgTerrain nodekit for terrain rendering. My question is, is how is this used with Virtual Planet builder (osgdem) for rendering terrain? Is VPB osgdem used to construct the terrain database and then osgTerrain used to traverse the terrain in OSG? Is there a Wiki available on how to use osgTerrain? I've looked at the osgTerrain example packaged with OSG but I can't get my head around how it is used. Any input would be most appreciated. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DTED file format...
Does anyone know if VPB supports the reading of the DTED file format (i.e. *.dt1 files) for generating terrain databases? Do they need to be converted over to some sort of raster format before VPB can use them? smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgDEM usage...
All, I've made an attempt in generating a database using my own height field and texture per the instructions located at http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. So far, I have not had any luck in getting the height field to display correctly. The texture is present just fine but the terrain is either completely flat or is uncorrelated with the texture. This is the command I'm issuing to generate the terrain. osgdem --xx 90 --yy 90 -t n39_texture.tif --xx 90 --yy 90 -d n39_height_.tif -l 4 -v 0.1 -o myterrain.ive -a myterrain.osga The height field tif file comes from a 1 degree by 1 degree of DTED that is 3 arc second level 1, hence the reason for my spacing of 90 meters. If I increase the -v option scaling factor from 0.1 to 50, the terrain height shows up but it is totally uncorrelated with the texture. If anyone has any input on what I'm doing wrong or missing, it would be most appreciated if you could point it out. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDEM usage...
Robert, The files were originally PNG files that I converted per the instructions on the wiki to the .tif format. Whether or not that makes them GeoTiffs I don't know. How can I convert the files to GeoTiffs? -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, May 30, 2008 2:14 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgDEM usage... Hi Shayne, The wiki instructions was written in the very early days of the development of osgdem, and is awaiting a rewrite. Today I wouldn't recommend using --xx definition of the coordinate system, you are better off using geospatial imagery/dems. Are you files GeoTiff's? If so then dispense with the --xx command lines and just use: osgdem -t n39_texture.tif -d n39_height_.tif -l 4 -o myterrain/myterrain.ive The coordinates will sourced entirely from the .tif files, there will also be no need to tangle with the -v vertical scaling command line parameter. The VPB version of osgdem also will created nested directories for you hence the myterrain/ directory above. Also temporarily archive support has been removed. Robert. On Thu, May 29, 2008 at 11:46 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: All, I've made an attempt in generating a database using my own height field and texture per the instructions located at http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. So far, I have not had any luck in getting the height field to display correctly. The texture is present just fine but the terrain is either completely flat or is uncorrelated with the texture. This is the command I'm issuing to generate the terrain. osgdem --xx 90 --yy 90 -t n39_texture.tif --xx 90 --yy 90 -d n39_height_.tif -l 4 -v 0.1 -o myterrain.ive -a myterrain.osga The height field tif file comes from a 1 degree by 1 degree of DTED that is 3 arc second level 1, hence the reason for my spacing of 90 meters. If I increase the -v option scaling factor from 0.1 to 50, the terrain height shows up but it is totally uncorrelated with the texture. If anyone has any input on what I'm doing wrong or missing, it would be most appreciated if you could point it out. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDEM usage...
Thanks to all who have replied to my inquiries thus far regarding osgdem usage. Your input is much appreciated. I will take what's been suggested and make some more progress. I'm sure I'll have more questions... Regards, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ümit uzun Sent: Monday, June 02, 2008 2:18 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgDEM usage... Hi Shayne; I think You should use image which has a georeferenced data. So if you download images from osgdem wiki instroductions, it is normally getting wrong results. I will fix the osgdem wiki page in a few days. The instructions belongs for previous version of osgdem. If you want to create terrain database with hight relief, first of all you should an image which has a georeferenced data ( for example you can download geospatial images from http://seamless.usgs.gov/ and dem files from http://geoengine.nga.mil/geospatial/SW_TOOLS/NIMAMUSE/webinter/rast_roam.htm l ) or you have to learn using gdal ( http://www.gdal.org/ ), especially gdal_vrt ( http://www.gdal.org/gdal_vrttut.html ) to make add georeference data to any image. For example you downloaded x.tif and its releated y.dem data from given web pages. Then you can use this command; osgdem -t x.tif -d y.dem -v 5.0 -so builde.source -o database/sample_terrain.ive osgdem -s build.source -l 4 Then you should have an terrain with height relief. This can be a bit complex but you should search about osgdem from mail-list ( http://dir.gmane.org/gmane.comp.graphics.openscenegraph.user/ ) and always try to use georeferenced images. Good Luck; ÜMİT UZUN Date: Mon, 2 Jun 2008 19:54:25 +0100 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgDEM usage... Hi Shayne, On Mon, Jun 2, 2008 at 5:20 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: The files were originally PNG files that I converted per the instructions on the wiki to the .tif format. Whether or not that makes them GeoTiffs I don't know. How can I convert the files to GeoTiffs? If you want to do any geospatial work then you really need to familiarise yourself with tools like gdal, they have plenty of docs an links on their project website. VirtualPlanetBuilder uses GDAL internally, so what you learn about gdal also will help you understand about what VPB can handle. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ Windows Live Spaces - hayatınız, Alanınız. Daha fazlasını öğrenmek için buraya tıklayın. http://get.live.com/spaces/overview ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDEM usage...
Robert (or anyone else), Can you enlighten me on the --TERRAIN, --LOD, and --PagedLOD options in osgdem? What are the benefits or drawbacks for using these? Which is the best combination to use for performance, quality, etc.? Thanks, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, June 02, 2008 12:54 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgDEM usage... Hi Shayne, On Mon, Jun 2, 2008 at 5:20 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: The files were originally PNG files that I converted per the instructions on the wiki to the .tif format. Whether or not that makes them GeoTiffs I don't know. How can I convert the files to GeoTiffs? If you want to do any geospatial work then you really need to familiarise yourself with tools like gdal, they have plenty of docs an links on their project website. VirtualPlanetBuilder uses GDAL internally, so what you learn about gdal also will help you understand about what VPB can handle. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image - terrain, Simple question
Anders, I believe osgdem is part of VPB now. When you build VPB, it compiles to osgdem that can be run from the command line just as in the past. -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anders Backman Sent: Monday, June 09, 2008 6:25 AM To: OpenSceneGraph Users Subject: [osg-users] Image - terrain, Simple question Simple question from someone that hasn't follow the development in detail for a long while What is the simplest way of generating a terrain mesh from a 2D image with heights? Im not looking for paging textures, terrain etc, just image- mesh. There use to be the osgDem app that did this, but now you have to install and build VirtualPlanetBuilder, right? Is there anyway to do this with osg-only right now? /Anders -- Anders Backman Email: [EMAIL PROTECTED] HPC2N/VRlab Phone: +46 (0)90-786 9936 Umea university Cellular: +46 (0)70-392 64 67 S-901 87 UMEA SWEDEN Fax: +46 90-786 6126 http://www.cs.umu.se/~andersb ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] lighting in osgViewer...
This may be a silly question but can anyone enlighten me on what osgViewer::setLight() does? Does it set the attributes for a global light source in the scene? I want to change the defaults in the viewer. Thanks in advance -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] lighting in osgViewer...
Thanks John. I'll give it a try. So I assume that this overrides the osgViewer default light settings? Thanks again for the help... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Argentieri, John-P63223 Sent: Tuesday, June 10, 2008 4:36 PM To: [EMAIL PROTECTED] Subject: Re: [osg-users] lighting in osgViewer... Shayne, If you really want to control lighting, you have to use osg::Light and osg::LightSource. If you look at the code for the example osglight you will see how those types of lights are set up. Say for instance, you want a constant, non-directional light. Copy the osglight example, but instead of what they do with the osg::Light, do: m_Light = new osg::Light(); m_Light-setLightNum( 0 ); // this will override the Look at me, I am the sun light. m_Light-setAmbient( osg::Vec4f( 1.0f, 1.0f, 1.0f, 1.0f ) ); m_Light-setDiffuse( osg::Vec4f( 0.0f, 0.0f, 0.0f, 0.0f ) ); and you don't have to worry about where it's located because it has 0 directional lighting. 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. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, June 10, 2008 6:09 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] lighting in osgViewer... This may be a silly question but can anyone enlighten me on what osgViewer::setLight() does? Does it set the attributes for a global light source in the scene? I want to change the defaults in the viewer. Thanks in advance -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgdem terrain coordinate system...
Can anyone tell me what coordinate system and what origin is assumed when osgdem builds a terrain database? I'm feeding geo-referenced files that use upper left and lower right lat/lon pairs to osgdem, but it's not clear to me where the origin is for the generated database. Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgdem terrain coordinate system...
Can anyone tell me what coordinate system and what origin is assumed when osgdem builds a terrain database? I'm feeding geo-referenced files that use upper left and lower right lat/lon pairs to osgdem, but it's not clear to me where the origin is for the generated database. Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgdem terrain coordinate system...
Can anyone tell me what coordinate system and what origin is assumed when osgdem builds a terrain database? I'm feeding geo-referenced files that use upper left and lower right lat/lon pairs to osgdem, but it's not clear to me where the origin is for the generated database. Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem terrain coordinate system...
Thanks for the input. So is the WGS84 the default setting for osgdem? For more clarification, this is what I'm using to build my database. osgdem --TERRAIN --PagedLOD -t texture/w113 -d dted/w113 -t texture/w114 -d dted/w114 -l 4 -o myterrain/myterrain.ive The texture/w113 and dted/w113 directories contain the geo-referenced GeoTiff texture and corresponding DTED files to match. The same goes for the other directories. My resulting archive file contains a mosaic of terrain spanning from w114 n33 to w112 n40. When I view the terrain and an airplane model using osgViewer, the model appears centered at the origin and the terrain is way off in the distance. I want to move the model so that it is over the terrain. In order to do that, I need to know where the terrain is relative to the origin. So, given the information above, is the terrain origin at lat = 0, lon = 0? If so, does OSG support a lat/long to x/y conversion? -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Glenn Waldron Sent: Monday, June 16, 2008 10:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgdem terrain coordinate system... Shayne, osgdem adopts the coordinate reference system of the first input that you provide. So if your input is (for example) WGS84, and you are not building a geocentric database,I believe the terrain will be in a flat Plate Carre projection (X=Long, Y=Lat) with the origin at lat=0, long=0. If you are using --geocentric, the origin will be at the center of the earth. Glenn On Mon, Jun 16, 2008 at 11:10 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Can anyone tell me what coordinate system and what origin is assumed when osgdem builds a terrain database? I'm feeding geo-referenced files that use upper left and lower right lat/lon pairs to osgdem, but it's not clear to me where the origin is for the generated database. Thanks in advance. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem terrain coordinate system...
ASSUMING your source data is geographic (e.g. WGS84) then you have a Plate Carre projection and the conversion is simply: X=Lon, Y=Lat. If it is not geographic, then you will have to use a library like PROJ.4 to reproject it. The elevation source data is raw DTED format which uses WGS84. So if I want to reposition my airplane over the terrain, do I use lat/lon coordinates to do that such as: airplaneXform-setPosition(osg::Vec3(-113.0, 33.0, altitude)) ? smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using osg::node in glut renderer
Regarding the osgviewerGLUT example, is there any way to make the embedded window from the GraphicsWindowEmbedded feature smaller in size than the glut window? I bring this up because when I change the extents on the viewer-setUpViewerAsEmbeddedInWindow() it has no effect. It always uses the size of the GLUT window from glutInitWindowSize(). -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 20, 2008 2:21 AM To: OpenSceneGraph Users Subject: Re: [osg-users] using osg::node in glut renderer Hi Mark, The GraphicsWindowEmbedded feature of osgViewer allows osgviewerGLUT to just use an existing context, it does realize anything, so can fit right inside your own code. More of an issue is keeping OpenGL in sync between the two sets of rendering - you'll need to protect the OSG rendering from your OpenGL state changes, and visa versa. There's been lots written about this on osg-users so have a look through the archives. Finally I have to say bolting together two different scene graph side by side may well be possible, but it's unlikely to provide the great overall solution, it'll be a hack at best. The OSG itself has support for threading, multiple graphics context etc, and as such is very flexible and scalable, if you're bolting the OSG into an existing framework you can kiss goodbye to much of what makes the OSG powerful. Robert. On Thu, Jun 19, 2008 at 8:39 PM, Mark Henderson [EMAIL PROTECTED] wrote: Hi, I have looked at that file, it doesn't really align with what I'm trying to do. It is still using most of osg, with a very light glut wrapper around it. I already have a fairly comprehensive system, with its own camera, mouse/keyboard handler, scenegraph, and so forth. I don't actually want to use the scenegraph part of osg if I can avoid it, as I'm trying to keep the application lightweight. I would like to use some parts of osg, like the 3d models and the terrain system. Towards that end, I've been trying to find a way to draw osg::node classes without having an osg::viewer realized Thanks for your help, -Mark On Thu, Jun 19, 2008 at 11:30 AM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Mark, Please look at the osgviewerGLUT example. On Thu, Jun 19, 2008 at 3:47 PM, Mark Henderson [EMAIL PROTECTED] wrote: I want to use the terrain and model systems from OSG, but all of my rendering is done in OpenGL and GLUT. It's not feasible to change the entire project to OSG rendering, so I'd like to know if there is any way to render osg::node or osg::drawable objects when not using osg::viewer and osg::renderer. The code I'd like to have would look something like this: glBegin(GL_LINES); blah blah glEnd(); osg::node* tempNode = myDatabase-getModelNodes(); for( int i = 0; i myDatabase-getModelNodeCount(); i++) tempNode[i].draw(); glBegin(GL_LINES); blah blah glEnd(); (The code is a little simplified, since I'm keeping track of transformation matrices for each model, but it gets the point across.) I can't seem to find anything like a draw function. I can't even figure out where in ViewerBase::renderingTraversals() it actually renders the nodes. ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using osg::node in glut renderer
Robert, The setViewport seems to do the trick. Thanks for the help. So what do the arguments do that are passed into the setUpViewerAsEmbeddedInWindow() do? Are they used internally to OSG? Also you made mention that you need to protect OpenGL rendering from OSG rendering. Are you suggesting that there's a way of doing this without having two separate contexts, one for OSG and one for OpenGL? It would be cool to ditch the overhead of context switching in a GLUT app... Thanks, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 20, 2008 9:14 AM To: OpenSceneGraph Users Subject: Re: [osg-users] using osg::node in glut renderer Hi Shane, After the setUpViewerASEmbeddedInWindow try setting the viewer's Camera's Viewport to the size you wish. ie.. viewer.getCamera()-getViewport()-setViewport(50,50, 200,200); Robert. On Fri, Jun 20, 2008 at 4:08 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Regarding the osgviewerGLUT example, is there any way to make the embedded window from the GraphicsWindowEmbedded feature smaller in size than the glut window? I bring this up because when I change the extents on the viewer-setUpViewerAsEmbeddedInWindow() it has no effect. It always uses the size of the GLUT window from glutInitWindowSize(). -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 20, 2008 2:21 AM To: OpenSceneGraph Users Subject: Re: [osg-users] using osg::node in glut renderer Hi Mark, The GraphicsWindowEmbedded feature of osgViewer allows osgviewerGLUT to just use an existing context, it does realize anything, so can fit right inside your own code. More of an issue is keeping OpenGL in sync between the two sets of rendering - you'll need to protect the OSG rendering from your OpenGL state changes, and visa versa. There's been lots written about this on osg-users so have a look through the archives. Finally I have to say bolting together two different scene graph side by side may well be possible, but it's unlikely to provide the great overall solution, it'll be a hack at best. The OSG itself has support for threading, multiple graphics context etc, and as such is very flexible and scalable, if you're bolting the OSG into an existing framework you can kiss goodbye to much of what makes the OSG powerful. Robert. On Thu, Jun 19, 2008 at 8:39 PM, Mark Henderson [EMAIL PROTECTED] wrote: Hi, I have looked at that file, it doesn't really align with what I'm trying to do. It is still using most of osg, with a very light glut wrapper around it. I already have a fairly comprehensive system, with its own camera, mouse/keyboard handler, scenegraph, and so forth. I don't actually want to use the scenegraph part of osg if I can avoid it, as I'm trying to keep the application lightweight. I would like to use some parts of osg, like the 3d models and the terrain system. Towards that end, I've been trying to find a way to draw osg::node classes without having an osg::viewer realized Thanks for your help, -Mark On Thu, Jun 19, 2008 at 11:30 AM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Mark, Please look at the osgviewerGLUT example. On Thu, Jun 19, 2008 at 3:47 PM, Mark Henderson [EMAIL PROTECTED] wrote: I want to use the terrain and model systems from OSG, but all of my rendering is done in OpenGL and GLUT. It's not feasible to change the entire project to OSG rendering, so I'd like to know if there is any way to render osg::node or osg::drawable objects when not using osg::viewer and osg::renderer. The code I'd like to have would look something like this: glBegin(GL_LINES); blah blah glEnd(); osg::node* tempNode = myDatabase-getModelNodes(); for( int i = 0; i myDatabase-getModelNodeCount(); i++) tempNode[i].draw(); glBegin(GL_LINES); blah blah glEnd(); (The code is a little simplified, since I'm keeping track of transformation matrices for each model, but it gets the point across.) I can't seem to find anything like a draw function. I can't even figure out where in ViewerBase::renderingTraversals() it actually renders the nodes. ___ 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
Re: [osg-users] using osg::node in glut renderer
Thank you! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Friday, June 20, 2008 10:01 AM To: OpenSceneGraph Users Subject: Re: [osg-users] using osg::node in glut renderer On Fri, Jun 20, 2008 at 4:44 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: So what do the arguments do that are passed into the setUpViewerAsEmbeddedInWindow() do? Are they used internally to OSG? The window position and dimensions are passed in so it can calibrate the viewport, the projection matrix and event handling. Also you made mention that you need to protect OpenGL rendering from OSG rendering. Are you suggesting that there's a way of doing this without having two separate contexts, one for OSG and one for OpenGL? It would be cool to ditch the overhead of context switching in a GLUT app... glPushAttrib()/glPopAttrib() are you friend here. You'll need it for your own code as well as the OSGs, do it at the top level so that each stage is protected from affect the other. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] camera view matrix problems...
I'm attempting to explicitly set the view matrix for a camera in osgViewer. I'm not using viewer-run() so I'm not using the default camera manipulator. Here's the code I'm using: osg::Matrixf vm; vm.setRotate(osg::Quat(0.0, osg::Vec3(0.0, 0.0, 1.0), 0.0, osg::Vec3(1.0, 0.0, 0.0), 0.0, osg::Vec3(0.0, 1.0, 0.0))); vm.setTrans(osg::Vec3f(eyex, eyey, eyez)); viewer-getCamera()-setViewMatrix(vm); I'm expecting to see a view of the terrain that is centered around (eyex, eyey, eyez) and I see nothing. Can someone tell me what I'm doing wrong in the code above? Thanks, -Shayne P.S. When I use the command: viewer-setViewMatrixAsLookAt() with the same eye point (with lookat and up vectors), I can see the terrain as expected. smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CmakeSetup problems...
In order to compile and run osgviewerWX example, I'm trying to build the VC++ project file using CMakeSetup. I've configured all the wxWidgets paths to configure, generate, and build but it still won't build the project file. In fact, CMakeSetup won't build any of the project files for any of the FLTK, GLUT, MFC, QT, etc., osgviewer examples. All other examples build and configure just fine. Is there another dependency that I need in CMakeSetup in order to build the project file for osgviewerWX? Any help or input would be appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] transformation question...
I have a transformation question I'm hoping someone can shed some light on. I have a camera that I can explicitly control by specifying a position and an orientation (using heading, pitch, roll) as input. I would like to define another view that uses the same position as the camera but uses an orientation (again heading, pitch, and roll) that is RELATIVE to the camera coordinate frame. In other words, a heading, pitch, and roll of 0.0 for this other view would yield the same axis coordinate frame as the camera. I've tried several things to get this to work and I've had no success. Obviously I'm doing something fundamentally wrong. If anyone has any ideas on how I can get this to work, it would be most appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] discontinuity in texture in VPB...followup
On a follow-up to my previous email, here's some info (via gdalinfo) on one of my tiles that might be helpful in diagnosing the problem. Driver: GTiff/GeoTIFF Files: w111.99_n41.10.tif Size is 9781, 8011 Coordinate System is: PROJCS[NAD83 / UTM zone 12N, GEOGCS[NAD83, DATUM[North_American_Datum_1983, SPHEROID[GRS 1980,6378137,298.2572221010002, AUTHORITY[EPSG,7019]], AUTHORITY[EPSG,6269]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4269]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,-111], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,50], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,26912]] Origin = (416757.000,4552963.220) Pixel Size = (0.300,-0.300) Metadata: AREA_OR_POINT=Area TIFFTAG_SOFTWARE=IMAGINE TIFF Support Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.11 $ $Date$ TIFFTAG_XRESOLUTION=1 TIFFTAG_YRESOLUTION=1 TIFFTAG_RESOLUTIONUNIT=1 (unitless) Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 416757.000, 4552963.200) (111d59'29.91W, 41d 7'25.33N) Lower Left ( 416757.000, 4550559.900) (111d59'28.74W, 41d 6'7.41N) Upper Right ( 419691.300, 4552963.200) (111d57'24.09W, 41d 7'26.39N) Lower Right ( 419691.300, 4550559.900) (111d57'22.96W, 41d 6'8.47N) Center ( 418224.150, 4551761.550) (111d58'26.42W, 41d 6'46.90N) Band 1 Block=9781x1 Type=Byte, ColorInterp=Red Band 2 Block=9781x1 Type=Byte, ColorInterp=Green Band 3 Block=9781x1 Type=Byte, ColorInterp=Blue --- -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] discontinuity in texture in VPB...
Robert, Thanks for the reply. This problem is ubiquitous with all the tiles that I use. I can give you any two tiles that are adjacent to each other and it will manifest the problem. The tiles are too large ~136MB for me to attach to email. I can try to send you some smaller image tiles that show the problem if it would help... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, December 10, 2008 11:28 AM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... HI Shayne, I looks like the reprojections that GDAL is used for has screwed up. I've never personally seen such errors. Are you able to isolate this problem to a particular tile/source imagery? Robert. On Wed, Dec 10, 2008 at 5:14 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: I've built a geocentric database using VBP 0.9.7. The imagery is GeoTiff tiles that are NAIP 1 meter UTM and the elevation is DTED level 1. The GeoTiffs appear to be reprojected by VPB (I assume using GDAL internally) for the geocentric database setting. Things appear to build just fine without error but when I view the database in OSG, I see a nasty discontinuity across texture tile boundaries. You can clearly see this in the airfield picture that is attached. The landing strip does not line up across the tile boundary. I've verified that the tiles themselves are correct across boundaries before I fed them into VPB. The discontinuity appears regardless of the LOD that is being paged in. My question is, is this an artifact that I must live with since the original imagery is based in UTM and the reprojection that VPB does (or GDAL) introduces inaccuracies when going to a geocentric database? Is there something else I can do to eliminate these discontinuities? Any input or ideas anyone can suggest to eliminate these discontinuities in the database would be welcome. Thanks, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Funding
X2!! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Martz Sent: Wednesday, December 10, 2008 3:44 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Funding I'm about to leave on a business trip, so have not read this entire thread. But I did want to point out two things... 1) Funding does, already, increase the robustness and the feature set of OSG. Robert, Bob Kuehne, myself, and others are making a living off of OSG development and in most cases we contribute back the new features and enhancements. 2a) If people feel compelled to donate, they can do so by ordering an OSG book from lulu.com or by purchasing OSG merchandise from http://www.cafepress.com/openscenegraph. Net proceeds from sales go to Bob Kuehne, Robert Osfield, and myself and help keep us in business. 2b) For larger scale donations, you can purchase an OSG support plan from Bob and I (http://blue-newt.com/products/) or from Robert. I can't comment on Robert's support model, but Bob and I offer support on any OSG version, complementary copies of our books, and a specified amount of consultation and development. So, in essence, the OSG team already exists. Lack of funding doesn't seem to be the issue so much as lack of experienced developers. To that end, I intend to hire two interns and train them in OSG over the next few months, funded by one of my clients. I imagine many on this list would be able to take on OSG dev contracts as well; you are free to join our ranks. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sukender Sent: Tuesday, December 09, 2008 2:46 PM To: OpenSceneGraph Users Subject: [osg-users] Funding Hi all, hi Robert, As requested (and as expected), I start another thread about funding / hiring employees / an OSG staff. (Reference: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2008- December/020389.html ) Before I start answering Robert, I'd like to say building up an OSG team sounds *very* interesting for *all* OSG users since it would increase the quality and the power on various aspects, and increase the visibility, and finaly making OSG the unavoidable reference library for scene graph (and more). (Note: by visibility, I mean working on a marketing / advertisment aspect) I really trust OSG, especially knowing that it's actively developped/supported and that there is a strong community around it. The problem is: how can a team be set up? Thread is opened. It would nice if we could raise the money for a team, but I don't think one could do it out of donations. We are talking about need to raise $USD 50k to 100k a year to bring on dedicated staff, I can't image us pulling in this type of donation each year. That's true. But maybe donations could be a begining? I'm thinking about donations because it can bring the starter point of something bigger. And maybe a part-time job to help you could do it at first? I'll send another mail about donations: I'll make a kind of poll to try to know how much money the community can bring to the project. That would be interesting and give you some clues about the fact that building a team is possible or not from donations. For fixed such salary costs you need a regular income to pay it, which points to a subscriptions model. Support contracts would fit the requirement of regular income [...] Well, I'm not really in favor of a subscriptions model, but it depends on how it is made. A very important point for me is that the community must *not* be weakened: I strongly disagree to kidnap the whole community and say hello folks! It's time to pay!, even if that happens elsewhere. However, there can be subscriptions and support contracts that don't weaken the community. I don't have much ideas at this moment, but that could be things like: - Subscriptions to an IM/voice support. - Consulting/expertise (well, as you already do I suppose). - On-demand tailor-made binaries generation. - On-demand tailor-made OSG extensions/customisations. - [Put your ideas here]. All of these require a team to work. So I guess that it will not be possible before step 2 or 3 of an OSG development plan. Again, that points to step 1: donations. Creating a team surely requires to be done step by step. What is more practical is leveraging a bit of time from a number of different osg users. This is effectively what we do right now, although not always as effectively and consistently as is desirable As I said before, the community is a (the?) great value of OSG. But maybe these generous volunteers have to be managed a bit by another volunteer? I mean a kind of admin that only tries to follow what has to be done, what is done, who does it... and so on. I guess this would not take much time. Maybe I can help on that point if you wish, since I'm not an OSG expert and thus not able to help
Re: [osg-users] discontinuity in texture in VPB...
Thanks for the help. I will try these suggestions to further investigate this problem... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J.P. Delport Sent: Wednesday, December 10, 2008 11:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi, I'd also suggest what Christophe said. Do the projection of some tiles manually before VPB is run. I normally use something like: gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear $name ../reprojected/$newname Then load the tiles into something like QGIS (http://www.qgis.org/) to see if they line up. jp christophe loustaunau wrote: Hi Shayne, Maybe you could reproject your imagery to a geographic projection with gdal (gdal_translate) and see if you have the same artifact. You will know if it's a VPB or a gdal reprojection problem. On Wed, Dec 10, 2008 at 6:14 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I've built a geocentric database using VBP 0.9.7. http://0.9.7. The imagery is GeoTiff tiles that are NAIP 1 meter UTM and the elevation is DTED level 1. The GeoTiffs appear to be reprojected by VPB (I assume using GDAL internally) for the geocentric database setting. Things appear to build just fine without error but when I view the database in OSG, I see a nasty discontinuity across texture tile boundaries. You can clearly see this in the airfield picture that is attached. The landing strip does not line up across the tile boundary. I've verified that the tiles themselves are correct across boundaries before I fed them into VPB. The discontinuity appears regardless of the LOD that is being paged in. My question is, is this an artifact that I must live with since the original imagery is based in UTM and the reprojection that VPB does (or GDAL) introduces inaccuracies when going to a geocentric database? Is there something else I can do to eliminate these discontinuities? Any input or ideas anyone can suggest to eliminate these discontinuities in the database would be welcome. Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Christophe Loustaunau. ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] discontinuity in texture in VPB...
Umit, I didn't think that the --geocentric and --TERRAIN options were mutually exclusive. At any rate, I removed the --TERRAIN option and the problem still exists. Thanks for the suggestion... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun Sent: Friday, December 12, 2008 12:02 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi Tueller, Do you want geocentric or terrain database? As I know you should use one option in the command line. --Terrain or --geocentric Try use only one option again. HTH Regards. 2008/12/12 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil All, I finally have two small Geotiff tiles (1m resolution) that I've experimented with to examine this problem. I run them through VPB and they first get reprojected (via GDAL I presume) into temporary files. I then load the two temporary reprojected files into OpenEV for examination and they still appear to line up as they did before being reprojected. That would seem to suggest that the problem isn't with the reprojection step (or what GDAL is doing). Once VPB installs them into the database, they do NOT line up as I have shown in my previous email with the screen capture. This would suggest that VPB is doing something that is shifting them off so they don't align. I've attached the two GeoTiff tiles if anyone wants to reproduce this problem. Using VPB, I'm issuing the command: osgdem --TERRAIN --PagedLOD --geocentric -t hillsmall -l 8 -o hillsmall.ive The hillsmall directory contains the two tiles. Interestingly, when I remove the --geocentric flag from the above command, things look fine for a flat database and the tiles align (which isn't surprising). It's almost as if the spheroid between the tiles and what VPB is using are not matched. Any ideas on what's going on? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Wednesday, December 10, 2008 11:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi, I'd also suggest what Christophe said. Do the projection of some tiles manually before VPB is run. I normally use something like: gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear $name ../reprojected/$newname Then load the tiles into something like QGIS (http://www.qgis.org/) to see if they line up. jp christophe loustaunau wrote: Hi Shayne, Maybe you could reproject your imagery to a geographic projection with gdal (gdal_translate) and see if you have the same artifact. You will know if it's a VPB or a gdal reprojection problem. On Wed, Dec 10, 2008 at 6:14 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil mailto:shayne.tuel...@hill.af.mil wrote: I've built a geocentric database using VBP 0.9.7. http://0.9.7. The imagery is GeoTiff tiles that are NAIP 1 meter UTM and the elevation is DTED level 1. The GeoTiffs appear to be reprojected by VPB (I assume using GDAL internally) for the geocentric database setting. Things appear to build just fine without error but when I view the database in OSG, I see a nasty discontinuity across texture tile boundaries. You can clearly see this in the airfield picture that is attached. The landing strip does not line up across the tile boundary. I've verified that the tiles themselves are correct across boundaries before I fed them into VPB. The discontinuity appears regardless of the LOD that is being paged in. My question is, is this an artifact that I must live with since the original imagery is based in UTM and the reprojection that VPB does (or GDAL) introduces inaccuracies when going to a geocentric database? Is there something else I can do to eliminate these discontinuities? Any input or ideas anyone can suggest to eliminate these discontinuities in the database would be welcome. Thanks, -Shayne
Re: [osg-users] discontinuity in texture in VPB...
Christophe, That is good news! Thanks for finding that and thanks for your help. I suspect that VPB intended to use the reprojected data but is failing to do so for some reason. I will debug it to find out why it is ignoring the reprojected files and submit a fix unless someone else that is more familiar with the VPB code knows where to look to fix the problem. Thanks again! -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of christophe loustaunau Sent: Friday, December 12, 2008 1:18 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi, I have test your data and there is strange things. If I use this command line : osgdem --terrain --geocentric -t hillsmall -o hillsmall.ive osgdem reproject the two Geotiff and create two temporary files. But it seems not to use it, as in the output database the tiles no not line up. But if you put these two temporary files into the directory /hillsmall and run again osgdem with the same command line osgdem --terrain --geocentric -t hillsmall -o hillsmall.ive The output database is ok, everything lines up ! (see the sceenshot). I think osgdem do not use the temporary files, but I don't know why. Maybe you could debug it. Anyway, you could reproject you files and then everything will work fine ! Hope this help. Regards. On Fri, Dec 12, 2008 at 7:46 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I finally have two small Geotiff tiles (1m resolution) that I've experimented with to examine this problem. I run them through VPB and they first get reprojected (via GDAL I presume) into temporary files. I then load the two temporary reprojected files into OpenEV for examination and they still appear to line up as they did before being reprojected. That would seem to suggest that the problem isn't with the reprojection step (or what GDAL is doing). Once VPB installs them into the database, they do NOT line up as I have shown in my previous email with the screen capture. This would suggest that VPB is doing something that is shifting them off so they don't align. I've attached the two GeoTiff tiles if anyone wants to reproduce this problem. Using VPB, I'm issuing the command: osgdem --TERRAIN --PagedLOD --geocentric -t hillsmall -l 8 -o hillsmall.ive The hillsmall directory contains the two tiles. Interestingly, when I remove the --geocentric flag from the above command, things look fine for a flat database and the tiles align (which isn't surprising). It's almost as if the spheroid between the tiles and what VPB is using are not matched. Any ideas on what's going on? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Wednesday, December 10, 2008 11:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi, I'd also suggest what Christophe said. Do the projection of some tiles manually before VPB is run. I normally use something like: gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear $name ../reprojected/$newname Then load the tiles into something like QGIS (http://www.qgis.org/) to see if they line up. jp christophe loustaunau wrote: Hi Shayne, Maybe you could reproject your imagery to a geographic projection with gdal (gdal_translate) and see if you have the same artifact. You will know if it's a VPB or a gdal reprojection problem. On Wed, Dec 10, 2008 at 6:14 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil mailto:shayne.tuel...@hill.af.mil wrote: I've built a geocentric database using VBP 0.9.7. http://0.9.7. The imagery is GeoTiff tiles that are NAIP 1 meter UTM and the elevation is DTED level 1. The GeoTiffs appear to be reprojected by VPB (I assume using GDAL internally) for the geocentric database setting. Things appear to build just fine without error but when I view the database in OSG, I see a nasty discontinuity across texture tile boundaries. You can clearly see this in the airfield picture that is attached. The landing strip does not line up across the tile boundary. I've verified that the tiles themselves are correct across boundaries before I
Re: [osg-users] discontinuity in texture in VPB...
Thanks Glenn. That will help narrow it down. It is curious that --LOD works and --PagedLOD doesn't. Anyway, every little bit helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Friday, December 12, 2008 3:14 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Shayne, I just ran your test and reproduced the problem. BUT: when I changed --PagedLOD to --LOD, it came out correctly. Hope that helps you track it down.. Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 On Fri, Dec 12, 2008 at 1:46 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I finally have two small Geotiff tiles (1m resolution) that I've experimented with to examine this problem. I run them through VPB and they first get reprojected (via GDAL I presume) into temporary files. I then load the two temporary reprojected files into OpenEV for examination and they still appear to line up as they did before being reprojected. That would seem to suggest that the problem isn't with the reprojection step (or what GDAL is doing). Once VPB installs them into the database, they do NOT line up as I have shown in my previous email with the screen capture. This would suggest that VPB is doing something that is shifting them off so they don't align. I've attached the two GeoTiff tiles if anyone wants to reproduce this problem. Using VPB, I'm issuing the command: osgdem --TERRAIN --PagedLOD --geocentric -t hillsmall -l 8 -o hillsmall.ive The hillsmall directory contains the two tiles. Interestingly, when I remove the --geocentric flag from the above command, things look fine for a flat database and the tiles align (which isn't surprising). It's almost as if the spheroid between the tiles and what VPB is using are not matched. Any ideas on what's going on? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Wednesday, December 10, 2008 11:39 PM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi, I'd also suggest what Christophe said. Do the projection of some tiles manually before VPB is run. I normally use something like: gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear $name ../reprojected/$newname Then load the tiles into something like QGIS (http://www.qgis.org/) to see if they line up. jp christophe loustaunau wrote: Hi Shayne, Maybe you could reproject your imagery to a geographic projection with gdal (gdal_translate) and see if you have the same artifact. You will know if it's a VPB or a gdal reprojection problem. On Wed, Dec 10, 2008 at 6:14 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil mailto:shayne.tuel...@hill.af.mil wrote: I've built a geocentric database using VBP 0.9.7. http://0.9.7. The imagery is GeoTiff tiles that are NAIP 1 meter UTM and the elevation is DTED level 1. The GeoTiffs appear to be reprojected by VPB (I assume using GDAL internally) for the geocentric database setting. Things appear to build just fine without error but when I view the database in OSG, I see a nasty discontinuity across texture tile boundaries. You can clearly see this in the airfield picture that is attached. The landing strip does not line up across the tile boundary. I've verified that the tiles themselves are correct across boundaries before I fed them into VPB. The discontinuity appears regardless of the LOD that is being paged in. My question is, is this an artifact that I must live with since the original imagery is based in UTM and the reprojection that VPB does (or GDAL) introduces inaccuracies when going to a geocentric database? Is there something else I can do to eliminate these discontinuities? Any input or ideas anyone can suggest to eliminate these discontinuities in the database would be welcome. Thanks, -Shayne
[osg-users] another VPB question...
All, Occasionally I get the following warning when I'm building a database using VPB: Warning 1: PackBitsDecode:Discarding 52 bytes to avoid buffer overrun Does anyone know what this pertains to or why it is happening? Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] another VPB question...
Thanks Robert. I'll give the GDAL folks a shout to see what they have to say... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, December 19, 2008 2:27 AM To: OpenSceneGraph Users Subject: Re: [osg-users] another VPB question... HI Shayne, This isn't a error message that I've written so it must be some that GDAL is emitting. As to why I cannot say. Perhaps the GDAL community might be familiar with it. Robert. On Thu, Dec 18, 2008 at 9:58 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, Occasionally I get the following warning when I'm building a database using VPB: Warning 1: PackBitsDecode:Discarding 52 bytes to avoid buffer overrun Does anyone know what this pertains to or why it is happening? Thanks, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vpb - strange tile corner artifacts
Guys, Is this fix able to be rolled into older versions of VPB? I'm using 0.9.7... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Friday, December 19, 2008 2:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] vpb - strange tile corner artifacts Hi, good, I've also tested the fix with vpb HEAD and it seems OK. Busy testing on a larger database and if it works I'll submit the fix. jp christophe loustaunau wrote: Hi, I have no bug with r932 and your file. It seems to be good ! On Fri, Dec 19, 2008 at 10:05 AM, J.P. Delport jpdelp...@csir.co.za mailto:jpdelp...@csir.co.za wrote: Hi, christophe loustaunau wrote: You're near the bug ! :-) Looking at the log, i see that in destination.cpp ,the function : void DestinationTile::equalizeCorner(Position position) have been change. It may be here. Yes, this was my first place to look too. I think I found the error, getImageSet(layerNum) was called on the wrong DestinationTile. Could you try this file with r932 and see if you get OK results, I want to double check before I see if the fix works with vpb HEAD. jp -- 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 mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Christophe Loustaunau. ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vpb - strange tile corner artifacts
Ok I misunderstood. I thought you were referring to earlier versions of VPB that manifested the artifact. 0.9.7 seems just fine. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Friday, December 19, 2008 8:56 AM To: OpenSceneGraph Users Subject: Re: [osg-users] vpb - strange tile corner artifacts Hi Shayne, no, the fix is for a problem that was introduced after 0.9.7. The problem came with r932 and from the vpb trac site 0.9.7 was r904. Do you have problems with 0.9.7? regards jp Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: Guys, Is this fix able to be rolled into older versions of VPB? I'm using 0.9.7... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Friday, December 19, 2008 2:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] vpb - strange tile corner artifacts Hi, good, I've also tested the fix with vpb HEAD and it seems OK. Busy testing on a larger database and if it works I'll submit the fix. jp christophe loustaunau wrote: Hi, I have no bug with r932 and your file. It seems to be good ! On Fri, Dec 19, 2008 at 10:05 AM, J.P. Delport jpdelp...@csir.co.za mailto:jpdelp...@csir.co.za wrote: Hi, christophe loustaunau wrote: You're near the bug ! :-) Looking at the log, i see that in destination.cpp ,the function : void DestinationTile::equalizeCorner(Position position) have been change. It may be here. Yes, this was my first place to look too. I think I found the error, getImageSet(layerNum) was called on the wrong DestinationTile. Could you try this file with r932 and see if you get OK results, I want to double check before I see if the fix works with vpb HEAD. jp -- 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 mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Christophe Loustaunau. ___ 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 -- 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] overriding keyboard events in osgViewer::View...
All, This may be a stupid and/or trivial question but here goes. Is there a way to override the default keyboard event handlers when using an osgViewer::View class? For example, if I create a viewer and then press the l (lowercase L) key, it causes my rendered scene to enable and disable lighting. I want a different behavior when I press this key and other keys. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] overriding keyboard events in osgViewer::View...
Thank you Robert. That helps a lot...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, January 07, 2009 4:55 AM To: OpenSceneGraph Users Subject: Re: [osg-users] overriding keyboard events in osgViewer::View... Hi Shayne, There are no default event handlers in osgViewer save for the escape sets done facility that you can turn off via viewer.setKeyEventSetsDone(0); From your email it looks like you must be manually adding the osgGA::StateSetManipulator, and if you still want this functionality but want to customize the keys ysed just use the its setKeyEvent*() methods: void setKeyEventToggleBackfaceCulling(int key) { _keyEventToggleBackfaceCulling = key; } void setKeyEventToggleLighting(int key) { _keyEventToggleLighting = key; } void setKeyEventToggleTexturing(int key) { _keyEventToggleTexturing = key; } void setKeyEventCyclePolygonMode(int key) { _keyEventCyclePolygonMode = key; } Robert. On Wed, Jan 7, 2009 at 12:25 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, This may be a stupid and/or trivial question but here goes. Is there a way to override the default keyboard event handlers when using an osgViewer::View class? For example, if I create a viewer and then press the l (lowercase L) key, it causes my rendered scene to enable and disable lighting. I want a different behavior when I press this key and other keys. Thanks, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Head mounted display for OSG...
Can anyone give me an update on the maturity of the head mounted display support in OSG? Is it a work in progress? What is its capability? Any input or details would be appreciated. Also does anyone have a particular recommendation for a Head-mounted display brand or hardware that works well with OSG? Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Head mounted display for OSG...
David, Thanks for that feedback. This will help out...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David Spilling Sent: Wednesday, January 07, 2009 3:16 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Head mounted display for OSG... Shayne, We use these (http://www.vuzix.com/iwear/products_vr920.html) experimentally, because they are cheap, and slightly surprisingly support quad buffer stereo, which means they more or less work with OSG (on Nvidia Quadro's, at least) straight out of the box. Unfortunately, most of our in-house OSG apps hijack the camera in one way or another and assume that they are not being run stereo, so all goes a bit awry. Work in progress... David smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] altitude terrain shading...
All, I have a requirement to do some altitude shading (coloring) to a terrain database based off a referenced altitude. In other words, I would like to shade the terrain to be green below a given altitude and then shade it brown at or above the given altitude. The reference altitude basically represents the horizontal plane that intersects the terrain database. Any terrain below the plane is shaded green and any terrain above the plane is shaded brown. My question is, is there any support in OSG that will allow me to do something like this? My terrain is a database built with VPB. Any input would be most appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altitude terrain shading...
Thanks to everyone that responded to my inquiry. I'll try the TexGen approach first and then do a shader at a later time... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, January 15, 2009 1:58 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Hi Shayne, The standard way to do this would be to use a Texture1D for the colour banding and TexGenNode to compute the tex coords for you. See the osgtexture1D example. Robert. On Wed, Jan 14, 2009 at 10:42 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I have a requirement to do some altitude shading (coloring) to a terrain database based off a referenced altitude. In other words, I would like to shade the terrain to be green below a given altitude and then shade it brown at or above the given altitude. The reference altitude basically represents the horizontal plane that intersects the terrain database. Any terrain below the plane is shaded green and any terrain above the plane is shaded brown. My question is, is there any support in OSG that will allow me to do something like this? My terrain is a database built with VPB. Any input would be most appreciated. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altitude terrain shading...
Thanks Gordon. Good points for using a shader. Are there any performance hits with doing this at a pixel level? I wouldn't think so since the shader is pretty thin... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Thursday, January 15, 2009 9:07 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... With the Shader approach you still typically use a 1d texture, but can have good control of what color a pixel gets and you can place palettes in the texture etc.. Works well Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Thursday, January 15, 2009 11:04 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Thanks to everyone that responded to my inquiry. I'll try the TexGen approach first and then do a shader at a later time... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, January 15, 2009 1:58 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Hi Shayne, The standard way to do this would be to use a Texture1D for the colour banding and TexGenNode to compute the tex coords for you. See the osgtexture1D example. Robert. On Wed, Jan 14, 2009 at 10:42 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I have a requirement to do some altitude shading (coloring) to a terrain database based off a referenced altitude. In other words, I would like to shade the terrain to be green below a given altitude and then shade it brown at or above the given altitude. The reference altitude basically represents the horizontal plane that intersects the terrain database. Any terrain below the plane is shaded green and any terrain above the plane is shaded brown. My question is, is there any support in OSG that will allow me to do something like this? My terrain is a database built with VPB. Any input would be most appreciated. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altitude terrain shading...
Gerwin, Thanks for the input. I will code a shader up to see how it looks. Your work sounds very interesting indeed... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Gerwin de Haan Sent: Saturday, January 17, 2009 8:02 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Dear Shayne, Recently I used a vertex+fragment shader to do color-coding of altitude of a terrain model in OSG. I don't have exact measurements, but I did not experience (nor expected) noticeable performance issues. In this typical case I used a simple in-shader colormapping (like going from blue-to-yellow), but a 1D texture lookup gives you more flexibility in coloring (as Gordon mentions, I see now). To get your z-value in the fragment shader, you would typically use a varying float my_attitude in both shaders, fill it in the vertex shader :my_attitude=glVertex.z, and use it in the fragment shader, e.g. gl_FragColor = vec4(my_attitude,my_attitude,my_attitude,1.0). I here consider the z to be normalized between [0..1], and generate a color from black to white through grey. I did experience some unpleasant side-effects in VPB-generated terrains in POLYGONAL mode: the lower LOD levels have bigger rough polys that pop in and out. With regular textures (e.g. aerial photographs) you barely notice popping, but with artificial coloring you really emphasize this and polygon ridges tend to stand out. Not too much you could do about that, other than having extra/other data besides the POLYGONAL terrain. I am now using a custom point-cloud terrain generated from LiDAR data, which solves some of these coloring issues but has other problems. To give you an idea of the colormapping effect using the same shader on this data (shameless plug alert), see http://graphics.tudelft.nl/~gerwin/media/3dtopo/Screenshot_pointcloud.png good luck, Gerwin On Thu, Jan 15, 2009 at 5:42 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Thanks Gordon. Good points for using a shader. Are there any performance hits with doing this at a pixel level? I wouldn't think so since the shader is pretty thin... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Thursday, January 15, 2009 9:07 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... With the Shader approach you still typically use a 1d texture, but can have good control of what color a pixel gets and you can place palettes in the texture etc.. Works well Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Thursday, January 15, 2009 11:04 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Thanks to everyone that responded to my inquiry. I'll try the TexGen approach first and then do a shader at a later time... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, January 15, 2009 1:58 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altitude terrain shading... Hi Shayne, The standard way to do this would be to use a Texture1D for the colour banding and TexGenNode to compute the tex coords for you. See the osgtexture1D example. Robert. On Wed, Jan 14, 2009 at 10:42 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I have a requirement to do some altitude shading (coloring) to a terrain database based off a referenced altitude. In other words, I would like to shade the terrain to be green below a given altitude and then shade it brown at or above the given altitude. The reference altitude basically represents the horizontal plane that intersects the terrain database. Any terrain below the plane is shaded green and any terrain above the plane is shaded brown. My question is, is there any support in OSG that will allow me to do something like this? My terrain is a database built with VPB. Any input would be most appreciated. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http
Re: [osg-users] osgEarth - terrain on demand
Glenn, It looks like a great product. I look forward to exploring this in more detail... Great job... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, January 22, 2009 6:20 AM To: OpenSceneGraph Users Subject: [osg-users] osgEarth - terrain on demand Announcing osgEarth, a new open source toolkit that enables on-demand terrain generation in OpenSceneGraph applications. osgEarth brings web-based geospatial visualization to OSG. It it built on the osgTerrain library, and operates in a manner similar to the technology that underlies products like NASA WorldWind, Google Earth, or Microsoft Virtual Earth. With osgEarth you can generate a terrain model at run-time by connecting to a wide variety of imagery and elevation data sources, including WMS, TMS, Google maps, TIFF files, and more. Or extend it by writing your own driver. osgEarth is LGPL. Visit the wiki to download it and give it a try! http://osgearth.org Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : +1.703.652.4791 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About OpenGL materials
This may be a naive comment but couldn't you leverage something similar to glColorMaterial() to accomplish the task? Just a thought... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, February 04, 2009 3:43 PM To: OpenSceneGraph Users Subject: Re: [osg-users] About OpenGL materials Hi Gordon, (sorry, sent before I had finished typing...) No Lighting = No Material Hmmm, and any way to make it so that lighting has no effect (even though it's on) for a given object? I thought about putting a 1x1 texture with in GL_DECAL mode, but then I would need a texture for each color I want in my models (since it would even override the material color) right? What I'm getting at is I'm very flexible as to how I get the color onto my model, as long as it isn't through the vertex colors since that overrides the scribe/outline effect's color. You probably could do this with in a shader but you would have to replicate the full fixed pipeline calculation of lighting,materials, textures , fogs etc ( which you have to do anyway ) I already have shaders for most of the fixed pipeline (what I need) but these can be disabled by the user, and whatever I'm trying to display would need to look the same both with shaders on and off... So I need a solution that works for the fixed pipeline too. I'll try to think about another way... 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Composite viewer vs. Viewer
All, Can anyone tell me if the composite viewer uses the same threading models/schemes as the regular viewer? Also does the regular viewer have any advantages over the composite viewer in terms of rendering performance when using multiple cameras? The latter question may be a bit too vague so please accept my apologies if it is. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Composite viewer vs. Viewer
Thank you!! -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, February 12, 2009 12:46 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Composite viewer vs. Viewer Hi Shayne, osgViewer::Viewer and osgViewer::CompositeViewer both use the same threading and rendering code, found in the common base class osgViewer::ViewerBase's renderingTraversals() method. This means that is pretty well no difference in threading models supported, nor performance, nor how they handle multiple cameras. The difference is all in the high level interfaces to the viewers, each targets a different class of viewer usage. Robert. On Thu, Feb 12, 2009 at 7:30 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, Can anyone tell me if the composite viewer uses the same threading models/schemes as the regular viewer? Also does the regular viewer have any advantages over the composite viewer in terms of rendering performance when using multiple cameras? The latter question may be a bit too vague so please accept my apologies if it is. Thanks, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
Microsoft's mantra from the get go has been to kill OpenGL. Much to their dismay and despite their bully tactics, OpenGL is still here...and growing. I know in the IG world, most IG vendors (Rockwell-Collins, Quantum, Aechelon, etc.) out there are using OpenGL and most are using Windows as the OS. The only IG vendor I'm aware of that is using D3D on Windows is MetaVR. D3D has a stranglehold on the gaming market but that is really all they have. Most professional apps outside of this realm are using OpenGL. I refuse to drink the Microsoft Kool-Aid and I believe OpenGL will not only continue to persist but it will flourish. If anything, OpenGL should exist so that developers don't have to crawl to Microsoft to do their 3D graphics apps. Thanks goodness that OpenGL is cross-platform and D3D is not. -S -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, February 24, 2009 10:45 AM To: OpenSceneGraph Users Subject: Re: [osg-users] OFT: Interesting commentary of the future of OpenGL Hi Paul, Hm. Perhaps this is an appropriate time for me to unveil my discussion forum, in which I have a blog stating my own opinions of OpenGL versus D3D: http://www.skew-matrix.com/bb/viewtopic.php?f=3t=2 Nice post, I agree. That Tom's Hardware article was buying into Microsoft's misinformation, but you present the facts. But regarding MS dropping D3D, don't hold your breath :-) I've got your message board bookmarked. :-) 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
Agreed, but we can still complain that OpenGL isn't moving forward fast enough for us, right? Absolutely...given the rate that the hardware is evolving in terms of capability and programmability. Now, where's my GLSL IDE...:) smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
Outside of the gaming industry, I think it's safe to say that most professional graphics apps are using OGL. Practically everything from visualization software in the oil industry to the image generator industry is using OSG and/or OGL in their applications. It shouldn't be a problem in getting these folks to step up in OGL's defense. Our particular shop is porting over to using OSG because it uses OpenGL and not D3D. That was a big factor in our decision. -S -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, February 25, 2009 2:00 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OFT: Interesting commentary of the future of OpenGL Hi Paul, On Wed, Feb 25, 2009 at 8:42 PM, Paul Martz pma...@skew-matrix.com wrote: What specific ideas do you have for supporting OpenGL? The ARB has a marketing subgroup that might be interested in hearing about our desire to help out. Just off the top of my head, I imagine some kind of press release from the OpenSceneGraph community, perhaps signed/endorsed by several of us here on the list, which might get some visibility on opengl.org and khronos.org, maybe some other places as well. I don't have any strong ideas, it's just a sense that perhaps we should get our act together an as one instigate a campaign of support for OpenGL and hold the hardware vendors toes to the fire a little was well ;-) We have lots of big companies that use the OSG, these are the types of groups to step up and say OpenGL is real important. Big open source projects could step up as well. I'm not marketing person, so not well equipped to come up with snappy campaign or who to smooze to get them to sign up. Coordinate with ARB would be OK, but personally I'd want it to be a message from the community of OpenGL users rather than a marketing campain for the ARB/vendors. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
I agree with what is said here. From my experience, generalization and high performance end up being mutually exclusive. Eventually you have to surrender to one to obtain the other... -S -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jan Ciger Sent: Wednesday, February 25, 2009 3:04 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OFT: Interesting commentary of the future of OpenGL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Sukender wrote: Hi Robert, Well yes, I forgot about XBox... So yes, the wrapper may be a solution. However, I'd like to insist on the fact that we should attract D3D devs by telling them that we're going towards an API agnostic scene graph, and them see with them what we may/should do about D3D support. Honestly, I wouldn't care too much about platforms like XBox - it is here for a year or two more and the next XBox is likely to be very different. However the OSG devs will have invested lot of time into the D3D infrastructure that will be obsolete when the new XBox is out. Then what? Chase the moving target again? What for? To be competing with things like the Source engine or others that do not care about OpenGL and can be tightly optimized for D3D? If you want to develop Windows/XBox games using OSG, be my guest, but we should not try to target every possible rendering API which is there. I prefer a tool that does one thing and does it well to a jack of all trades that does everything but nothing well. I think OSG only stands to lose by fragmentation of the development resources if Direct 3D was to be supported, and for very little gain. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJpcA4n11XseNj94gRApOdAKCKxKP/FHtg32r6/9bTgTxCrDDTMgCdH9S1 17sO+UBnLaYcMru0Unzc+K0= =8Btb -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
This seems mostly to be a pretty pragmatic bunch of people, so I'm fairly confident that if D3D support doesn't materialize, it is for technical rather than religious reasons. Thanks, Cory One technical feature I can think of is that OGL is cross platform, running on everything from supercomputers to hand-held devices. D3D is a NO-OP in this regard. That alone should rule out D3D as far as OSG is concerned. It's probably the main reason that OGL has survived up to this point despite Microsoft's efforts to kill it off. Don't underestimate the applications out there that are using OGL...that don't run on Windows...or that run on both Windows and something else... For the record (and a disclaimer), my comments here are simply my opinion. Obviously I'm not biased...;^) It's not my intention here to fan any flames of discontent. I just like adding my .02...well...maybe my .05...:) smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OFT: Interesting commentary of the future of OpenGL
It works on Windows *and* XBox 360! Hmmm...is that really cross-platform since the embedded OS on Xbox 360 really has its roots in Windows 2000? While the Xbox 360 is technically a different platform, it still has Microsoft all over it. I guess if one drinks the Microsoft Kool-Aid, then I'll concede their so-called cross-platform claim. In the context (no pun intended) I was thinking of, cross-platform means different hardware AND different OS...that doesn't have Microsoft's fingerprints all over it... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly Sent: Thursday, February 26, 2009 5:36 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OFT: Interesting commentary of the future of OpenGL Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: One technical feature I can think of is that OGL is cross platform, running on everything from supercomputers to hand-held devices. D3D is a NO-OP in this regard. That alone should rule out D3D as far as OSG is concerned. That's not true at all! D3D is cross-platform! It works on Windows *and* XBox 360! (I've actually seen Microsoft call this cross-platform in the developer docs. Seriously.) --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] second newbie question reiterated withdrawLi(UNCLASSIFIED)
Are you rendering with lighting enabled or disabled? I notice that along with setting the color array, you are setting a normal array in your code below. Normally (no pun intended) you supply a normal array if lighting is enabled... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 10:40 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLi(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE If i remove the matrix transform that performs the rotation for the the right triangle, i get the correct color on my triangle. i don't understand why. help. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 11:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLin(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE I thought that this code in drawLines sets the color. The strange thing is that the first triangle that I draw is the wrong color and the second triangle is the correct color and they are both drawn from the same geode. i'm totally confused. // pass the created vertex array to the points geometry object. linesGeom-setVertexArray(vertices); // set the colors as before, plus using the above osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4( colorVec[colorIndex][0], colorVec[colorIndex][1], colorVec[colorIndex][2], colorVec[colorIndex][3])); linesGeom-setColorArray(colors); linesGeom-setColorBinding(osg::Geometry::BIND_OVERALL); -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Thursday, March 12, 2009 11:11 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLine(UNCLASSIFIED) You do not show how you set the color and material on the triangles If this is not specified then you will pickup what ever the last color and/or material that was used by Opengl Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 12:04 PM To: OpenSceneGraph Users Subject: [osg-users] second newbie question reiterated with drawLine(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE Any insight would be welcome. So I'm drawing several triangles on my scene. here is the code that draws the first 2. I'm reusing the first same geode. The strange thing is that the 'right triangle' is a different color (black) than the 'left triangle' (light green) I'm actually drawing 2 others and they are black too. I need them to be green. Can anyone tell me what I'm doing wrong? It makes no sense to me. Danny osg::Vec3Array* tri = new osg::Vec3Array; tri-push_back(osg::Vec3(0.0f, -0.1f, depth)); tri-push_back(osg::Vec3(0.1f, 0.0f, depth)); tri-push_back(osg::Vec3(0.0f, 0.1f, depth)); osg::ref_ptrosg::Geode triangle = new osg::Geode(); triangle-addDrawable( drawLines( tri, 0 ) ); // right triangle { osg::ref_ptrosg::MatrixTransform translate = new osg::MatrixTransform; osg::Matrix tran_mat = osg::Matrix::translate( hud_aspect,0.0f, 0.0f ); translate-setMatrix( tran_mat ); osg::ref_ptrosg::MatrixTransform rotate = new osg::MatrixTransform; osg::Matrix rot_mat = osg::Matrix::rotate( M_PI, 0.0f, 0.0f, 1.0f); rotate-setMatrix( rot_mat ); camera-addChild(translate.get()); translate-addChild( rotate.get() ); rotate-addChild( triangle.get() );; } // left triangle { osg::Matrix m; osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform; m.makeTranslate( -hud_aspect, 0.0f, 0.0f ); mt-setMatrix( m ); camera-addChild(mt.get()); mt-addChild( triangle.get() );. } // create LINES osg::Geometry * drawLines( osg::Vec3Array * vertices, int colorIndex ) { // create Geometry object to store all the vertices and lines primitive. osg::Geometry* linesGeom = new osg::Geometry(); // pass the created vertex array to the points geometry object.
Re: [osg-users] second newbie question reiterated withdrawLi(UNCLASSIFIED)
Another thought...if you do have lighting enabled, your lighting normals on the black triangle could be facing the opposite direction from the light source which might explain the black color. It might also explain why when you fiddle with the matrix transform, the triangle color shows up (i.e. the triangle is oriented towards the light source)... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 10:40 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLi(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE If i remove the matrix transform that performs the rotation for the the right triangle, i get the correct color on my triangle. i don't understand why. help. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 11:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLin(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE I thought that this code in drawLines sets the color. The strange thing is that the first triangle that I draw is the wrong color and the second triangle is the correct color and they are both drawn from the same geode. i'm totally confused. // pass the created vertex array to the points geometry object. linesGeom-setVertexArray(vertices); // set the colors as before, plus using the above osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4( colorVec[colorIndex][0], colorVec[colorIndex][1], colorVec[colorIndex][2], colorVec[colorIndex][3])); linesGeom-setColorArray(colors); linesGeom-setColorBinding(osg::Geometry::BIND_OVERALL); -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users- boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Thursday, March 12, 2009 11:11 AM To: OpenSceneGraph Users Subject: Re: [osg-users] second newbie question reiterated withdrawLine(UNCLASSIFIED) You do not show how you set the color and material on the triangles If this is not specified then you will pickup what ever the last color and/or material that was used by Opengl Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Konkle, Daniel T AMRDEC/Dynetics Sent: Thursday, March 12, 2009 12:04 PM To: OpenSceneGraph Users Subject: [osg-users] second newbie question reiterated with drawLine(UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE Any insight would be welcome. So I'm drawing several triangles on my scene. here is the code that draws the first 2. I'm reusing the first same geode. The strange thing is that the 'right triangle' is a different color (black) than the 'left triangle' (light green) I'm actually drawing 2 others and they are black too. I need them to be green. Can anyone tell me what I'm doing wrong? It makes no sense to me. Danny osg::Vec3Array* tri = new osg::Vec3Array; tri-push_back(osg::Vec3(0.0f, -0.1f, depth)); tri-push_back(osg::Vec3(0.1f, 0.0f, depth)); tri-push_back(osg::Vec3(0.0f, 0.1f, depth)); osg::ref_ptrosg::Geode triangle = new osg::Geode(); triangle-addDrawable( drawLines( tri, 0 ) ); // right triangle { osg::ref_ptrosg::MatrixTransform translate = new osg::MatrixTransform; osg::Matrix tran_mat = osg::Matrix::translate( hud_aspect,0.0f, 0.0f ); translate-setMatrix( tran_mat ); osg::ref_ptrosg::MatrixTransform rotate = new osg::MatrixTransform; osg::Matrix rot_mat = osg::Matrix::rotate( M_PI, 0.0f, 0.0f, 1.0f); rotate-setMatrix( rot_mat ); camera-addChild(translate.get()); translate-addChild( rotate.get() ); rotate-addChild( triangle.get() );; } // left triangle { osg::Matrix m; osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform; m.makeTranslate( -hud_aspect, 0.0f, 0.0f ); mt-setMatrix( m ); camera-addChild(mt.get()); mt-addChild( triangle.get() );. } // create LINES osg::Geometry * drawLines( osg::Vec3Array * vertices, int colorIndex ) { // create Geometry object to store all the vertices and lines primitive. osg::Geometry*
Re: [osg-users] Insert custom Open GL code
If your OGL code is sharing the same render context as OSG, you need to wrapper the OGL code with a push and pop of the state. The push would be: glPushAttrib(GL_ALL_ATTRIB_BITS); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glMatrixMode(GL_TEXTURE); glPushMatrix(); And the pop would be: glMatrixMode(GL_TEXTURE); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glPopAttrib(); I do my OGL rendering in a PostDrawCallback for a symbology overlay. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Claudio Arduino Sent: Monday, March 23, 2009 4:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Insert custom Open GL code Hi, i Need to insert custom OpenGl code like this: glBegin(GL_TRIANGLE_STRIP); glColor3f(1.0, 0.0, 1.0); glVertex3i(0,0,0); glColor3f(1.0, 0.0, 1.0); glVertex3i(2000,2000,0); glVertex3i(0, 2000,0); glEnd(); glFlush(); i have tried to insert this code in osgCallback code: struct DrawableUpdateCallback : public osg::Drawable::UpdateCallback { virtual void update(osg::NodeVisitor*, osg::Drawable* drawable) { std::coutDrawable update callback drawablestd::endl; glBegin(GL_TRIANGLE_STRIP); glColor3f(1.0, 0.0, 1.0); glVertex3i(0,0,50); glColor3f(1.0, 0.0, 1.0); glVertex3i(2,2,50); glVertex3i(0, 2,50); glEnd(); glFlush(); } }; the code is executed but the triangles don't appear to the screen... i am a newbie in OpenGl please help me...:-) thanks smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Safely loading paged databases at runtime
Jason, That is what I was going to say as well. I've been bitten by the smart pointer/ref_ptr issue more times than I care to admit...;^) Glad you got it figured out... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Beverage Sent: Monday, March 23, 2009 11:01 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Safely loading paged databases at runtime Hi Robert, Ha, I was just getting ready to reply to you saying I've found the issue:) That was exactly it, switching over to using using a ref_ptr within the ReaderWriterOSGEarth plugin for the cached TileBuilder objects seems to have fixed my issue. Thanks! Jason 2009/3/23 Robert Osfield robert.osfi...@gmail.com Hi Jason, Normally the DatabasePager works on loaded scene graph that are entirely independent from the main scene graph and these subgraphs are only merged with the main scene graph when the main frame loop calls the update on the DatabasePager to merge any new tiles, remove expired ones. The update is down thread safe, with locking happening for all the appropriate places. If the place that the node is being attached is already unref'd from the scene graph then the subgraph should just be safely discarded. In the case of osgEarth do you have a pointers to global/parental structures in the plugins that would break the normal scene graph encapsulation that the database normally has? If there is such a reference then it might be best to take a reference to this global/parent strucutre during the running of the plugin to prevent it going out of scope before the end of the call to the plugin. Robert. 2009/3/23 Jason Beverage jasonbever...@gmail.com Hi Robert, I've been working with loading and unloading different osgEarth files at runtime (such as from a File | Open menu) using OSG and have found that I need to take special care to make sure that the DatabasePager is not working on a loaded node before removing it and replacing it with a different scene. This isn't a big deal and essentially consists of telling the database pager to not accept any new requests, clearing any pending requests and waiting for the pager to complete by checking the getRequestsInProgress. I've found that if I simply replace the main earth file's node with a new one while the DatabasePager is working, my application will crash. Is this the intended behavior or have I found a potential issue? Thanks! Jason ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] discontinuity in texture in VPB...
Robert, Thanks for the update. You do great work...:) I'll test here in the near future... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Tuesday, March 24, 2009 11:47 AM To: OpenSceneGraph Users Subject: Re: [osg-users] discontinuity in texture in VPB... Hi All, I've been looking into the problems reported by Shayne right at the start of this thread, and with a little help from Christophe's patch have pinpointed the problem and resolved it by re-ordering the reprojection and destination graph building to avoid the reproject from invalidating the internal quad map that vpb::DataSet maintains internally. This re-ordering solves the bug without having to do an costly (in time) patching of the quadMap and is more straight forward code was so will be easier to maintain thatn Christophe's patch too. In testing I also found that the svn/trunk version of GDAL's multi-threading warp operation was generating black output images, so I've made use of the single threaded version the default which fixes the black texture problem. Could users who've seen this problem with VPB database check out the svn/trunk version of VPB and see how you get on. Cheers, Robert smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
-Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, March 25, 2009 2:53 AM To: OpenSceneGraph Users Subject: Re: [osg-users] OpenGL 3.1 at GDC With OpenGL you can migrate steadily from one rev to the next, an application written back in 1992 is still runable today, if you your application lives any period of time - like successful software does then longivity is good thing. Robert, Are you implying that the current D3D is not backwards compatible with previous versions? I believe that a current D3D application can query earlier versions of the D3D interface through COM. A D3D 3.0 application can still run under D3D 10.0 as I understand it... -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
Paul, In what way has D3D screwed the existing user base with each new release? I'm not trying to argue your point, I just want to understand where you're coming from here. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Wednesday, March 25, 2009 8:31 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] OpenGL 3.1 at GDC YES :))) but robert, thanks for your arguments! i will use them there. ;) best regards to all and other arguments are welcome too! I agree with Robert's sentiment. In many ways, D3D has chosen the easy way out -- supporting only one platform, and screwing the existing user base with each new release. This is the easy way to develop an API. Running cross platform, continuing to evolve and remain relevant, and not screwing existing users is a much harder task, but OpenGL has a proven track record of success in all these areas. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
Paul, In answer to your question, the answer is no, it can't. I appreciate what OpenGL can do in terms of its extensions but that isn't what my response was in reference to. I was asking Robert if he was implying that D3D is not backwards compatible in his earlier comment... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Wednesday, March 25, 2009 9:20 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] OpenGL 3.1 at GDC Does that D3D 3.0 app get access to any new features? OpenGL 3.1 adds new ARB extensions to OpenGL 2.1, so that old OpenGL apps (even OpenGL 1.0 apps) running on an OpenGL 2.1 implementation can access new features analogous to those found in OpenGL 3.1. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, March 25, 2009 9:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] OpenGL 3.1 at GDC Are you implying that the current D3D is not backwards compatible with previous versions? I believe that a current D3D application can query earlier versions of the D3D interface through COM. A D3D 3.0 application can still run under D3D 10.0 as I understand it... -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
Robert, Thanks for the clarification. I think this discussion is good for all involved when it comes to understanding the differences between D3D and OpenGL. For the record, I'm not an advocate of D3D or Microsoft. Far from it in fact... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, March 25, 2009 9:23 AM To: OpenSceneGraph Users Subject: Re: [osg-users] OpenGL 3.1 at GDC Hi Shayne, 2009/3/25 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil Are you implying that the current D3D is not backwards compatible with previous versions? I believe that a current D3D application can query earlier versions of the D3D interface through COM. A D3D 3.0 application can still run under D3D 10.0 as I understand it... The problem is not the the old D3D versions API aren't available, but the fact that the jump between versions is discrete. If you want D3D 10.0 functionality you have to use D3D 10, you can't just use one part of D3D 10 and keep the rest of your app building against D3D 9. You can't get access to D3D features unless you are on Vista. This a very different situation to that of OpenGL based apps that like the OSG have been able to evolve bit by bit as few hardware + API features were exposed in OpenGL. If you are trying to maintain an application for a long period then handling widely different hardware and OS combinations is key. The D3D model really doesn't help you at all. The D3D model only suits making an app for specific era, once that era is gone the app just stays in that era unless you retool in a significant way. For a game that is developed and sells for a couple of years it might be able to come and go in just one era, but for most applications this isn't the case. Interestingly for open source games that take many years to write and evolve over time their lifetime is potentially far longer than commericial games, so open source games have more similar needs to API evolution and portability that conventional long lived graphis applications have. Robert. smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
Paul, Alberto, and Robert, Thanks for the feedback. Good stuff and details that outline the differences between the two APIs... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Wednesday, March 25, 2009 9:57 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] OpenGL 3.1 at GDC My point is that the DX3 and DX10 APIs are not compatible. The fact that the DX system allows apps to request DX3-only runtime on a DX10-capable implementation implies support but does not imply compatibility. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL 3.1 at GDC
Paul, I, for one, appreciate you speaking out and keeping us informed... I look forward to more information and insight that you may be able to share with the rest of us regarding OpenGL...and D3D...;^) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Wednesday, March 25, 2009 11:05 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] OpenGL 3.1 at GDC I realize that by speaking out, I'm running the risk of looking just as closed-minded, opinionated, and foolish as we view the D3D community. If I'm ever _way_ off base, please call me on it. I'd rather be quiet than somehow do OpenGL a disservice. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and how it generates terrain
There's an article entitled On-the-sphere block-based 3D terrain rendering using a wavelet-encoded terrain database for SVS by Greg Baxes and Tim Linger of TerraMetrics Inc. The article gives a high level view of their algorithm which I believe is the one or similar to the one used in Earth viewers like Google Earth and NASA World Wind for terrain rendering on a sphere... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, July 02, 2008 8:12 AM To: OpenSceneGraph Users Subject: [osg-users] VPB and how it generates terrain Hello Robert, We currently have a student doing a masters project at our company, and his job will be to improve the terrain algorithms in the Vortex toolkit (both for physical simulation and graphical representation). One aspect is generating terrain from a height field, which is what VPB does. Unfortunately, since we need to support dynamic terrain/height fields, and since we also need to do collision detection against it, we cannot use VPB directly and will have to re-do much of the work that is already in VPB. I was wondering if you had any pointers to what strategies are used to generate the terrain. Any articles/papers? Both the actual geometry generation and the LOD strategies are of interest. The code is available for study but we're really looking for some high-level overviews of how it does its work and why those given tradeoffs were chosen. Any information you provide would be helpful. Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] cessnafire.osg...
I have a simple/silly question regarding cessnafire.osg. I can load this into a node and display it without trouble, however, when I apply a MatrixTransform to the node, the geometry is changed but the fire/smoke animation doesn't follow the geometry. I'm assuming that the fire/smoke is modeled using osgParticle. My question is, is what do I need to do to have fire/smoke undergo the same transformation as the geometry so that it moves with the airplane? Do I need to use the Texture matrix? Any help here would be welcome. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cessnafire.osg...
Thanks for the link. While I appreciate the info, it doesn't really address my original question about transforming the particle emitter that is defined in the cessnafire.osg file. After reading the cessnafire.osg file into a node, I add this node to a MatrixTransform but only the geometry is affected. The fire/smoke part is NOT affected by the transform whatsoever. Anyone else caring to chime in on this? Perhaps it can't be done... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? Sent: Thursday, July 03, 2008 8:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... I’m assuming that the fire/smoke is modeled using osgParticle… I think so! You can take a look http://faculty.nps.edu/jasullivan/osgtutorials/osgParticle.htm 在2008-07-04 07:10:57,Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] 写道: I have a simple/silly question regarding cessnafire.osg. I can load this into a node and display it without trouble, however, when I apply a MatrixTransform to the node, the geometry is changed but the fire/smoke animation doesn’t follow the geometry. I’m assuming that the fire/smoke is modeled using osgParticle… My question is, is what do I need to do to have fire/smoke undergo the same transformation as the geometry so that it moves with the airplane? Do I need to use the Texture matrix? Any help here would be welcome… Thanks, -Shayne 网易首款免费3D网游“天下2”,6月6日激情公测 http://tx2.163.com/fab.html smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cessnafire.osg...
Robert, I've attempted to look at the archives but have been unsuccessful in finding anything that will help. Perhaps I'm searching for the wrong thing. I've seen examples of transforming particles explicitly but I haven't found anything that gives an example on how to transform particles that are implicitly defined in an osg file like the cessnafire.osg example. I read this file into a node and then what? How do I get at the particle part to transform it? I did look at the osgparticleeffect.cpp file and it's still unclear on how I would transform particles that are implicitly defined in the cessnafire.osg file. The osg files in the osgparticleeffect code that are read in appear to be geometry and image only so this really doesn't help in answering my question. -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, July 07, 2008 10:04 AM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... Hi Shayne, Have a look through the archives on this topic, much of the discussions goes way back. Also have a look at the osgparticleeffects code block, it has a code path that handles moving models and particles systems. Robert. 2008/7/7 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED]: Thanks for the link. While I appreciate the info, it doesn't really address my original question about transforming the particle emitter that is defined in the cessnafire.osg file. After reading the cessnafire.osg file into a node, I add this node to a MatrixTransform but only the geometry is affected. The fire/smoke part is NOT affected by the transform whatsoever. Anyone else caring to chime in on this? Perhaps it can't be done... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? Sent: Thursday, July 03, 2008 8:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... I'm assuming that the fire/smoke is modeled using osgParticle… I think so! You can take a look http://faculty.nps.edu/jasullivan/osgtutorials/osgParticle.htm 在2008-07-04 07:10:57,Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] 写道: I have a simple/silly question regarding cessnafire.osg. I can load this into a node and display it without trouble, however, when I apply a MatrixTransform to the node, the geometry is changed but the fire/smoke animation doesn't follow the geometry. I'm assuming that the fire/smoke is modeled using osgParticle… My question is, is what do I need to do to have fire/smoke undergo the same transformation as the geometry so that it moves with the airplane? Do I need to use the Texture matrix? Any help here would be welcome… Thanks, -Shayne 网易首款免费3D网游天下2,6月6日激情公测 http://tx2.163.com/fab.html ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] cessnafire.osg...
Robert, I understand that you have to move the particle system out in the world space and make it local to the moving model, but how do you get at the particle system inside the file in the first place? That, to me, is the big question. If I read between the lines in your response, I get the impression that it can't be done and that I must define my own particle system explicitly. If it is possible to isolate the particle system out of the cessnafire.osg file, I would like to see a code snippet that does this... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, July 07, 2008 11:49 AM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... Hi Shayne, You'll can't put a self contained particle system with file and then load it and transform it around the world and expect it to automagicaly work as you want. What you have to do to move the particle system out in the world space, and have the emiter local to the moving object. Robert. 2008/7/7 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED]: Robert, I've attempted to look at the archives but have been unsuccessful in finding anything that will help. Perhaps I'm searching for the wrong thing. I've seen examples of transforming particles explicitly but I haven't found anything that gives an example on how to transform particles that are implicitly defined in an osg file like the cessnafire.osg example. I read this file into a node and then what? How do I get at the particle part to transform it? I did look at the osgparticleeffect.cpp file and it's still unclear on how I would transform particles that are implicitly defined in the cessnafire.osg file. The osg files in the osgparticleeffect code that are read in appear to be geometry and image only so this really doesn't help in answering my question. -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Monday, July 07, 2008 10:04 AM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... Hi Shayne, Have a look through the archives on this topic, much of the discussions goes way back. Also have a look at the osgparticleeffects code block, it has a code path that handles moving models and particles systems. Robert. 2008/7/7 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED]: Thanks for the link. While I appreciate the info, it doesn't really address my original question about transforming the particle emitter that is defined in the cessnafire.osg file. After reading the cessnafire.osg file into a node, I add this node to a MatrixTransform but only the geometry is affected. The fire/smoke part is NOT affected by the transform whatsoever. Anyone else caring to chime in on this? Perhaps it can't be done... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ??? Sent: Thursday, July 03, 2008 8:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] cessnafire.osg... I'm assuming that the fire/smoke is modeled using osgParticle… I think so! You can take a look http://faculty.nps.edu/jasullivan/osgtutorials/osgParticle.htm 在2008-07-04 07:10:57,Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] 写道: I have a simple/silly question regarding cessnafire.osg. I can load this into a node and display it without trouble, however, when I apply a MatrixTransform to the node, the geometry is changed but the fire/smoke animation doesn't follow the geometry. I'm assuming that the fire/smoke is modeled using osgParticle… My question is, is what do I need to do to have fire/smoke undergo the same transformation as the geometry so that it moves with the airplane? Do I need to use the Texture matrix? Any help here would be welcome… Thanks, -Shayne 网易首款免费3D网游天下2,6月6日激情公测 http://tx2.163.com/fab.html ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http
[osg-users] sky model tracking the camera...
Hello, I would like to have my sky model track the camera position so that as the camera moves, the sky model moves with it. To do this, would I add the sky model transform as a child of the cameraNode? Does anyone have any code snippets that may demonstrate how I might do this? Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] sky model tracking the camera...
Viggo, Thanks much...:) -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Viggo Løvli Sent: Tuesday, July 29, 2008 11:56 PM To: OpenSceneGraph Users Subject: Re: [osg-users] sky model tracking the camera... Hi Shayne, Add your sky node where-ever you want it in your scene-graph (not as child of camera). Override the sky's transform node's traverse function and do something like this: void yourNode::traverse( osg::NodeVisitor nv ) { switch( nv.getVisitorType() ) { case osg::NodeVisitor::CULL_VISITOR: setPosition( nv.getEyePoint() ); break; } } Your node will be set to the camera position on each cull-traverse. It will therefore work properly nomatter how many camera or render passes you add to your scene. Hope it helps, Viggo Date: Tue, 29 Jul 2008 18:14:25 -0600 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: [osg-users] sky model tracking the camera... Hello, I would like to have my sky model track the camera position so that as the camera moves, the sky model moves with it. To do this, would I add the sky model transform as a child of the cameraNode? Does anyone have any code snippets that may demonstrate how I might do this? Thanks in advance -Shayne Få Hotmail du også. Windows Live Hotmail nå med 5000 MB gratis lagringsplass. http://clk.atdmt.com/GBL/go/msnnkdre001005gbl/direct/01/ smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] sky model tracking the camera...
David, Thanks for your help as well... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Spilling Sent: Wednesday, July 30, 2008 1:31 AM To: OpenSceneGraph Users Subject: Re: [osg-users] sky model tracking the camera... Look in the osghandglide example for MoveEarthySkyWithEyePointTransform; you will need to add the z-coordinate transform as well (currently 0.0 in the code). David smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] moving models...
This is probably a silly and simple question, but does anyone have an example of how to move a model explicitly without using a canned animation? Most of the examples I've seen, update the position in an animation using UpdateCallback. I have a position update coming from another process outside the scenegraph that I need to feed into the model to update its position. Do I need to use an UpdateCallback or a NodeVisitor approach? Any help would be most appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] moving models...
Here's my code snippet... ... while (!viewer-done()) { if (model_update_needed) mt-setMatrix(osg::Matrix::rotate(osg::inDegrees(heading), 0.0, 0.0, 1.0) * osg::Matrix::translate(modelx, modely, modelz)); ... viewer-frame(); } In the code above, if I have just a translate, the model moves just fine as position changes. Once I multiply by a rotation for a heading change, the model disappears. -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tomlinson Sent: Monday, August 04, 2008 5:18 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] moving models... Providing the code you use to set the translation and rotations may help folks see what may be wrong __ Gordon Tomlinson [EMAIL PROTECTED] IM: [EMAIL PROTECTED] www.vis-sim.com www.gordontomlinson.com __ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Monday, August 04, 2008 7:13 PM To: OpenSceneGraph Users Subject: Re: [osg-users] moving models... Ok, I updated the transform node as given below for position changes and this seems to work. However, when I add an orientation update (i.e. multiply the translation by a rotation) my model disappears completely. Any idea on what's going on with that? Thanks, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of su hu Sent: Saturday, August 02, 2008 3:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] moving models... Shayne, In my application, a global buffer is used to input data to osg thread from other thread. I used the method as same as Todd told you. setMatrix() is used to update the matrix of that MatrixTransform node. ... osg::ref_ptrosg::group root; osg::ref_ptrosg::MatrixTransform MotionMatrix; osg::ref_ptrosg::node MotionModelFile; //your motion model ... root-addchild(MotionMatrix); MotionMatrix-addchild(MotionModelFile); ... while((!Viewer.done) { ... if(Update is Needed) //position is changed or other MotionMatrix--setMatrix(osg::Matrix::translate(Pos)); //your position data ... Viewer.frame(); ... } su hu 2008/8/2, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED]: This is probably a silly and simple question, but does anyone have an example of how to move a model explicitly without using a canned animation? Most of the examples I've seen, update the position in an animation using UpdateCallback. I have a position update coming from another process outside the scenegraph that I need to feed into the model to update its position. Do I need to use an UpdateCallback or a NodeVisitor approach? Any help would be most appreciated. Thanks, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgdem and UTM terrain tiles...
Using the GDAL tools, I've built a mosaic of terrain tiles that I'm stitching together using osgdem to create a terrain database. Each terrain tile uses a UTM mapping that is reprojected from a lat/long mapping. Unfortunately when I do the reprojection for each tile, the terrain tile gets slightly shifted so that when I stitch them all together using osgdem, I have discontinuities at each tile boundary in the finished terrain database. My question is, is there a way to avoid this nasty artifact using either GDAL or osgdem? Perhaps I need to resort to another tool to massage the data before handing it over to osgdem? Thanks for any input in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] light Callback
Vincent, Have your tried deriving your class LightMoveCallback from osg::NodeCallback instead of osg::StateAttribute::Callback to see if the callback gets called? Just a thought... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Bourdier Sent: Thursday, August 07, 2008 8:56 AM To: osg Subject: [osg-users] light Callback Hi, I just need to move a light, and for that I try to use a callback. So I implement a simple class lightMoveCallback : public osg::StateAttribute::Callback with virtual void operator()(osg::StateAttribute* ss, osg::NodeVisitor* nv); but the callback is never called... I use : light-setUpdateCallback(new lightMoveCallback()) thanks for help, Regards, Vincent. smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem and UTM terrain tiles...
Jason, Perhaps you could elaborate on the gdal_merge tool? That doesn't appear to be in my set of GDAL tools. Is this something new in GDAL? I'm using version 1.51 on Windows... Regards, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Coposky Sent: Wednesday, August 06, 2008 8:01 PM To: OpenSceneGraph Users Subject: Re: [osg-users] osgdem and UTM terrain tiles... have you tried using gdal_merge.py to stitch them together initially and then submit the final image to osgdem to create the terrain database? if the discontinuities exist in the final image, there may be some discrepancies in the original data. --- On Wed, 8/6/08, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: From: Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] Subject: [osg-users] osgdem and UTM terrain tiles... To: osg-users@lists.openscenegraph.org Date: Wednesday, August 6, 2008, 6:31 PM Using the GDAL tools, I've built a mosaic of terrain tiles that I'm stitching together using osgdem to create a terrain database. Each terrain tile uses a UTM mapping that is reprojected from a lat/long mapping. Unfortunately when I do the reprojection for each tile, the terrain tile gets slightly shifted so that when I stitch them all together using osgdem, I have discontinuities at each tile boundary in the finished terrain database. My question is, is there a way to avoid this nasty artifact using either GDAL or osgdem? Perhaps I need to resort to another tool to massage the data before handing it over to osgdem? Thanks for any input in advance. -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB for osg 2.4
Ralf, I'm using VPB 0.9.7 with OSG 2.4 on Windows XP SP2. Other than the performance issues Robert pointed out on Windows, I'm having good success. An example command I'm using is: osgdem --TERRAIN --PagedLOD --geocentric -t texture/w113 -d dted/w113 -l 8 -o terrain/terraintiles.ive Hope this helps... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stokholm Sent: Tuesday, August 12, 2008 1:54 PM To: OpenSceneGraph Users Subject: [osg-users] VPB for osg 2.4 Hi All Anyone having succes with a specific version of VPB for osg 2.4? Im building on windowsXP using vpbmaster and it seams to start out fine but then stops loading the processors and uses a huge amount of memmory. It dosent really seam to stop again. Brgs. Ralf Stokholm Arenalogic smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgdem performance...
I would like to get some feedback from users that might be rendering OSG terrain built with osgdem on Windows XP. Based on previous discussions, I understand that the terrain rendering on Windows does not have as good of performance as on Linux, however, I'm seeing abysmal frame rates when I'm rendering terrain on Windows. The paging performance is horrible. Perhaps it's the way I'm constructing my terrain or the setup in my OSG app.I'm not sure. While I don't understand the algorithm that is being used for OSG terrain, I would expect it to perform as good or somewhat close to other Windows based earth viewers such as NASA's WorldWind which seems to run just fine on Windows with large databases. For the record, here's the osgdem command I'm using to build the terrain. osgdem -TERRAIN -PagedLOD -geocentric -t dted -d texture -l 10 -o terrain/wasatch_utm.ive Any input on the matter would be appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] terrain generation question...
Hello, Using osgdem, I would like to create a simple terrain tile that always displays the highest level of detail for both elevation and texture (no paging, or LOD changes going on) no matter at what distance I view the terrain. Does any know the flag to do this in the osgdem command? Right now when I generate the terrain segment, it's always being display at the lowest level of detail. Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] terrain generation question...
Robert, Thanks for the info. My terrain and image segment is quite simple so it shouldn't crash if I up the tile sizes. I'll try your suggestions... Thanks again, -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Thursday, August 28, 2008 10:23 AM To: OpenSceneGraph Users Subject: Re: [osg-users] terrain generation question... Hi Shayne, The main point about VirtualPlanetBuilder/osgdem is generation of paged databases, which are fully LOD'd, it's not at all designed for build small single tiles of terrain. You could build a single chunk of terrain if you upped the tile-image-size and tile-terrain-size from their defaults of 256 and 64 repsectively. Use --tile-image-size value and --tile-terrain-size. If you app crashes and burns because you've exceeded what the graphics hardware can handle then please don't write in complain of a bug - its a case of garbage settings in gagbage out. Robert. On Thu, Aug 28, 2008 at 5:13 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, Using osgdem, I would like to create a simple terrain tile that always displays the highest level of detail for both elevation and texture (no paging, or LOD changes going on) no matter at what distance I view the terrain. Does any know the flag to do this in the osgdem command? Right now when I generate the terrain segment, it's always being display at the lowest level of detail. Thanks in advance, -Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control and view matrix
I believe it's just a simple matter of commenting the manipulator out where you call viewer-setCameraManipulator(). That's what I do when I want explicit control of the camera via my own view matrix... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renan Mendes Sent: Thursday, September 18, 2008 11:39 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Camera control and view matrix Hi, Robert. You've said: As for examples of manage the view matrix, there should be examples in the archives, but in the end it all boils down to not using a CameraManipulator and instead calling on each frame: viewer.getCamera()-setViewMatrix(viewMatrix); How do I stop using the default camera manipulator, that I believe is TrackballManipulator? Thanks. Renan M Z Mendes smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB and multiple ive files...
This may be a silly question but I was wondering if VPB supports stitching multiple ive files or databases together? In other words, can I build two separate ive files with VPB and then merge them together? I would like to build a whole earth model in one ive file and then merge in another ive file that has a high resolution inset so that the two are tied together. If this inquiry doesn't make sense or is incomplete, please accept my apologies. Thanks for the help in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and multiple ive files...
Ralf, I did try your suggested approach but VPB crashes with an exception. I'm assuming that I've reached the limits of VPB and that it can't handle the high resolution database (all 1 meter texture with level 1 DTED over a 2 degree by 2 degree region) along with building the --whole-globe option. If I do them separately, things seem to work fine. That's why I was wondering if I can build them separately and then merge them together. Eventually I would like to have several high res insets that I can merge in and out as need be rather than have one huge database... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stokholm Sent: Wednesday, October 08, 2008 3:14 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB and multiple ive files... Hi Shayne From what I understand about your question, this is what VPB is build for, but in stead of chreating two ive*s you would simply feed the data to VPB and ass for a whole world output. VPB will then automatically handle merging your high resolution area into the whole globe terrain. Not sure if this was what you asked for Brgs. Ralf 2008/10/8 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] This may be a silly question but I was wondering if VPB supports stitching multiple ive files or databases together? In other words, can I build two separate ive files with VPB and then merge them together? I would like to build a whole earth model in one ive file and then merge in another ive file that has a high resolution inset so that the two are tied together. If this inquiry doesn't make sense or is incomplete, please accept my apologies. Thanks for the help in advance. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and multiple ive files...
Thanks...:) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stokholm Sent: Thursday, October 09, 2008 12:17 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB and multiple ive files... vpbmaster is basically a server for osgdem. You can call it with the exact same commandline you use to call osgdem, it will then schedule all the builds and in addition use all the processors on your system for the build. It will not currently build osga databases but if my experiences hold you wont be able to generate a 30 gig osga anyway. my command line vpbmaster -t input_vrt -d input_dem -l 14 --TERRAIN --max-anisotropy 8.0 -o F:\dk_dem2\dk_dem.ive -Ralf 2008/10/9 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] I'm using 0.9.7 on Window XP SP 2. I'm using the command osgdem. What is VPB master? The database size is about 30gig... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stokholm Sent: Wednesday, October 08, 2008 3:40 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB and multiple ive files... Shayne What version of VPB are you using? I have succesfully build a database using two different input datasets one overall covering app 15x10 deg around denmark to give some area in the surroundings. This is very low res. And the 40 cm orthofoto covering all of denmark. I found that it will fail on winxp 32 if I tryed it with older versions of VPB. I could not create a osga archive larger than 4 Gig. and for non archived .ive output the limit was around 10 Gig. Moving to a newer version of VPB and using VPB master I succeded in building the above mentioned database which is around 500Gig. As im typing this my PC is 25 hours into a build of the same data with added 10m dem for hight. still 12 hours to go :-) My experience is that preprojection the inputdata is a good thing. Hope this helps. Brgs. Ralf 2008/10/8 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] Ralf, I did try your suggested approach but VPB crashes with an exception. I'm assuming that I've reached the limits of VPB and that it can't handle the high resolution database (all 1 meter texture with level 1 DTED over a 2 degree by 2 degree region) along with building the --whole-globe option. If I do them separately, things seem to work fine. That's why I was wondering if I can build them separately and then merge them together. Eventually I would like to have several high res insets that I can merge in and out as need be rather than have one huge database... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralf Stokholm Sent: Wednesday, October 08, 2008 3:14 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB and multiple ive files... Hi Shayne From what I understand about your question, this is what VPB is build for, but in stead of chreating two ive*s you would simply feed the data to VPB and ass for a whole world output. VPB will then automatically handle merging your high resolution area into the whole globe terrain. Not sure if this was what you asked for Brgs. Ralf 2008/10/8 Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] This may be a silly question but I was wondering if VPB supports stitching multiple ive files or databases together? In other words, can I build two separate ive files with VPB and then merge them together? I would like to build a whole earth model in one ive file and then merge in another ive file that has a high resolution inset so that the two are tied together. If this inquiry doesn't make sense or is incomplete, please accept my apologies. Thanks
Re: [osg-users] Viewer vs. Composite Viewer
It's simple to convert over. Look at the osgcompositeviewer example to see what needs to be done. I've been using just osgViewer::Viewer and I changed over to using the composite viewer with no problems or difficulty. One's just a subset of the other so I would probably just start out with a CompositeViewer and then add one view... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ed Sent: Tuesday, October 28, 2008 2:42 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Viewer vs. Composite Viewer After reading osgViewer::Viewer vs osgViewer::CompositeViewer, I think I might need to use CompositeViewer at some point in the future of my project, but not at the outset. Should I begin with the CompositeViewer, or make the necessary mods later? How difficult is it to change from Viewer to CompositeViewer later? Ed ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] shaders in OSG...
Hello, Is there a light weight way to turn off shaders in OSG without unloading the vertex and fragment shaders from the shader program? My application needs to switch back and forth from the shader pipeline to the fixed pipeline and vice versa during runtime. This can be done at the OpenGL level by calling the function glUseProgramObject() to make the quick switch. Is there an equivalent in OpenSceneGraph? Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] shaders in OSG...
Mike, Thanks for the reply. There was an exchange on this subject back on August 28 in the archives. I tried all the suggested solutions to the problem to no avail. I have tried binding to an empty program as you suggest by using the call ss-SetAttributesAndModes(new osg::Program()) which does indeed turn off the shader (back to fixed functionality). But when I attempt to switch back to the shader with another call to ss-SetAttributesAndModes(MyShaderProgram), it crashes my OpenSceneGraph app. I've tried the other suggestions such as removing the shaders from the program and then adding them back on for enable/disable and also the call ss-RemoveAttribute(MyShaderProgram) which have also caused a crash on the ensuing call ss-SetAttributesAndModes(MyShaderProgram). The only mechanism that has worked cleanly for me is if I create two programs, one that is empty and one that has my vertex/fragment shaders attached. When I call each programs apply method to switch the shaders off and on, this seems to work. I'm not sure if this the correct way to do it though. I've also noticed that there is no clean way of switching between multiple programs attached to a single object during runtime. At least I haven't found a way to get it to work in OSG. In OpenGL, I've always been able to have multiple programs that I can swap in and out via the call to glUseProgram() with the appropriate program handle (including the call glUseProgram(0) to switch to the fixed pipe). I don't see an equivalent mechanism in OpenSceneGraph to achieve the same functionality. If you or anyone else can enlighten me, it would be most appreciated... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Weiblen Sent: Thursday, November 13, 2008 11:33 AM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... The only way to turn off a glProgram in GL is glUseProgram(0), there is no glEnable/glDisable. In OSG you do that by creating an empty osg::Program, one with no osg::Shaders attached. Just attach that empty osg::Program where you want to revert to fixed-function. Further details in http://mew.cx/osg_glsl_july2005.pdf cheers -- mew On Wed, Nov 12, 2008 at 2:55 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, Is there a light weight way to turn off shaders in OSG without unloading the vertex and fragment shaders from the shader program? My application needs to switch back and forth from the shader pipeline to the fixed pipeline and vice versa during runtime. This can be done at the OpenGL level by calling the function glUseProgramObject() to make the quick switch. Is there an equivalent in OpenSceneGraph? Thanks in advance, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mike Weiblen -- Boulder Colorado USA -- http://mew.cx/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] shaders in OSG...
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thrall, Bryan Sent: Friday, November 14, 2008 10:10 AM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... Do these crashes go away if you run OSG single-threaded? It sounds like you might be changing the scenegraph at a point where it isn't safe to do so. In general, it is safe to change the scenegraph from an update callback, but otherwise you could have problems. Also, if you are making changes to a StateSet, you should mark it as DYNAMIC. See also below. I have not tried running OSG single threaded. I have tried the changes both before I call osgviewer.run() and in an update callback after the render loop is going. Both have caused crashes. I have not tried marking the StateSet as DYNAMIC unless that is the default setting. I will look into this. See osg::Switch; you could create two child nodes, one with an empty Program, the other with the shaders. Have them both make the actual scenegraph their child; then you can use the Switch to determine whether the fixed pipeline is used or not. Thanks for this suggestion. I will look into this further... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Weiblen Sent: Thursday, November 13, 2008 11:33 AM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... The only way to turn off a glProgram in GL is glUseProgram(0), there is no glEnable/glDisable. In OSG you do that by creating an empty osg::Program, one with no osg::Shaders attached. Just attach that empty osg::Program where you want to revert to fixed-function. Further details in http://mew.cx/osg_glsl_july2005.pdf cheers -- mew On Wed, Nov 12, 2008 at 2:55 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, Is there a light weight way to turn off shaders in OSG without unloading the vertex and fragment shaders from the shader program? My application needs to switch back and forth from the shader pipeline to the fixed pipeline and vice versa during runtime. This can be done at the OpenGL level by calling the function glUseProgramObject() to make the quick switch. Is there an equivalent in OpenSceneGraph? Thanks in advance, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- Bryan Thrall FlightSafety International [EMAIL PROTECTED] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] shaders in OSG...
Here's my code snippet... // shader code done at setup time tgpProgram = new osg::Program(); tgpState = tgp.view-getCamera()-getOrCreateStateSet(); tgpVertexObject = new osg::Shader(osg::Shader::VERTEX); tgpFLIRFragmentObject = new osg::Shader(osg::Shader::FRAGMENT); tgpProgram-addShader(tgpFLIRFragmentObject); tgpProgram-addShader(tgpVertexObject); loadShaderSource(tgpVertexObject, shaders\\texture.vert); loadShaderSource(tgpFLIRFragmentObject, shaders\\flirwh_texture.frag); tgpState-setAttributesAndModes(tgpProgram, osg::StateAttribute::ON); emptyProgram = new osg::Program(); . . . // callback hit at runtime struct TGPPostDrawCallback : public osg::Camera::DrawCallback { TGPPostDrawCallback(){} virtual void operator () (const osg::Camera camera) const { // turn shader off tgpState-setAttributeAndModes(emptyProgram); RenderTGPOverlay(); // turn shaders back on? This line crashes the app with an access violation! tgpState-setAttributesAndModes(tgpProgram, osg::StateAttributes::ON); } } On the above callback, I've also tried removing the attributes, adding and removing the shaders from the program, and nothing has worked. If I modify the above callback with the following instead, then it works... struct TGPPostDrawCallback : public osg::Camera::DrawCallback { TGPPostDrawCallback(){} virtual void operator () (const osg::Camera camera) const { // turn shaders off emptyProgram-apply(*(tgp.view-getCamera()-getGraphicsContext()-getState( ; RenderTGPOverlay(); // turn shaders back on tgpProgram-apply(*(tgp.view-getCamera()-getGraphicsContext()-getState()) )); } } I would just like to see a code snippet that cleanly allows switching between multiple shaders or turning shaders on and off for a given object. I know I can do this easily in OpenGL. OSG is proving to be otherwise. Any ideas on what I'm doing wrong or what I'm missing? I'm all ears... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Weiblen Sent: Friday, November 14, 2008 10:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... hmm, I was unaware of crash bugs in Program switching. If you could create a simple repro, I'd be interested. -- mew On Fri, Nov 14, 2008 at 9:48 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Mike, Thanks for the reply. There was an exchange on this subject back on August 28 in the archives. I tried all the suggested solutions to the problem to no avail. I have tried binding to an empty program as you suggest by using the call ss-SetAttributesAndModes(new osg::Program()) which does indeed turn off the shader (back to fixed functionality). But when I attempt to switch back to the shader with another call to ss-SetAttributesAndModes(MyShaderProgram), it crashes my OpenSceneGraph app. I've tried the other suggestions such as removing the shaders from the program and then adding them back on for enable/disable and also the call ss-RemoveAttribute(MyShaderProgram) which have also caused a crash on the ensuing call ss-SetAttributesAndModes(MyShaderProgram). The only mechanism that has worked cleanly for me is if I create two programs, one that is empty and one that has my vertex/fragment shaders attached. When I call each programs apply method to switch the shaders off and on, this seems to work. I'm not sure if this the correct way to do it though. I've also noticed that there is no clean way of switching between multiple programs attached to a single object during runtime. At least I haven't found a way to get it to work in OSG. In OpenGL, I've always been able to have multiple programs that I can swap in and out via the call to glUseProgram() with the appropriate program handle (including the call glUseProgram(0) to switch to the fixed pipe). I don't see an equivalent mechanism in OpenSceneGraph to achieve the same functionality. If you or anyone else can enlighten me, it would be most appreciated... -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Weiblen Sent: Thursday, November 13, 2008 11:33 AM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... The only way to turn off a glProgram in GL is glUseProgram(0), there is no glEnable/glDisable. In OSG you do that by creating an empty osg::Program, one with no osg::Shaders attached. Just attach that empty osg::Program where you want to revert to fixed-function. Further details in http://mew.cx/osg_glsl_july2005.pdf cheers -- mew On Wed, Nov 12, 2008 at 2:55 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC [EMAIL PROTECTED] wrote: Hello, Is there a light weight way to turn off shaders in OSG without unloading the vertex
Re: [osg-users] shaders in OSG...
J-S, At this point, anything will help. I believe I'm using a ref pointer but I will double check. I tried following the paradigm outlined in the osgshaders example which seems to be newing the same way I'm doing below (i.e. new osg::Program). The reason for the postdraw callback is that I'm rendering OGL symbology on top of an OSG view. I don't want the shader to be on when I render the symbology. Perhaps I need to turn shaders off in an update callback before the post drawback is hit.?.? FYI, the OSG and OGL are sharing the same render context but I'm pushing and popping state appropriately... On the complete program, it's a little difficult to include everything since my email machine is different from my development machine. If it's needed, I could try to include the whole program as an attachment... What's your pleasure? -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay Sent: Friday, November 14, 2008 12:41 PM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... Hi Shayne, // shader code done at setup time tgpProgram = new osg::Program(); ... emptyProgram = new osg::Program(); First, I don't know if you meant not to put the type here, but I hope you're storing these in ref_ptrosg::Program. Otherwise, you create the program (refCount = 0), then you attach the program to some node (refCount = 1), then detach it (refCount=0, the program is deleted) and thus you're using a dangling pointer the next time you try to attach it to a node. Second, you're running the code in a draw callback, and not an update callback. You need to run it in an update callback. The draw traversal (even the end of the draw traversal) is not a safe place to be modifying the scene graph. Can you send us a complete program that shows the problem? It's much easier that way around. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] shaders in OSG...
J-S, It turned out that I was NOT using ref_ptr. I made the correction and it no longer crashes...:). I also moved my shader switch to the UpdateCallback and things work just great once I synchronized the OGL rendering. Problems solved. THANK YOU! -Shayne -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay Sent: Friday, November 14, 2008 1:08 PM To: OpenSceneGraph Users Subject: Re: [osg-users] shaders in OSG... Hi Shayne, At this point, anything will help. I believe I'm using a ref pointer but I will double check. I tried following the paradigm outlined in the osgshaders example which seems to be newing the same way I'm doing below (i.e. new osg::Program). As long as you're using ref_ptr, that's fine. It's just a common gotcha... The reason for the postdraw callback is that I'm rendering OGL symbology on top of an OSG view. I don't want the shader to be on when I render the symbology. Perhaps I need to turn shaders off in an update callback before the post drawback is hit.?.? Yes. You can always use some way to synchronize so that the OGL stuff doesn't render until the update callback has run. On the complete program, it's a little difficult to include everything since my email machine is different from my development machine. If it's needed, I could try to include the whole program as an attachment... I don't mean the whole program (in fact, we'd prefer not the whole program). Just modify a small example to demonstrate the problem (even with a trivial shader, say that turns everything red). So for example, modify OpenSceneGraph/applications/osgviewer/osgviewer.cpp, apply a shader to the loaded file, and then remove and re-add the shader in the same way as you do in your app. If this reproduces the problem, send it here. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] extracting heading, pitch, roll from rotation matrix...
Is there any method or class in OSG that extracts heading, pitch, and roll angles from a rotation matrix? I've searched and haven't seen anything. I just want to make sure there isn't anything out there before I embark on writing my own. Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Can I build a round earth with DEM?
Yes you can by using the -d option followed by the terrain file in VPB. VPB will stitch in the terrain (if it's geospecific) into the ellipsoid... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lv Qing Sent: Wednesday, October 28, 2009 9:40 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] Can I build a round earth with DEM? Hi, ... I have created an earth model with VPB ( an ellipsoid with earth texture) by the instruction post in http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. (osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif -l 8 -o earth.ive -a earth.osga) Can I just add some small area of DEM in the suface of this round earth? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18801#18801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] picture in picture...
All, This is probably a silly question but what's the best way to do a picture in picture using CompositeViewer? Right now I have multiple views added to my viewer and I want to have control as to which one gets rendered on top of the others in the main viewer window. Thanx, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I create a osgViewer windowed?
view-setUpViewInWindow()... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ricardo Ruiz Sent: Tuesday, November 24, 2009 4:32 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How can I create a osgViewer windowed? Hi all! osgViewer starts always in full screen mode. How can I tell it I would like a window or windowed app? Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20302#20302 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I create a osgViewer windowed?
Sorry...I had suggested doing it programmatically...:( If you do osgviewer --help-all, I'm sure it will show you how to do it from the command line... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, November 24, 2009 4:35 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How can I create a osgViewer windowed? view-setUpViewInWindow()... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ricardo Ruiz Sent: Tuesday, November 24, 2009 4:32 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How can I create a osgViewer windowed? Hi all! osgViewer starts always in full screen mode. How can I tell it I would like a window or windowed app? Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20302#20302 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] picture in picture...
Robert and Simon, Thanks! That did the trick...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, November 25, 2009 3:26 AM To: OpenSceneGraph Users Subject: Re: [osg-users] picture in picture... Hi Shayne, On Tue, Nov 24, 2009 at 11:31 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: This is probably a silly question but what's the best way to do a picture in picture using CompositeViewer? Right now I have multiple views added to my viewer and I want to have control as to which one gets rendered on top of the others in the main viewer window. This is the right way to tackle it. To control the rendering order you can use the camera-setRenderOrder(..) method. If you don't set this an leave all the camera's at their default of 0 then these cameras will be rendered in the order you added them. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Need advice for performance tweaks
All, I have a need to run my OSG app on some marginal hardware (single CPU with a GeForce 4800 for example) while still maintaining some decent frame rates (around 30fps). I want to use the same terrain database (built with VPB with the -terrain option) if possible. I've used the setSampleRatio() method in the osgTerrain class and culling backfaces to thin out the geometry with some success but I'm still not where I need to be. As a result, I'm wanting to optimize a bit more if possible. Does anyone have any suggestions for particular settings in the databasepager or pagedLOD that I could try to achieve better performance? I'm willing to sacrifice database fidelity to maintain decent frame rates if I must. Thanks for any suggestions in advance. Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Need advice for performance tweaks
Robert, Thanks for the quick reply. I haven't played with the LOD scale so I'll explore that. I also like your suggestion of some sort of adaptive setting. Is there a way to query the frame time of the previous frame? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, November 27, 2009 11:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Need advice for performance tweaks Hi Shayne, You can use the osgTerrain::Terrain::setSampleRatio(float) to cut down geometry complexity alone, and use osg::Camera::setLODScale(float) to make the selection of LOD's more aggressive. One thing you could do is implement an adaptive setting of LODScale/SampleRatio by looking at the frame time of the previous frame and it is looks close to breaking frame change the ratio's to reduce the overhead, this way you might be able to get away with better visuals when the hardware can cope such as looking downwards, and only go for low high res visuals when you are looking at a shallow angle to the horizontal when lots of tiles will be in view. Robert. On Fri, Nov 27, 2009 at 6:00 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I have a need to run my OSG app on some marginal hardware (single CPU with a GeForce 4800 for example) while still maintaining some decent frame rates (around 30fps). I want to use the same terrain database (built with VPB with the -terrain option) if possible. I've used the setSampleRatio() method in the osgTerrain class and culling backfaces to thin out the geometry with some success but I'm still not where I need to be. As a result, I'm wanting to optimize a bit more if possible. Does anyone have any suggestions for particular settings in the databasepager or pagedLOD that I could try to achieve better performance? I'm willing to sacrifice database fidelity to maintain decent frame rates if I must. Thanks for any suggestions in advance. Shayne ___ 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 smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB question...
Can anyone tell me what version of VirtualPlanetBuilder is stable with OSG 2.8.2? I'm upgrading to OSG 2.8.2 and I want to make sure to get the right version of VPB that works with this. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB question...
Thanks guys for the info...much appreciated. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: Tuesday, December 01, 2009 11:10 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB question... Alejandro Aguilar Sierra wrote: Yeah. Chris, excuse me for the rush to correct it, I should have waited. You were right. Better to make sure someone isn't giving out bogus information. I knew I was wrong right after I hit send. ;) Regards. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org