Re: [osg-users] [vpb] Retrieve coordinate system string from osgdem-generated terrain
Hi Ethan, VPB should be creating databases with the root CoordinateSystemNode storing the Format and CooridnateSystem strings. I've just pulled down the example data from openscenegraph.org and it has both set correctly, to check this I did: wget http://www.openscenegraph.org/data/earth_bayarea/earth.ive osgconv earth.ive earth.osg head earth.osg And I get: CoordinateSystemNode { name earth.ive nodeMask 0x cullingActive TRUE Format WKT CoordinateSystem GEOGCS[\WGS 84\,DATUM[\WGS_1984\,SPHEROID[\WGS 84\,6378137,298.257223563,AUTHORITY[\EPSG\,\7030\]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\EPSG\,\6326\]],PRIMEM[\Greenwich\,0,AUTHORITY[\EPSG\,\8901\]],UNIT[\degree\,0.0174532925199433,AUTHORITY[\EPSG\,\9108\]],AXIS[\Lat\,NORTH],AXIS[\Long\,EAST],AUTHORITY[\EPSG\,\4326\]] EllipsoidModel { RadiusEquator 6378137 RadiusPolar 6356752.3142 } Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Updating OSG and osgearth in project
Hi Max, It should be just a case of compiling an appropriate version of the OSG then compiling osgEarth against this, or just pull down the binaries that are known to work together. There are docs on OSG website and books you can read to help. Robert. On 11 December 2012 05:27, Max Sergeev sergeev.m...@gmail.com wrote: Hello! So I have this project that uses OSG version 2.9 and osgearth version 2.0. Now there's need in some of osgearth 2.2 functions (like osgearthQt). Using VS 2010. If anyone has experience updating osg libraries which are used in project, would you please share it? I mean, there should be something more but changing include directories and libs? Because when I do change OSG lib dependencies, project builds but shows errors on the run; when I change osgearth dependencies project doesnt even build. I am kind of lamer and it feels like missing something important, would be grateful for any advice. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51515#51515 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer, GUIEventHandler::handle() and events cascading across Views
Hi Andreas, On 10 December 2012 11:59, Andreas Stahl andreas.st...@tu-dresden.dewrote: So I went ahead and tried to rework the problem as one big scene graph and multiple cameras into it. I might get it to work, but a more flexible event handling between overlapping views could have really helped. Maybe I'll give subclassing CompositeViewer a shot, overriding eventtraversal. If the default behaviour is not what you want then overriding the eventTraversal method would be appropriate - it's why the method is virtual :-) One question then still stands however: What is the significance of the return value of osgGA::GUIEventAdapter::handle and when should it return true? The event handler handle() method should return true if the event is handled, but it's also the event handlers responsibility to decide whether it should handle already handled events. Some event handlers don't want to handle already handled events, which other need to handle all events regardless of whether another event handlers has handled it already - examples of this would be a resize or frame event. Have a look through the various event handler handle(..) implementation in the OSG code base to see which event handlers do what. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Updating OSG and osgearth in project
Max, Make sure you do a complete clean and rebuild. Also: osgEarth 2.2+ requires at least OSG version 3.0. I recommend osgEarth 2.3 which is the latest release. Glenn Waldron / @glennwaldron / osgEarth.org On Tue, Dec 11, 2012 at 12:27 AM, Max Sergeev sergeev.m...@gmail.comwrote: Hello! So I have this project that uses OSG version 2.9 and osgearth version 2.0. Now there's need in some of osgearth 2.2 functions (like osgearthQt). Using VS 2010. If anyone has experience updating osg libraries which are used in project, would you please share it? I mean, there should be something more but changing include directories and libs? Because when I do change OSG lib dependencies, project builds but shows errors on the run; when I change osgearth dependencies project doesnt even build. I am kind of lamer and it feels like missing something important, would be grateful for any advice. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51515#51515 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgearth terrain problem
cajun, The terrain is a quadtree of tiles, with 2 tiles at the root level (for a round whole-earth terrain). Theses are tile keys (0/0/0) and (0/1/0). As you move the camera closer, a tile subdivides into 4 smaller tiles (its children), each with twice the resolution of the parent tile. Each tile has a range (i.e. distance from the camera) at which it will disappear and be replaced by its higher-resolution children. When you zoom out, similarly, the tile will revert back to its lower-resolution parent. There is an osgEarth-specific forum you can peruse as well: http://forum.osgearth.org Hope this helps. Glenn Waldron / @glennwaldron / osgEarth.org On Mon, Dec 10, 2012 at 11:51 PM, caijun caijun2002...@126.com wrote: Hello,everyone! I am studying the osgearth code now.I want to know how the osgearth judges the terrain's tilekey info,which terrainNode it is going to load! Can you tell me how it works? thanks very much! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Retrieve coordinate system string from osgdem-generated terrain
Thanks for looking into that Robert. I'm finding that my terrain.osg results differ from the example earth.ive file you mentioned. The difference is that the top level of my terrain is an osgTerrain::Terrain obect instead of a CoordinateSystemNode. This is true despite my not using the --TERRAIN flag. My osgTerrain::Terrain object has empty strings for both Format and CoordinateSystem, but the osgTerrain::Locator object nested inside does have proper Format and CoordinateSystem strings. I can extract this info in the following way: Code: osgTerrain::Terrain* terrain = dynamic_castosgTerrain::Terrain*(node.get()); osg::PagedLOD* pagedLOD = dynamic_castosg::PagedLOD*(terrain-getChild(0)); osgTerrain::TerrainTile* terrainTile = dynamic_castosgTerrain::TerrainTile*(pagedLOD-getChild(0)); osgTerrain::Locator* locator = terrainTile-getLocator(); string format = locator-getFormat(); string coordinateSystem = locator-getCoordinateSystem(); where node is the top level osgTerrain::Terrain node that I read in from file. Below is the top part of my terrain.osg file: Code: osgTerrain::Terrain { name xxx\\xxx\\xxx\\\terrain.ive nodeMask 0x cullingActive TRUE SampleRatio 1 VerticalScale 1 BlendingPolicy INHERIT Format CoordinateSystem num_children 1 PagedLOD { nodeMask 0x cullingActive TRUE Center 731350 3.49247e+006 2211.23 Radius -1 RangeMode DISTANCE_FROM_EYE_POINT RangeList 2 { 1.60316e+006 1e+010 0 1.60316e+006 } NumChildrenThatCannotBeExpired 0 DisableExternalChildrenPaging 0 FileNameList 2 { terrain_root_L0_X0_Y0/terrain_L0_X0_Y0_subtile.ive } num_children 1 osgTerrain::TerrainTile { nodeMask 0x cullingActive TRUE BlendingPolicy INHERIT osgTerrain::Locator { UniqueID Locator_0 Format WKT CoordinateSystem PROJCS[\UTM Zone 41, Northern Hemisphere\,GEOGCS[\WGS 84\,DATUM[\WGS_1984\,SPHEROID[\WGS 84\,6378137,298.257223563,AUTHORITY[\EPSG\,\7030\]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\EPSG\,\6326\]],PRIMEM[\Greenwich\,0,AUTHORITY[\EPSG\,\8901\]],UNIT[\degree\,0.0174532925199433,AUTHORITY[\EPSG\,\9108\]],AUTHORITY[\EPSG\,\4326\]],PROJECTION[\Transverse_Mercator\],PARAMETER[\latitude_of_origin\,0],PARAMETER[\central_meridian\,63],PARAMETER[\scale_factor\,0.9996],PARAMETER[\false_easting\,50],PARAMETER[\false_northing\,0],UNIT[\Meter\,1]] CoordinateSystemType PROJECTED TransformScaledByResolution FALSE Transform { 347303.25 0 0 0 0 298624.25 0 0 0 0 1 0 557698.6875 3343161.75 0 1 } } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51523#51523 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Retrieve coordinate system string from osgdem-generated terrain
HI Ethan, The VPB flag --TERRAIN is not required, by default osgTerrain will be used by VPB these days. osgTerrain::Terrain is subclassed from CoordinateSystemNode and I've just checked all the serialization, .ive and .osg plugins and it all looks correct w.r.t reading/writing of the CoordinateSystem parameters. I have looked into as much as I have time for right now and haven't spotted a cause of the problem. Have a look at VirtualPlanetBuilder/src/vpb's creation of the root tile of database when it's running on your machine, perhaps it's missing the assignment of the coordinate system parameters. Robert. On 11 December 2012 15:46, Ethan Fahy ethanf...@gmail.com wrote: Thanks for looking into that Robert. I'm finding that my terrain.osg results differ from the example earth.ive file you mentioned. The difference is that the top level of my terrain is an osgTerrain::Terrain obect instead of a CoordinateSystemNode. This is true despite my not using the --TERRAIN flag. My osgTerrain::Terrain object has empty strings for both Format and CoordinateSystem, but the osgTerrain::Locator object nested inside does have proper Format and CoordinateSystem strings. I can extract this info in the following way: Code: osgTerrain::Terrain* terrain = dynamic_castosgTerrain::Terrain*(node.get()); osg::PagedLOD* pagedLOD = dynamic_castosg::PagedLOD*(terrain-getChild(0)); osgTerrain::TerrainTile* terrainTile = dynamic_castosgTerrain::TerrainTile*(pagedLOD-getChild(0)); osgTerrain::Locator* locator = terrainTile-getLocator(); string format = locator-getFormat(); string coordinateSystem = locator-getCoordinateSystem(); where node is the top level osgTerrain::Terrain node that I read in from file. Below is the top part of my terrain.osg file: Code: osgTerrain::Terrain { name xxx\\xxx\\xxx\\\terrain.ive nodeMask 0x cullingActive TRUE SampleRatio 1 VerticalScale 1 BlendingPolicy INHERIT Format CoordinateSystem num_children 1 PagedLOD { nodeMask 0x cullingActive TRUE Center 731350 3.49247e+006 2211.23 Radius -1 RangeMode DISTANCE_FROM_EYE_POINT RangeList 2 { 1.60316e+006 1e+010 0 1.60316e+006 } NumChildrenThatCannotBeExpired 0 DisableExternalChildrenPaging 0 FileNameList 2 { terrain_root_L0_X0_Y0/terrain_L0_X0_Y0_subtile.ive } num_children 1 osgTerrain::TerrainTile { nodeMask 0x cullingActive TRUE BlendingPolicy INHERIT osgTerrain::Locator { UniqueID Locator_0 Format WKT CoordinateSystem PROJCS[\UTM Zone 41, Northern Hemisphere\,GEOGCS[\WGS 84\,DATUM[\WGS_1984\,SPHEROID[\WGS 84\,6378137,298.257223563,AUTHORITY[\EPSG\,\7030\]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\EPSG\,\6326\]],PRIMEM[\Greenwich\,0,AUTHORITY[\EPSG\,\8901\]],UNIT[\degree\,0.0174532925199433,AUTHORITY[\EPSG\,\9108\]],AUTHORITY[\EPSG\,\4326\]],PROJECTION[\Transverse_Mercator\],PARAMETER[\latitude_of_origin\,0],PARAMETER[\central_meridian\,63],PARAMETER[\scale_factor\,0.9996],PARAMETER[\false_easting\,50],PARAMETER[\false_northing\,0],UNIT[\Meter\,1]] CoordinateSystemType PROJECTED TransformScaledByResolution FALSE Transform { 347303.25 0 0 0 0 298624.25 0 0 0 0 1 0 557698.6875 3343161.75 0 1 } } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51523#51523 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgearth terrain problem
Thanks for glennwaldron's answer! And I want to know in which file the osgearth calculate the current lod and which tiles to load and show? I've read all the files in osgearth and osgearth_engine_osgterrain,but I've not found the right file.Can you or anyone else tell me which file contains the infomation? Thanks very much! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and Qt GLdouble typedef conflicts with OpenGL ES2
Hiya I'm using OSG with Qt to create an OpenGL ES 2 application. GL ES2 does not have GLdoubles. When building with against ES2, Qt typedefs GLdouble to GLfloat. OSG typedefs GLdouble to just 'double'. As a result I get an error when trying to compile my application. How do I get around this? Preet ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Updating OSG and osgearth in project
Thanks for advices, though problem is still here Robert, I have OSG 3.0.1 and osgearth 2.2 compiled in some folder; in my project I changed all dependencies to point into that folder. Glenn, I did clean and rebuild now but project still gives me access violation. I shall try osgearth 2.3 but its probably not the case anyway. So it must be something in my project I guess. Just thought there are some common cases that one should know when updating osg and osgearth: like changed names or uses of osg functions or something. Thanks for advices anyway. I'll keep on trying. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51529#51529 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org