Re: [osg-users] receiving network stream using osg and ffmpeg...
Raymond, I scoured the forum to find something and didn't find anything in particular that addressed my questions. Do you have a link to the discussion you're referring to? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Raymond de Vries Sent: Thursday, September 26, 2013 1:13 AM To: OpenSceneGraph Users Subject: Re: [osg-users] receiving network stream using osg and ffmpeg... Hi, From what I remember, the original mail on the list about the ffmpeg plugin mentioned such a setup. Maybe you can look that message up? Plz keep us posted about your findings. hth Raymond On 9/26/2013 1:56 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: Has anyone had any luck in receiving streaming video from a network URL such as rtp://@192.168.178.23:1234 in osgmovie? What is the correct command line syntax for doing this? I can play canned files just fine with osgmovie -e ffmpeg movie.avi But when I attempt to receive a stream from the network and play it, I can't get it to work. Any thoughts, examples, or suggestions would be 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] receiving network stream using osg and ffmpeg...
Has anyone had any luck in receiving streaming video from a network URL such as rtp://@192.168.178.23:1234 in osgmovie? What is the correct command line syntax for doing this? I can play canned files just fine with osgmovie -e ffmpeg movie.avi But when I attempt to receive a stream from the network and play it, I can't get it to work. Any thoughts, examples, or suggestions would be appreciated... Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] creating database compatable to osg
I would recommend that you become familiar with VirtualPlanetBuilder and osgdem. These tools specifically build to osg databases. Here's one way to build your SRTM data to an osg database... osgdem.exe --geocentric -d SRTM_dir --terrain -o outputfile.ive Then you can look at it by... osgviewer outputfile.ive -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Swathy Nair Sent: Thursday, August 22, 2013 5:13 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] creating database compatable to osg hi, i am a beginner to osg. i want to convert the data downloaded from SRTM to a database compatible to osg. can i get as tep by step instruction. my os is windows 7 and im using visual studio 2010 Thank you! Cheers, swathy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55955#55955 ___ 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] osgdem and HAE/MSL
Nick, Osgdem will work with the input elevation. It will build the database based on the input source. For example if you're using DTED and the geocentric option, it will place the point at the specified elevation (in meters) above the ellipsoid. The point is represented in the Cartesian ECEF geocentric space (e.g. x,y,z). The default ellipsoid used is WGS84. You can specify the polar and equatorial radii in osgdem to fit to another ellipsoid. Just make sure you specify those radii in your EllipsoidModel class on the rendering side so that things match up. The EllipsoidModel class also defaults to WGS84... HTH -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nick Modly Sent: Sunday, August 25, 2013 11:46 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] osgdem and HAE/MSL Hi, When providing elevation data to osgdem. is it expected to be in HAE (height above ellipoid), or MSL (mean sea level), or can it tell from the input? For example, I am providing elevation data in the AIG/Arc/Info Binary Grid format (.adf). The data represents the elevation of the area in meters MSL. However, when I osgpick a point and convert it to Lat-Lon-Alt MSL, the altitude is off by about 30m (the difference between HAE and MSL at this location). This are the options I ran osgdem with $ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif Is it possible to specify a vertical datum or coordinate system, such as EGM96? Thank you! Cheers, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55984#55984 ___ 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] osgdem and HAE/MSL
Good stuff to know. Thank you. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, September 12, 2013 12:34 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL Shayne, Correct, for each height value in your DTED grid, you have to sample the EGM96 geoid at that point and add the two together. That will give you HAE. I don't know of any tools off the cuff, sorry. osgEarth has vertical datum support so you could probably write a tool using that. Glenn Waldron / @glennwaldron / osgEarth On Thu, Sep 12, 2013 at 2:19 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Glenn, VPB does reference to the WGS84 for the --geocentric option. So to do the conversion, do you have to remove the contribution of the geoid (gravitational equipotential surface) from the raw DTED first before pumping it into VPB? Is there an application that does this? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, September 12, 2013 12:04 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL Nick, Shayne, I have not looked at VPB in a while, but I believe it expects height values to be referenced to the WGS84 ellipsoid. If that's the case you'll need to convert it first to HAE. By the way: DTED heights are referenced to the EGM96 geoid (not to the WGS84 ellipsoid). So they need conversion in order to be properly displayed. GDAL (up until recently?) does not convey this information so there's no way for the application to know. You just have to know :) Glenn Waldron / @glennwaldron On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Nick, Osgdem will work with the input elevation. It will build the database based on the input source. For example if you're using DTED and the geocentric option, it will place the point at the specified elevation (in meters) above the ellipsoid. The point is represented in the Cartesian ECEF geocentric space (e.g. x,y,z). The default ellipsoid used is WGS84. You can specify the polar and equatorial radii in osgdem to fit to another ellipsoid. Just make sure you specify those radii in your EllipsoidModel class on the rendering side so that things match up. The EllipsoidModel class also defaults to WGS84... HTH -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nick Modly Sent: Sunday, August 25, 2013 11:46 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] osgdem and HAE/MSL Hi, When providing elevation data to osgdem. is it expected to be in HAE (height above ellipoid), or MSL (mean sea level), or can it tell from the input? For example, I am providing elevation data in the AIG/Arc/Info Binary Grid format (.adf). The data represents the elevation of the area in meters MSL. However, when I osgpick a point and convert it to Lat-Lon-Alt MSL, the altitude is off by about 30m (the difference between HAE and MSL at this location). This are the options I ran osgdem with $ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif Is it possible to specify a vertical datum or coordinate system, such as EGM96? Thank you! Cheers, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55984#55984 ___ osg-users mailing list osg-users@lists.openscenegraph.org
Re: [osg-users] [vpb] osgdem and HAE/MSL
Glenn, VPB does reference to the WGS84 for the --geocentric option. So to do the conversion, do you have to remove the contribution of the geoid (gravitational equipotential surface) from the raw DTED first before pumping it into VPB? Is there an application that does this? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, September 12, 2013 12:04 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [vpb] osgdem and HAE/MSL Nick, Shayne, I have not looked at VPB in a while, but I believe it expects height values to be referenced to the WGS84 ellipsoid. If that's the case you'll need to convert it first to HAE. By the way: DTED heights are referenced to the EGM96 geoid (not to the WGS84 ellipsoid). So they need conversion in order to be properly displayed. GDAL (up until recently?) does not convey this information so there's no way for the application to know. You just have to know :) Glenn Waldron / @glennwaldron On Thu, Sep 12, 2013 at 1:45 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Nick, Osgdem will work with the input elevation. It will build the database based on the input source. For example if you're using DTED and the geocentric option, it will place the point at the specified elevation (in meters) above the ellipsoid. The point is represented in the Cartesian ECEF geocentric space (e.g. x,y,z). The default ellipsoid used is WGS84. You can specify the polar and equatorial radii in osgdem to fit to another ellipsoid. Just make sure you specify those radii in your EllipsoidModel class on the rendering side so that things match up. The EllipsoidModel class also defaults to WGS84... HTH -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nick Modly Sent: Sunday, August 25, 2013 11:46 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] osgdem and HAE/MSL Hi, When providing elevation data to osgdem. is it expected to be in HAE (height above ellipoid), or MSL (mean sea level), or can it tell from the input? For example, I am providing elevation data in the AIG/Arc/Info Binary Grid format (.adf). The data represents the elevation of the area in meters MSL. However, when I osgpick a point and convert it to Lat-Lon-Alt MSL, the altitude is off by about 30m (the difference between HAE and MSL at this location). This are the options I ran osgdem with $ osgdem --geocentric -o output.ive -l 8 -d ./path-to-dted/ -t image.tif Is it possible to specify a vertical datum or coordinate system, such as EGM96? Thank you! Cheers, Nick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55984#55984 ___ 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 terrain to OpenFlight...
All, This question may have already been asked, but has anyone successfully converted/exported a VPB terrain (*.ive file) to an OpenFlight (*.flt) file? Is this possible to do? If so, is it better to use osgconv or to do it programmatically? Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB terrain to OpenFlight...
Robert, Thanks for the timely reply. That's basically what I needed to know. I'm assuming if I had a database with a single LOD (e.g. a heightfield) then that might come across okay? 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, June 14, 2013 11:52 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB terrain to OpenFlight... Hi Shayne, On 14 June 2013 18:35, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: This question may have already been asked, but has anyone successfully converted/exported a VPB terrain (*.ive file) to an OpenFlight (*.flt) file? Is this possible to do? If so, is it better to use osgconv or to do it programmatically? Features like PagedLOD don't map to OpenFlight and an integral part of VPB generated databases so you won't be able to simply convert to OpenFlight. You could export the geometry and perhaps convert PagedLOD to LOD's, but this will require a custom visitor to do the job and the bits you end up with won't be particularly useful. 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] VPB terrain to OpenFlight...
Got it. I'll give that a try and see how things shake out. Thanks for the help... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, June 14, 2013 12:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB terrain to OpenFlight... Hi Shayne, On 14 June 2013 19:05, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Thanks for the timely reply. That's basically what I needed to know. I'm assuming if I had a database with a single LOD (e.g. a heightfield) then that might come across okay? Actually the osgTerrain components including the height filed won't be supported by OpenFlight either... so all you'd get would be the LOD's... You can build databases that contain just LOD's and osg::Geometry based tiles but you'll need to explicitly select this when you do the VPB build. 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] Any recent work on CIGI interfaces to OSG?
That's neat...a lot more folks coming out of the closet that are using OSG-based IGs using CIGI...;^). Actually CIGI is quite prolific in the IG industry which is nice for anyone who has a host that has to interface with different IGs or wants to upgrade to a different IG that supports CIGI. You don't have to rewrite the communication protocol to switch IGs... I think VT Mak is another high profile IG vendor that uses OSG technology under the hood that may support CIGI. The last time I glanced at Boeing's MPV code, they had upgraded it to support OSG 2.8.2. They've jettisoned most of the SDL dependencies and are now using the osgViewer paradigm along with other, more modern OSG concepts. The blackboard paradigm still exists with some enhancements. I don't consider myself a prognosticator but I predict that you will see more IGs emerge, based on OSG and other open source tools. They will eventually replace IGs that rely on proprietary scenegraphs and databases because of reduced cost. In the early days, IG vendors relied on proprietary hardware to introduce their discriminators from the competition. With the advent of programmable GPUs found on COTS cards such as NVIDIA and ATI, most of those proprietary hardware discriminators have evaporated and many have had to retreat to proprietary scenegraphs, tools, and databases to maintain their business edge. I think you will see a similar revolution in the software realm as open source tools like OSG make inroads into the current IG market. Proprietary software used by most IG vendors today (such as scenegraphs and databases) could suffer the same fate as proprietary IG hardware did back in the 90's... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lionel Lagarde Sent: Wednesday, May 29, 2013 8:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Any recent work on CIGI interfaces to OSG? Hi, I work on an image generator based on OpenSceneGraph and driven by CIGI commands. Web site of the company: http://www.oktal-se.fr Section SE-FAST-IG. At first MPV was a source of inspiration. This is no longer the case now. It's been a few years since I look at MPV base code. Lionel On 24/05/2013 23:26, Chris Calef wrote: Hi, I'm new to OSG, coming in from the direction of FlightGear, but I'm here primarily because I am interested in implementing a CIGI interface to FlightGear, and would like to put as much of this work as possible into an OSG module in order to make it useful to the larger OSG community and not only FlightGear developers. I have read the conversations about doing this from several years ago, but have not found any recent discussion or located any available code drops. I have downloaded the MPV example from CIGI at sourceforge, which is based on OSG, and that is quite helpful, but I wanted to introduce myself here and see if anyone can catch me up on any other existing work in this direction, or give me advice about where to start. Much of the CIGI interface is dedicated to higher order simulation functions (ie celestial bodies, ocean conditions, aircraft controls) which are probably too specific to implement at the OSG layer, but I'd like to make at least a virtual wrapper in OSG which could be inherited by FlightGear and other OSG based projects, each of which could determine on its own which functions to support, and how to support them. Any pointers would be welcome. I am applying for funding for this project in one week, so the more information I can gather before then the better. Thanks for all your efforts! Chris Calef, CTO BrokeAss Games, LLC ___ 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] Any recent work on CIGI interfaces to OSG?
Our host talks with several different IGs on the backend (OSG, Quantum3D, Aechelon) . All use the CIGI protocol. If it wasn't for CIGI, our host would have to support different ways of communicating with each IG which would be a pain. The OSG-based IG is one that we developed in-house. Like both Chris' , we also spawned our efforts off of Boeing's MPV with our own modifications. Rather than rolling CIGI into OSG, I would suggest using a thread/process that eats CIGI packets that then interfaces with OSG where applicable. A while back, the developer of osgVisual had contemplated writing a CIGI plugin. I don't know where that effort ended up though... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Best Sent: Tuesday, May 28, 2013 2:29 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Any recent work on CIGI interfaces to OSG? Hi Chris, I work on an OpenSceneGraph-based image generator for the Federal Aviation Administration that is built on the CIGI protocol. Like you, we originally started from MPV and worked from there. Thankfully we threw all that code away and started from scratch. I don't know how much has changed in MPV in the past five years... Maybe it's a great, well-engineered piece of software now! But if it's like what I remember, I'd only use it as a reference on CIGI concepts, not on how to integrate OSG into a CIGI application. It wasn't designed for multithreading, it was originally built for OSG 0.91, and it uses a library called osgSDL to handle Windowing, threading, and user input... Which makes using any modern OSG code/examples (which expect an osgViewer/osgGA base) problematic to say the least. Also, if you're serious about CIGI support, you may need to roll your own CIGI library. I haven't looked at the 3.3.3 version of CCL, but when it finally became apparent that our wrapper code around CCL 3.3.2 was rivaling the size of CCL itself, we ended up rewriting it from scratch. Again, it's a good solution for teaching you the concepts, but I think it's really best as a reference implementation and not practical for production use... May I ask why you're working on adding a CIGI interface to FlightGear? I'm only curious because we keep asking ourselves why we stuck with CIGI all these years, as no one else actually seems to use it! Any other vendors we deal with always go Well, yeah, you CAN use CIGI with our stuff... But it'd really be better if you used our API instead! And then when you look at their CIGI support, they usually have just wrapped their proprietary packets in CIGI custom packets... Bleh. But if this hasn't thoroughly discouraged you yet... Well, I'm not sure I have any good news for you, really. You're going to find that SO MUCH of CIGI is either incredibly ambiguous or 'implementation defined', that you're going to have trouble writing a general-purpose CIGI wrapper. If you're willing to get more specific, I think a useful area for you to work on is handling EntityCtrl packets at the very least, to add/move/delete entities to a scene graph. That's (to me) the really key/useful feature exposed by CIGI, and is probably the most well-defined part of the protocol. It'll also be your first real taste of how CIGI gets you most of the way, as you'll have to provide an out-of-band way to map entity types to model files, and also a way to let a user specify the coordinate system transform from the WGS84 ellipsoid to their database coordinates. Oh, and CIGI optionally lets you specify a custom ellipsoid, too. I'd save some sanity and leave that particular feature in the not supported column. :) After that... Extending osgGA::NodeTrackerManipulator to follow the Ownship entity in your scene graph would be a good step towards having a functional image generator, if that's what you're aiming for. If you have any specific questions, feel free to ping me and I'll be happy to share the dubious benefits of five years of working on your problem with you. But if you're looking for general advice on implementing CIGI in OSG... Well... In one word: Don't. In slightly more words: Think very hard as to why you're doing it, and what the likelihood is you'll actually ever integrate your solution with a DIFFERENT system that uses CIGI... And is using a compatible version of CIGI... And made the same (or similar enough) choices about the ambiguous or implementation defined features... Good luck. -Chris B On Fri, May 24, 2013 at 5:26 PM, Chris Calef chris.ca...@gmail.com wrote: Hi, I'm new to OSG, coming in from the direction of FlightGear, but I'm here primarily because I am interested in implementing a CIGI interface to FlightGear, and would like to put as much of this work as possible into an OSG module in order to make it useful to the larger OSG community and not only FlightGear developers.
Re: [osg-users] Height of the terrain on a given lang/long
The methods provided in osgSim work for geocentric databases. Is your terrain built as a geocentric database? If so, you can get the HAT/HOT with this... earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat), osg::DegreesToRadians(lon), alt, X,Y,Z); hat = osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(), osg::Vec3d(X,Y,Z)); If you're a flat earth with lat/lon only, then what you've got is probably fine... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Zeki Yugnak Sent: Thursday, April 18, 2013 7:15 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Height of the terrain on a given lang/long Hi everyone, I am trying to calculate height value of the terrain on a given latitude and longitude. I am using a ive formatted terrain model that was converted using osgDem from Dted level-1 data. I searched a solution on whole osg forum and web but i could not find good one. Also I looked HeightAboveTerrain class and osgintersection sample but these class does not work only given a latitude and longitude values. I can get height on terrain with following code block, is it a good solution? Code: osg::PagedLOD* pLod = dynamic_castosg::PagedLOD*(coordinateSystemNode-getChild(0)); osgTerrain::TerrainTile* pTopTile = dynamic_castosgTerrain::TerrainTile*(pLod-getChild(0)); osgTerrain::HeightFieldLayer* pLayer = dynamic_castosgTerrain::HeightFieldLayer*(pTopTile-getElevationLayer( )); pLayer-getInterpolatedValidValue( osg::DegreesToRadians(langVal), osg::DegreesToRadians(longVal), height ); Cheers, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53687#53687 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] reading dem/image files...
Robert, I did try the extension of gdal and that successfully loaded the file. However, the data doesn't display when I add by HeightField object to my geode for display. The osgviewer app doesn't display the data correctly either... Any thoughts as to why? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, April 12, 2013 12:24 AM To: OpenSceneGraph Users Subject: Re: [osg-users] reading dem/image files... Hi Shayne, If you want to use the gdal plugin in this way you'll either need to preload the gdal plugin or append the .gdal extension to your filename so that the OSG knows to load the gdal plugin to attempt the load the data. Robert. On 11 April 2013 23:19, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm attempting to load a height field by using osg::HeightField *grid = osgDB::readHeightFieldFile(...) where the file is a gdal supported dem/image file format. When I attempt to read the file, I'm getting the error Warning: could not find plugin to read objects from file... Is this because readHeightFieldFile() doesn't support the formats gdal supports or is there something wrong with my environment so that my plugins aren't loading correctly? My environment is window 7 and OSG 3.0.1... Thanks, -Shayne ___ 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
[osg-users] reading dem/image files...
All, I'm attempting to load a height field by using osg::HeightField *grid = osgDB::readHeightFieldFile(...) where the file is a gdal supported dem/image file format. When I attempt to read the file, I'm getting the error Warning: could not find plugin to read objects from file... Is this because readHeightFieldFile() doesn't support the formats gdal supports or is there something wrong with my environment so that my plugins aren't loading correctly? My environment is window 7 and OSG 3.0.1... Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to build OpenSceneGraph for Android in Windows
Thanks. I will do that. I'll most likely have more questions as I move along... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jan Ciger Sent: Tuesday, April 02, 2013 1:25 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How to build OpenSceneGraph for Android in Windows On 04/02/2013 06:56 PM, Shayne Tueller wrote: Hi Jan, So are you saying that Cygwin is the best way to compile OSG for Android on Windows? I don't think the tutorial in this thread uses Cygwin which makes this all the more confusing... I'll try setting the ANDROID_NDK environment variable to the path where it resides and issue the make command again. You need to read (and get familiar) with the Android NDK documentation as well. Otherwise you are going to be tearing your hair out for a good while. For Windows, Cygwin 1.7 or higher is required. The NDK will not work with Cygwin 1.5 installations. http://developer.android.com/tools/sdk/ndk/index.html#Reqs The ndk_build script is a bash script, using GNU make. Neither of those tools are available on Windows by default, so you need to get them from Cygwin. I suggest that you first try to compile some simple NDK example so that you are familiar with how the build works, how things integrate with the regular Android application code (Java) and only then start with OSG. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SGI: Performer licensesing Ends!
SGI? I didn't know they were still around...;^) -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David Glenn Sent: Monday, March 25, 2013 3:54 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] SGI: Performer licensesing Ends! Greetings All! For anyone who is sentimental, SGI has announced that issuance of Performer licenses will end as of 06/30/2013. Good thing that I now use OpenSceneGraph! ... David Glenn - D Glenn 3D Computer Graphic Entertainment! David Glenn --- D Glenn 3D Computer Graphics amp; Media Systems. www.dglenn.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53298#53298 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
If you enable two-sided lighting, the driver flips the lighting normals so that the back side of the polygon is lit correctly. There should be no need to do this in a shader (with OGL that supports fixed functionality...). -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian Buchner Sent: Thursday, March 14, 2013 10:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Rendering backface like front face
Paul, Thanks for pointing that out. I failed to mention the winding rule dependency... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Thursday, March 14, 2013 1:44 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face There are a couple different scenarios. If a surface is composed of triangles that all have a normal consistent with the winding order, but some of the triangles are facing the wrong way, then two-sided lighting will address the issue. That's why I asked the OP if he had tried this. If your surface has normals that are not consistent with vertex winding order, then you might be able to fix this in a shader by flipping the normal only when the dot product is negative, but I've never tried this. I've always just called it a modeling bug. :-) On Thu, Mar 14, 2013 at 12:27 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: If you enable two-sided lighting, the driver flips the lighting normals so that the back side of the polygon is lit correctly. There should be no need to do this in a shader (with OGL that supports fixed functionality...). -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christian Buchner Sent: Thursday, March 14, 2013 10:46 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [forum] Rendering backface like front face The front and back material properties were set to same values, it's just that when doing the calculations for the back side, the normal vector is not pointing towards the light source but away from it. I only looked at this issue briefly, and concluded that it would take some GLSL to fix it. Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- Paul Martz Skew Matrix Software LLC ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Most efficient way to get a single pixel RGBA froman FBO texture
Whatever you end up doing, you want to avoid doing the equivalent of glReadPixels since that stalls the pipe and is relatively slow. I noticed that this was one of the suggestions in the link provided below... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Wednesday, January 23, 2013 7:24 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Most efficient way to get a single pixel RGBA froman FBO texture I should note that my needs are very similar to the ones described in this post: http://forum.openscenegraph.org/viewtopic.php?t=5941highlight=glreadpix els I adapted the sample code given at the end of that thread and found that while I was able to retrieve the correct pixel values, I also was getting the: warning: detected OpenGL error 'invalid operation' at after RenderBin::draw() warning after every frame, regardless of whether my rtt camera was set to post render or pre render. Unfortunately that thread ended 2.5 years ago without a full resolution to the outstanding questions. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52096#52096 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Basic whitepaper on LOD in OpenSceneGraph
Both would be great to have. Thank you... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Thursday, January 17, 2013 5:35 PM To: OpenSceneGraph Users Subject: [osg-users] Basic whitepaper on LOD in OpenSceneGraph I pulled out some material I developed for various training seminars in the past and polished it up a bit as a whitepaper: http://alphapixel.com/content/level-detail-lod-openscenegraph If anyone has any corrections or comments, shoot me a note. I have another one about the structure and workings of VPB databases that I'll try to get out in the next couple of weeks. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography * Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android @alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775) 623-PIXL [7495] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fitting my world into the viewport
This thread of discussion may help you... http://forum.openscenegraph.org/viewtopic.php?t=11461 Also, since you are new to the OSG, I would suggest that you look closely at the provided examples to obtain an understanding on how the OSG classes are used in the applications. Looking at the OSG source itself is also helpful in understanding how it works... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Daniel Peraza Sent: Sunday, December 23, 2012 2:14 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Fitting my world into the viewport Hi, I'm very new to OSG and OpenGL programming in general, but right now I'm working on my thesis and my application requires to load several models on the same scene. Once every model is done loading, I must adjust the viewer's settings so that an user is able to see the entire scene. I know this can be achieved by fitting the world's bounding sphere into the viewport, the problem is that I don't know OSG Classes well enough to do so. My application is Qt-based and uses a Track Ball Manipulator. I wonder if I must use the manipulator methods, or adjust the camera's projection directly. I'd appreciate if you can give me some examples of how should I work on this. Thank you! Cheers, Daniel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51686#51686 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Streaming world and integer limits
If you're modeling on the earth, you should be using double precision for your camera position... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Dmitry K. Sent: Tuesday, October 30, 2012 2:16 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Streaming world and integer limits I'm saying about position of a node. If I model earth (for example) then the camera (for example) or another node will move from southern pole (0, 0) to equator (0, MAX_INT) and then it will move again to southern pole though it increments its position (not decrements), due to integer overflow (MAX_INT + inc_pos = inc_pos). Again, if I have a node with position (200, 200) and a child node with position (MAX_INT, MAX_INT) the result position of the child's node will be MAX_INT + 200, MAX_INT + 200. That means integer overflow again. These two cases are not clear for me. Sorry, if I've expressed myself not so clearly. Thanks for your answers. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50875#50875 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph for Beginners tutorial help requested
Another thing to check is make sure you're not mixing debug version of OSG with a release version of your app and vice versa. They must be the same. I've had readNodeFile() fail as below when I accidently linked my release built app with debug OSG... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Seth Hays Sent: Sunday, October 28, 2012 7:48 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] OpenSceneGraph for Beginners tutorial help requested Hi, I've been working with the OSG Beginners book. I am trying to get the first program to run but I continually get a bad alloc error: Code: Microsoft C++ exception: std::bad_alloc at memory location 0x00a1d4f0.. The break point is: Code: inline osg::Node* readNodeFile(const std::string filename) { return readNodeFile(filename,Registry::instance()-getOptions()); } And the following is my code: Code: #include osgDB/ReadFile #include osgViewer/Viewer int main( int argc, char** argv ) { osg::ref_ptrosg::Node root = osgDB::readNodeFile(c:\\osg\\data\\cessna.osg); osgViewer::Viewer viewer; viewer.setSceneData( root.get() ); return viewer.run(); } Any hints would be fantastic. Thank you! Cheers, Seth -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50843#50843 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Increasing line width
Take a look at the createAxis() in the osgbillboard.cpp file for the osgbillboard example. There's code in there to set linewidth... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Filip Arlet Sent: Wednesday, October 17, 2012 3:55 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Increasing line width Hi, I want to highlight part of CAD model. I have big symbol with lines, that have different line width. Now I want to render that lines with +4.0f linewidth according to original width of every line. What is the best approach? Thank you! Cheers, Filip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50642#50642 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I get the viewer's camera to 'ignore' anode's geometry?
We specify the near far planes manually and we don't have z-buffer issues with models on the earth's surface. Perhaps you should select the option DO_NOT_COMPUTE_NEAR_FAR for cull settings... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Thrall, Bryan Sent: Friday, October 05, 2012 8:55 AM To: OpenSceneGraph Users Subject: Re: [osg-users] How can I get the viewer's camera to 'ignore' anode's geometry? Preet wrote on 2012-10-04: Sorry if it wasn't clear; the items aren't being displayed because the near and far planes that osg sets creates a frustum that doesn't include them. I need to manually set the near and far planes to see everything. The near and far planes that osg sets without the earth surface geometry is fine. Once you add the surface geometry though, the near and far planes are set such that the items are no long in the view frustum. If the surface geometry is in view but the calculated frustum doesn't contain it, then that sounds like a bug that should be investigated further. Are you certain the frustum really doesn't contain the surface geometry? It seems more likely that the problem is with z buffer precision due to the earth geometry pushing the far plane out so far that the surface geometry is getting buried, as other people in the thread have suggested. -- Bryan Thrall Principal Software Engineer FlightSafety International bryan.thr...@flightsafety.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB in VS10...
You've got mail... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Monday, September 24, 2012 1:59 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] VPB in VS10... See my previous post. The template compile errors that I'm getting are strange. Perusing the forum, I did find something similar when someone was compiling osgPhysics against OSG... I didn't find it at a quick glance. Can you email it to me privately? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS * Telemetry * Cryptography * Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VPB in VS10...
All, I have a couple of questions regarding VirtualPlanetBuilder on Windows... 1) Does the latest SVN of VPB compile on Windows 7 using Visual Studio 10 and OSG 3.0.1? I'm having major issues getting it to compile in this environment. 2) If it does compile, will it run without the nvtt for compression? My current machine has an ATI card (no NVIDIA). Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB in VS10...
That's good to know. I have version 0.9.12 which should compile against OSG 3.0.1. Perhaps I'm not using CMake to generate the projects correctly. Is there a Wiki for building VPB using Cmake? I've always done it on Linux but this is a first on Windows... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Friday, September 21, 2012 12:23 PM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB in VS10... On Fri, Sep 21, 2012 at 12:15 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, 1) Does the latest SVN of VPB compile on Windows 7 using Visual Studio 10 and OSG 3.0.1? I'm having major issues getting it to compile in this environment. 2) If it does compile, will it run without the nvtt for compression? My current machine has an ATI card (no NVIDIA). I last built VPB .9.11 against OSG 3.1.0 in Jan of this year, on VC++ 2010 32 and 64-bit without nvtt. I don't think NVTT requires an Nvidia card, in fact, it can be used with NO OpenGL graphics card. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS * Telemetry * Cryptography * Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to update only one view in compositeviewer?
Roman, Have you tried view-getCamera()-setNodeMask(0x0)? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Roman Grigoriev Sent: Thursday, September 13, 2012 11:09 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How to update only one view in compositeviewer? Hi, I have qt app with tab widget with two views in one compositeviewer When I switch tab I'd like not to render invisible window. I browse source and not found any method to disable rendering on certain view Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=50037#50037 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph Newbie: PErformance question
Are you on Windows or Linux? If Windows, are you running with debug OSG libs? If so, release OSG libs are much faster. Just a thought... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Randall Hand Sent: Monday, September 10, 2012 8:35 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] OpenSceneGraph Newbie: PErformance question I'm experimenting with OpenScenegraph for a new project, and I've build a simple application that opens 2 viewer windows, and places 3 teapots in them (using the teapot object from the osgteapot example), translating them into different positions. My resulting scene graph (saved as an osg) looks like this: Group { UniqueID Group_0 nodeMask 0x cullingActive TRUE num_children 3 Group { UniqueID Group_1 nodeMask 0x cullingActive TRUE StateSet { UniqueID StateSet_2 DataVariance STATIC rendering_hint DEFAULT_BIN renderBinMode USE binNumber 50 binName RenderBin } num_children 1 MatrixTransform { nodeMask 0x cullingActive TRUE referenceFrame RELATIVE Matrix { 1 0 0 0 0 1 0 0 0 0 1 0 0 -50 0 1 } num_children 1 Geode { UniqueID Geode_3 nodeMask 0x cullingActive TRUE StateSet { UniqueID StateSet_4 DataVariance STATIC rendering_hint DEFAULT_BIN renderBinMode INHERIT Material { ColorMode OFF ambientColor 0.2 0.2 0.2 1 diffuseColor 0.8 0.8 0.8 1 specularColor 0 0 0 1 emissionColor FRONT 0 1 0 1 emissionColor BACK 1 0 0 1 shininess 0 } LightModel { ambientIntensity 0.2 0.2 0.2 1 colorControl SINGLE_COLOR localViewer FALSE twoSided TRUE } } num_drawables 1 } } } Group { UniqueID Group_5 nodeMask 0x cullingActive TRUE Use StateSet_2 num_children 1 MatrixTransform { nodeMask 0x cullingActive TRUE referenceFrame RELATIVE Matrix { 1 0 0 0 0 1 0 0 0 0 1 0 -10 -50 0 1 } num_children 1 Use Geode_3 } } Group { UniqueID Group_6 nodeMask 0x cullingActive TRUE Use StateSet_2 num_children 1 MatrixTransform { nodeMask 0x cullingActive TRUE referenceFrame RELATIVE Matrix { 1 0 0 0 0 1 0 0 0 0 1 0 10 -50 0 1 } num_children 1 Use Geode_3 } } } Pretty basic.. However, I'm only getting about 60-70fps (in each of my 2 viewers). I've already set the vsync=false in my Stateset for the viewer (if I run with _nothing_ in my Scene Graph I get over 1000fps). Is this typical performance? I really expected to still be getting 100+fps easy with such trivial geometry. -- Randall Hand http://www.yeraze.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] LineSegmentIntersector question...
All, I have a couple of questions regarding LineSegmentIntersector. I noticed that for a given line segment, it currently computes and returns ALL intersections with a given geometry in the scene. My questions are: 1) Does it support a feature of detecting a hit and then returning without the need to compute all the intersections? This would be sort of like a visibility test. 2) Does it have the ability to find the closest intersection without the need to compute all the intersections? In other words, does it step along from the starting point of the line segment until an intersection is found and then bail out? 3) If it doesn't support these features, is it possible to modify the LineSegmentIntersector to support these? I would think that having this capability would improve performance where applicable. 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
Re: [osg-users] LineSegmentIntersector question...
Farshid, Thanks much for the input and addressing my questions. That is good news that the support is there. I'm assuming the default is NO_LIMIT. Is this true? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Farshid Lashkari Sent: Tuesday, September 11, 2012 11:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Hi Shayne, The base osgUtil::Intersector class supports setting the limits on intersection results, using the setIntersectionLimit() method. The current options are NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST. On Tue, Sep 11, 2012 at 9:47 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: 1) Does it support a feature of detecting a hit and then returning without the need to compute all the intersections? This would be sort of like a visibility test. Set the intersection limit to LIMIT_ONE 2) Does it have the ability to find the closest intersection without the need to compute all the intersections? In other words, does it step along from the starting point of the line segment until an intersection is found and then bail out? Set the intersection limit to LIMIT_NEAREST. This mode could be optimized more, but it will currently reject a subgraph if the nearest point of the bounding sphere is further than the nearest hit. So it can still provide significant savings in computation time. Cheers, Farshid 3) If it doesn't support these features, is it possible to modify the LineSegmentIntersector to support these? I would think that having this capability would improve performance where applicable. 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegmentIntersector question...
Just a follow on question to my previous email... Is this functionality of setting limits on intersection results only found in later versions of OSG? I'm currently using OSG 2.9.11 and I can't find any support for this. I guess this would explain why I asked the questions in the first place. If true, I need to upgrade to a later version like 3.0.1... -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, September 11, 2012 11:13 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Farshid, Thanks much for the input and addressing my questions. That is good news that the support is there. I'm assuming the default is NO_LIMIT. Is this true? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Farshid Lashkari Sent: Tuesday, September 11, 2012 11:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Hi Shayne, The base osgUtil::Intersector class supports setting the limits on intersection results, using the setIntersectionLimit() method. The current options are NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST. On Tue, Sep 11, 2012 at 9:47 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: 1) Does it support a feature of detecting a hit and then returning without the need to compute all the intersections? This would be sort of like a visibility test. Set the intersection limit to LIMIT_ONE 2) Does it have the ability to find the closest intersection without the need to compute all the intersections? In other words, does it step along from the starting point of the line segment until an intersection is found and then bail out? Set the intersection limit to LIMIT_NEAREST. This mode could be optimized more, but it will currently reject a subgraph if the nearest point of the bounding sphere is further than the nearest hit. So it can still provide significant savings in computation time. Cheers, Farshid 3) If it doesn't support these features, is it possible to modify the LineSegmentIntersector to support these? I would think that having this capability would improve performance where applicable. 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegmentIntersector question...
Farshid, Thank you for your help...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Farshid Lashkari Sent: Tuesday, September 11, 2012 11:28 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Hi Shayne, Yes, the default is NO_LIMIT. I'm using it in version 2.9.12, but I think I might have backported it from a newer version. Sounds like you'll need to do an upgrade to get this feature. Cheers, Farshid On Tue, Sep 11, 2012 at 10:25 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Just a follow on question to my previous email... Is this functionality of setting limits on intersection results only found in later versions of OSG? I'm currently using OSG 2.9.11 and I can't find any support for this. I guess this would explain why I asked the questions in the first place. If true, I need to upgrade to a later version like 3.0.1... -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, September 11, 2012 11:13 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Farshid, Thanks much for the input and addressing my questions. That is good news that the support is there. I'm assuming the default is NO_LIMIT. Is this true? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Farshid Lashkari Sent: Tuesday, September 11, 2012 11:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector question... Hi Shayne, The base osgUtil::Intersector class supports setting the limits on intersection results, using the setIntersectionLimit() method. The current options are NO_LIMIT, LIMIT_ONE_PER_DRAWABLE, LIMIT_ONE, LIMIT_NEAREST. On Tue, Sep 11, 2012 at 9:47 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: 1) Does it support a feature of detecting a hit and then returning without the need to compute all the intersections? This would be sort of like a visibility test. Set the intersection limit to LIMIT_ONE 2) Does it have the ability to find the closest intersection without the need to compute all the intersections? In other words, does it step along from the starting point of the line segment until an intersection is found and then bail out? Set the intersection limit to LIMIT_NEAREST. This mode could be optimized more, but it will currently reject a subgraph if the nearest point of the bounding sphere is further than the nearest hit. So it can still provide significant savings in computation time. Cheers, Farshid 3) If it doesn't support these features, is it possible to modify the LineSegmentIntersector to support these? I would think that having this capability would improve performance where applicable. 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.or g http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.o r g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.o r g ___ 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
Re: [osg-users] KdTree issue...
Robert, Thanks for the feedback. After I had posted my problem, I did find a previous thread of discussion that addressed a somewhat similar problem to what I've been seeing. It too was related to memory or a lack thereof. I can certainly look into it further to see if that is the problem. On moving to OSG 3.0.1, I can try it and move on from there. I'm assuming that there is a version of VPB that is in lockstep to the 3.0.1 release? Thanks for your help. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Saturday, August 25, 2012 1:53 AM To: OpenSceneGraph Users Subject: Re: [osg-users] KdTree issue... HI Shayne, The stack trace suggests an allocation issue when building a KdTree leaf. Any chance you are running out of memory? As a general comment I would suggest that you try OSG-3.0.1 rather than a old 2.9.x developer release as there is chance that bug fixes will have fixed bugs that are relevant to you. If moving to OSG-3.0.1 doesn't fix the issue then I would work on isolate which tile causes the KdTree builder to crash, to do this I'd write out each tile to a .osg(t) file prior to doing the KdTree build so if it crashes you have a record of the problem tile and can then test it stand alone. Robert. On 25 August 2012 00:16, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I have a terrain database built with VPB that I'm currently doing visibility tests on based on ten different locations on the terrain. The tests are using the osgSim::LineOfSight class to determine intersection with the terrain between each location. Things appear to run fine until I use KdTrees to speed up the intersection testing (which is quite slow) with the terrain. I use the call osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter:: Options::BUILD_KDTREES); to do this. Unfortunately doing this causes the application to crash when doing the intersection tests. I've attached a debug stack trace after the crash has occurred (KdTreeCrash.txt). I've also turned on VERBOSE_OUTPUT in the KdTree.cpp file to gather more information on why this is happening (KdTreeOut.txt). I'm not familiar enough with the pertinent code to determine why KdTrees is causing the application to blow up. I'm running with OSG 2.9.11 on Windows 7, Visual Studio 2008. Any ideas on what's going on? Is there a limitation on what KdTrees will handle? 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] post-rendering warping and off-axis projection
Torben, Thanks for addressing my questions and providing that information. We've relied on the projectors and associated software (Mersive) to do the distortion correction and edge blending but a cheaper (monetary-wise) approach is always worth investigating... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, August 21, 2012 4:15 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] post-rendering warping and off-axis projection Hi Shayne, On the distortion correction, is there really any need for pixel level distortion? That would seem very expensive. I would think that textureCoodinate distortion is more than sufficient with a reasonable mesh resolution. I haven't seen the need for pixel level distortion in a spherical dome display. distortionNG supports vertex distortion and texCoord distortion, pixel wise distortion is planned but not yet realized because we do not have a use case for pixel wise distortion. Theoretically it is the most flexible distortion but it thwarts a lot of OpenGLs image quality enhancements like anti-aliasing and makes the image noisy, so you need to apply a filter at a post rendering stage. It could be realized in shaders as it is done in the current( old) osgVisual distortion module, its perfomance is aceptable. With vertex(mesh) distortion and texCoord-distortion you can achieve identical results but I personmally prefere the vertex distortion for the follow reason: If you configure distortionNG to display the distortion Mesh, you can use thes mesh to setup/control each channels correct alignment, whereas with textCoord you cannot do that. Does osgVisual support an interface for providing asymmetric viewing frustums for each channel? What I mean by this is can I specify the clipping bounds (i.e. rotation, widening or shrinking) for each channel frustum so that I can effectively tile the channels in a dome display optimally? You can apply any projectionmatrix OSG/OpenGL allows, it does not introduice any restrictions. How does osgVisual deal with edge blending of the channels or do you rely on the projectors to do this? The blending is performed in the distortion Modules, the projectors are COTS devices, only a better color management could be useful to ensure an identical color temperature on each channel. -- So why is distortionNG still marked as experimental if it works like a charm?! Maybe I should explain the current situation: The above mentioned 6 channel helicopter simulator uses a proprietary commercial setup system: It is camera based and its output is the blendmap, the projection matrix and the distortion matrix used by distortionNG. It works like a charm, but it is very expensive. For the academic usage osgVisual aims for, a cheaper solutions should be available: Therefore I'm also working on a mouse based setup method. This is very easy for vertex/texCoord distortion setup, but it is not so easy for the projection Matrix or the blend map. The manual setup mode is still unter construction. The manual setup should be done in the following order (not yet finishend, it may contain errors) * Position the projectors to cover every desired sqare inch of the screen, ensure that there is a reasonable overlaping of the projectors to use for blending purposes. * In each channel display the distortion mesh and align it with the mouse and setup a regular mesh structure across all channels on the whole screen. ensure that each distorted channel covers a regular, ideally rectangular area from the simulator eye point perspective, this simplyfies the design of the projection matrix. * Not yet solved because problematic: The blendmaps must be designed interactively with the mouse. The blend function between black and wite must not necessarily be linear, but maybe it can be simplyfied be regarding it as linear. The black blending edges are simple, they are the edge of the channel projector (blending maps are not distorted!) . The inner (white) blending edges have to be defined by mouse. If required the non-linear blend function must be definable. * Not yet solved because problematic: the projection Matrix has to be defined. To set it up correctly, the position of each channel relative to the simulators eye point must be determined. A cheap theodolith may be required. Finally the projection matrix has to be defined by this measured angels relative to eypoint. How to do this interactively I have no clue (yet) :) The distortionSet itself is a container which can by saved and restored (like a path file of the animation manipulator) once it is configured by one of the above methods. Finally one thing to mention: Lots of this tasks may be easy - I simply do not know because my time is limited due to my PhD and my daily work (both not in this area) and it is hard to get free hours and
Re: [osg-users] post-rendering warping and off-axis projection
Torben, That's good news about the CiGi module. If this gets completed, I will be very interested in looking at osgVisual for our host. On the distortion correction, is there really any need for pixel level distortion? That would seem very expensive. I would think that textureCoodinate distortion is more than sufficient with a reasonable mesh resolution. I haven't seen the need for pixel level distortion in a spherical dome display. Does osgVisual support an interface for providing asymmetric viewing frustums for each channel? What I mean by this is can I specify the clipping bounds (i.e. rotation, widening or shrinking) for each channel frustum so that I can effectively tile the channels in a dome display optimally? How does osgVisual deal with edge blending of the channels or do you rely on the projectors to do this? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Monday, August 20, 2012 1:15 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] post-rendering warping and off-axis projection Hi, you can also have a look at osgvisual.org, we are currently working on a new distortion framework w'll submit once it is finished. We have already a 6 channel helicopter simulator with a specrical screen working with that software, only the manual setup via mouse is not working yet. Here are some images: http://www.osgvisual.org/projects/osgvisual/chrome/site/img/distortionNG 1.jpg http://www.osgvisual.org/projects/osgvisual/chrome/site/img/distortionNG 2.jpg http://www.osgvisual.org/projects/osgvisual/chrome/site/img/distortionNG 3.jpg The CiGi-Module for multichannel communication is under construction currently, we hope to finish this autumn. Do you want to use vertex distortion of the Mesh, textureCoordinate distortion of the RTT-Output or pixel wise distortion? Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49334#49334 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] window-in-window terrain view
Dan, Yes, you can do a picture in a picture. It's just another view in a composite viewer that shares the same graphics context as the parent view (i.e. the view that you're embedding into). So, let's say viewA is the parent view created as usual with something like setUpViewInWindow(...). Now you want to embed viewB into viewA. This is done by viewB-getCamera()-setViewport(x,y,w,h); // x,y referenced from LL corner of parent window viewB-getCamera()-setGraphicsContext(viewA-getCamera()-getGraphicsCo ntext()); You can set the state and scenegraph for viewB just like any other view that you want to render. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Dan Marshal Sent: Sunday, August 19, 2012 11:56 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] window-in-window terrain view Hi, I am using OSG to create a simple flight sim app. I want to have a terrain 'window-in-window' to show the aircrafts path over the earth. The terrain view would have its own coordinates. Is there a simple way to create a view inside another view? Thank you! Cheers, Dan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49331#49331 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] post-rendering warping and off-axis projection
Depending on what you're projecting your channels onto (i.e. a spherical dome surface), you may need to come up with some asymmetrical custom frustums for each channel so as to minimize overlap and edge blending artifacts... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ruigang Yang Sent: Friday, August 17, 2012 9:03 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] post-rendering warping and off-axis projection Thank you all for the quick reply. I also studied quite bit recently. The RTT camera is exactly what I need. In the OSG cookbook, there is a powerwall exsample. The use of slave-camea can make off-axis projection easier to set. Thank you! Cheers, Mark -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49310#49310 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ECEF Oriented Compass Implementation
Since you're navigating on a sphere, you always need to calculate the bearing based off the local up vector of the sphere (ground stabilized) and not the up vector of the ownship. The reason why your code works from the birds eye view is because the up vectors between the two are the same in this case. When you introduce pitch and roll, the up vector of the ownship diverges from the sphere up vector which probably explains why your code below no longer works. Once you calculate the bearing correctly, your compass heading can then be calculated by using the bearing angle to rotate around the z-axis (0,0,1). -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of onur akkaya Sent: Thursday, June 28, 2012 1:20 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] ECEF Oriented Compass Implementation Hi, I have an ECEF terrain and I want to implement a compass node to show the true north to the user. I tried the code below but at some angles it does not work correctly. When the camera is vertical (birds eye view) to the terrain, it works perfect but if you rotate the camera (elevation or roll) it does not show the correct value. thanks, class Compass : public osg::Camera { public: Compass(void) { } Compass( const Compass copy, osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY ): osg::Camera(copy, copyop), _plateTransform(copy._plateTransform), _needleTransform(copy._needleTransform), _mainCamera(copy._mainCamera), m_bIsFirst(false) { } Compass::~Compass(void) { } META_Node( osg, Compass ); void setPlate( osg::MatrixTransform* plate ) { _plateTransform = plate; } void setNeedle( osg::MatrixTransform* needle ) { _needleTransform = needle; } void setMainCamera( osg::Camera* camera ) { _mainCamera = camera; } virtual void traverse( osg::NodeVisitor nv ) { if ( _mainCamera.valid() nv.getVisitorType()==osg::NodeVisitor::CULL_VISITOR ) { osg::Matrix matrix = _mainCamera-getViewMatrix(); matrix.setTrans( osg::Vec3() ); osg::Vec3 northVec = osg::Z_AXIS * matrix; northVec.z()= 0.0; northVec.normalize(); osg::Vec3 axis = osg::Y_AXIS ^ northVec; float angle = atan2(axis.length(), osg::Y_AXIS*northVec); axis.normalize(); if ( _plateTransform.valid() ) { _plateTransform-setMatrix( osg::Matrix::rotate(angle, axis) ); } _plateTransform-accept( nv ); _needleTransform-accept( nv ); osg::Camera::traverse( nv ); } } osg::MatrixTransform* createCompassPlate( const std::string image, float radius, float height) { osg::Vec3 center(-radius, -radius, height); osg::ref_ptrosg::Geode geode = new osg::Geode; geode-addDrawable(createTexturedQuadGeometry(center, osg::Vec3(radius*2.0f,0.0f,0.0f), osg::Vec3(0.0f,radius*2.0f,0.0f)) ); osg::ref_ptrosg::Texture2D texture = new osg::Texture2D; texture-setImage(osgDB::readImageFile(image)); osg::ref_ptrosg::MatrixTransform part =new osg::MatrixTransform(); part-getOrCreateStateSet()-setTextureAttributeAndModes(0, texture.get() ); part-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT _BIN ); part-addChild(geode.get()); return part.release(); } osg::MatrixTransform* createCompassNeedle( const std::string image, float radius, float height) { osg::Vec3 center(-radius/4, -radius, height); osg::ref_ptrosg::Geode geode = new osg::Geode; geode-addDrawable(createTexturedQuadGeometry(center, osg::Vec3(radius/2,0.0f,0.0f), osg::Vec3(0.0f,radius*2,0.0f)) ); osg::ref_ptrosg::Texture2D texture = new osg::Texture2D; texture-setImage(osgDB::readImageFile(image)); osg::ref_ptrosg::MatrixTransform part =new osg::MatrixTransform(); part-getOrCreateStateSet()-setTextureAttributeAndModes(0, texture.get() ); part-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT _BIN ); part-addChild(geode.get()); return part.release(); } protected: osg::ref_ptrosg::MatrixTransform _plateTransform; osg::ref_ptrosg::MatrixTransform _needleTransform; osg::observer_ptrosg::Camera _mainCamera; bool m_bIsFirst; }; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48579#48579 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g
Re: [osg-users] ECEF to openGl
Are you using OSG or OpenGL? Since you're using ECEF CS, I'm assuming you want to set things up for viewing on a spheroid. If you're using OSG, you can do the following using OSG's EllipsoidModel class (earth instance below) to set up viewing given a position and a look-at location in geodetic CS. It uses your example numbers. I would have chosen an altitude of something 0.0 to get height above ellipsoid... double geoEyeLat = 15.0; double geoEyeLon = 10.0; double alt = 0.0; double geoLookatLat = geoEyeLat + 0.01; double geoLookatLon = geoEyeLon; osg::Vec3d eye; osg::Vec3d up; osg::Vec3d lookat; earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(geoEyeLat), osg::DegreesToRadians(geoEyeLon), alt, eye[0], eye[1], eye[2]); up = earth-computeLocalUpVector(eye[0], eye[1], eye[2]); earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(geoLookatLat), osg::DegreesToRadians(geoLookatLon), alt, lookat[0], lookat[1], lookat[2]); osg::Matrixd t_matrix; t_matrix.makeLookAt(eye, lookat, up); view-getCamera()-setViewMatrix(t_matrix); Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Pilip Rogati Sent: Thursday, June 14, 2012 5:16 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] ECEF to openGl Hi. I have a big problem. not sure this is the good place to post this, but here goes. I am working on some aircraft simulation game... Problem for me are coordinates conversion. All my coordinates are in ECEF. I have problem setting up my camera properly and then later transforming ECEF positions of aircraft so they can be rendered correctly. can someone please tell me the right way to do it, or even better some code would be nice. for example. my camera is at lat 15, lon 10, elevation 0. i want it to look at lat 15.01, lon 10, elevation 0. I convert both of theses to ecef, so i have my cameraPosition and cameraTarget. how to convert models ecef position so i have opengl x-right, y-up, z-forward? Thank you! Cheers, Pilip -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48305#48305 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Geographic earth in OSG?
I understand the discrepancy. The real question is why the originator of the thread was using a sphere in the first place and not the ellipsoid to place the models... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jordi Torres Sent: Friday, May 18, 2012 1:41 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Geographic earth in OSG? Hi Shayne and Akilan, I suspect your problem has something to do with your shape drawable where you're using a sphere in your code. That is what I was trying to say, If you do your calculations with an ellipsoid model, but then you try to draw these positions in a ShapeDrawable::Sphere you'll never see the models in their right place. You have to draw on an Ellipsoid, not a Sphere. Depending on where you are putting our model (near the equator or near the poles) the difference could be very large. Cheers. -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Multiple terrain layers and relative altitudeheightmap
Aurelien, I don't have specific answers to your questions but have you considered using osgEarth instead of VPB? Given what you're trying to accomplish, osgEarth may be a better fit... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Aurelien Albert Sent: Wednesday, March 14, 2012 9:47 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] Multiple terrain layers and relative altitudeheightmap Hi, I'm starting a new project that will use VPB databases, but I have some questions about data manipulation : (all data are re-projected to the same coordinate system before any processing) 1. I need to manage multiple terrain layers. A layer is made of elevation data and texture data. So I think to build a terrain database for each terrain layer and then add all these database in the same scene graph. This allow the user to rebuild / show / hide only selected terrain layers Is there any technical / performance problems to use multiple terrain database nodes in the same scene graph ? I know there will be some rendering artifacts because a (X;Y) point can have different altitudes (one from each terrain layer) but this is not my question, I wondering about TileID management for example. 2. Some terrain layers have elevation data relative to another one. Is there anyway to manage that using osgTerrain ? I think I can add the 2 elevation data using GDAL before database creation, but I would prefer to do that at runtime. 3. Is there any invalid elevation value management to cut holes in source elevation data and then build a database with holes inside ? (not simple shape holes as square) 4. Is there any way to build a texture only database (no elevation data) and then add / remove it (as a colorlayer on pre-loaded terrain database) at runtime ? Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46268#46268 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Placing an object on a UTM file generatedwith osgdem
OSG uses z-up... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Wednesday, March 07, 2012 9:08 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Placing an object on a UTM file generatedwith osgdem For the record, it looks like the camera up vector when using an osgdem-generated terrain with UTM coordinates should be (0,0,1) as opposed to the (0,1,0) that is often seen. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46090#46090 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Culling time is extremely long
1) Are you running on Linux or Windows? 2) Are you running OSG debug or release optimized? 3) Are you running with the default cull settings? If you want helpful feedback, providing more info will provoke a better response from the community. I just see a screenshot of your stats. I don't see any file with initializing code... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Suyang Dong Sent: Saturday, February 25, 2012 4:07 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Culling time is extremely long Hi, I use compositeViewer, (osg 2.8.1) and each view contains no more than small amount of vertices. However the culling time, showed by the Statshelper, can be more than 30. The tricky thing is it is inconsistent between runs. Sometimes the culling time is 5 ~ 6. Then after I rerun the program, it shoots up to more than 30 I have attached the file for initializing views, Looking for help. Thank you! Cheers, Suyang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45769#45769 Attachments: http://forum.openscenegraph.org//files/rediculous_culling_180.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Any way to build terrain complex with DEMdata and then add different textures after?
Ethan, VPB is typically used for creating statically built pre-runtime databases. osgEarth is more of a dynamic model and paradigm. I would use either one or the other depending upon your needs. Based on what you want to do, I agree with Chris that osgEarth would probably be the better fit. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Wednesday, February 01, 2012 9:09 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Any way to build terrain complex with DEMdata and then add different textures after? Thanks Chris, I actually compile osgEarth and osgGIS last week and played around with them a bit thinking I may go in that direction. I was having trouble getting the vpb driver to work properly and the osgEarth vpb driver page even says: If at all possible, you should run osgEarth against the original source data instead of using this driver. You will get better performance with suffer fewer headaches. Are you suggesting replacing VPB with osgEarth entirely for my needs vs generating a VPB terrain file and combining it with osgEarth? Chris 'Xenon' Hanson wrote: On 2/1/2012 7:02 AM, Ethan Fahy wrote: I had been building terrain complexes using osgdem using both the -d and -t flags to combine elevation and textures. This works great when I have relatively low resolution. I am now running into scenarios where I am using 1 meter lidar elevation data and want the maximum number of levels. This takes hours to generate, but I may be looking at the same area over and over. However, the texture that I wrap onto that same are will be changing. Do I need to run osgdem for each texture? As far as I can see in the documentation there isn't any way to add texture to an existing osgdem-generated terrain complex; am I wrong? I know that for each level, osgdem is breaking up the original texture and doing level of detail wrappings for it, so maybe it is impossible. I may end up digging into the source code for osgdem to see what can be done but wanted to pose this question to the forum to see if anyone has any ideas about whether this can be done already or how feasible it is to do this by changing the existing source code. Thanks! One word: osgEarth. http://osgearth.org/ It can drape new imagery onto VPB-built terrain models, or can just build the terrain models on the fly with whatever imagery you want. If you want pre-compiled binaries, they're available through my company's support program. -- Chris 'Xenon' Hanson, omo sanza lettere. http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45171#45171 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Any way to build terrain complex with DEMdata and then add different textures after?
All things considered, I think that would be a wise direction to go in. If you do any database performance profiling between osgEarth and VPB, feedback on this would be informative... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Wednesday, February 01, 2012 9:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Any way to build terrain complex with DEMdata and then add different textures after? I think the best thing then is for me to get my scenarios up and running with osgEarth and see just how much a speed hit I'd take using it vs VPB. Plus the project I'm working on may ultimately be better served by hosting the data on a server and creating a web interface for the user, and everything I've read makes it seem like osgEarth would definitely be better suited for that task. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=45173#45173 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: Is there an osg example with ray tracing?
Shuiying, I would start by looking at the osgintersection example, in particular, the LineSegmentIntersector to see if that will help you. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of wang shuiying Sent: Friday, January 13, 2012 10:14 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Help: Is there an osg example with ray tracing? Hello, I simulate a laser sensor with shader using osg, and want to compare it with simulated laser sensor using ray tracing technique. So is there a ray tracing example of osg in such application? Thank you in advance! Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Large VPB Database build fails without
Brad, Thanks for the feedback. Any further enlightenment you can provide would be most helpful. I don't know what source data Torben is using but I'm using raw DTED data (i.e. n41.dt1) geocell tiles. When I build from my source using just osgdem, things build fine. It's when I use vpbmaster that I run into problems...on the exact same data source. If it were problems associated with the data, I would think that I would see problems building with osgdem. On the output bounds, is there a need to specify these manually if the source data has this information in it already? If I do gdalinfo on each of my terrain files, it reports lat/lon corner coordinates as present... Again, thanks for your help. I can try what you suggest below to see if it makes any difference. Let us know if you find anything further... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Thursday, January 12, 2012 1:05 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [vpb] Large VPB Database build fails without Hi, Just to let you know, I regulary build DEM only data sets and havent run into this problem, so it might be something to do with your particular data. Having said that, I always manually specify the output bounds so maybe that is why I havent had an issue. An examaple command I run is: vpbmaster.exe --run-path D:\BuildArea\CanberraDTED2 --geocentric -ge -180 -90 360 180 --add --layer 0 --tile-terrain-size 32 --tile-image-size 256 --layer-inheritance no -l 99 -d ..\CanberraDTED2_Data -o data/CanberraDTED2.ive The bit specifying the bounds is -ge -180 -90 360 180. I will try a test using your commands when I back at the office and let you know if I can reproduce the problem. Cheers, Brad -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, 12 January 2012 6:20 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Large VPB Database build fails without I agree with Torben here. There is no usage of texture or images anywhere in this problem. Only elevation data is being fed to vpbmaster when the hiccup occurs. What's strange is that running a single osgdem on the problem as a whole builds the database just fine. It's when osgdem runs in a subset role via vpbmaster that things blow up. If I issue the command vpbmaster --TERRAIN --geocentric -d /my/dted/path -o elev.ive or osgdem --run-path /my/dted/path -s build_master.source --subtile 2 0 4 (the task that fails) it blows up. On the other hand if I do osgdem --TERRAIN --geocentric -d /my/dted/path -o elev.ive It builds just fine and I can use osgviewer to look at the resultant terrain. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Wednesday, January 11, 2012 6:01 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Large VPB Database build fails without Hi Robert, this issues seems to be independent from reprojection aspects: it occurs as soon as a database setup contains DEM data wich is not covered with texture data. All data is reprojected in the corrected way. Regarding the latter I am sure because I used exactly the same data later on for my database - I was simply not able to exclude texture data from my DB to avoid this issue.. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44756#44756 ___ 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.or g - DISCLAIMER: This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than
Re: [osg-users] Problem with manipulating the projection matrix
Sebastian, The (2,2) entry of the projection matrix involves the near/far plane settings (e.g. -(f + n)/(f - n)) Perhaps if you issue the call... camera-setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR ); for the camera proj matrix you are manipulating, that might help prevent your (2,2) value in the proj matrix from being overwritten. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sven Walther Sent: Tuesday, November 22, 2011 1:08 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Problem with manipulating the projection matrix Hi everyone, I am trying to figure out a problem with manipulating the ProjectionMatrix in one of my views. There is no problem with setting the Matrix itself. This works fine. My problem occurs as I resume my current viewer. Changes of the components like projectionMatrix(0,0) or projectionMatrix(1,1) are used and are visualized correctly in the viewer. As I try to change the component projectionMatrix(2,2), the value is overwritten somewhere and I can't figure out where. Are some values out of range? I am trying to implement something that is called reverse perspective. Therefor I need to negotiate the correct component (2,2) in the projection matrix. Does anyone has an idea where the value is changed? What can I do about it? Thank you very much! Cheers, Sebastian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44001#44001 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Large VPB Database build fails without
I agree with Torben here. There is no usage of texture or images anywhere in this problem. Only elevation data is being fed to vpbmaster when the hiccup occurs. What's strange is that running a single osgdem on the problem as a whole builds the database just fine. It's when osgdem runs in a subset role via vpbmaster that things blow up. If I issue the command vpbmaster --TERRAIN --geocentric -d /my/dted/path -o elev.ive or osgdem --run-path /my/dted/path -s build_master.source --subtile 2 0 4 (the task that fails) it blows up. On the other hand if I do osgdem --TERRAIN --geocentric -d /my/dted/path -o elev.ive It builds just fine and I can use osgviewer to look at the resultant terrain. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Wednesday, January 11, 2012 6:01 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Large VPB Database build fails without Hi Robert, this issues seems to be independent from reprojection aspects: it occurs as soon as a database setup contains DEM data wich is not covered with texture data. All data is reprojected in the corrected way. Regarding the latter I am sure because I used exactly the same data later on for my database - I was simply not able to exclude texture data from my DB to avoid this issue.. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44756#44756 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw line in 3D screen
In the absence of existing data, what are your constraints for drawing these lines in 3D? Can they be coplanar in 3D space? From your description, it sounds like you're drawing a line with the mouse using 3D picking on existing points in 3D. Is this correct? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lalit Manchwari Sent: Monday, January 09, 2012 5:50 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Draw line in 3D screen Dear Robert: Thanks for input. I am trying to re-phrase my question. I have loaded a 3D data (X,Y,Z) on screen and can see these points as in screenshot_1. Also, I can, using mouse, draw line through these points (also shown.) However, if I want to draw a line as shown in screenshot_2, I am not able to do this, as this line does not passes through any loaded data. What can be the procedure to draw these lines using mouse which are not passing through any data point. Thank you! Cheers, Lalit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44707#44707 Attachments: http://forum.openscenegraph.org//files/screenshot_2_123.jpg http://forum.openscenegraph.org//files/screenshot_1_443.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] computeIntersections performance
Robert, I've also seen minimal speedup with KdTree usage (in my case with terrain). Is there an example where this feature (KdTree usage) is employed? Perhaps the way it's being used (at least by me) isn't correct... -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 05, 2012 1:14 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] computeIntersections performance Hi Dakota, Without knowing more about your model we can't say too much about what is actually causing the performance to be so poor. KdTree normally help with intersection performance in a massive way, and will typically be hundreds or even thousands of times faster depending on the nature of the model. Since you aren't getting speed and slow in the first place I can't help wonder if there isn't something particular about your model that is causing problem. Could it be that you have many long thin triangles in your scene? Run you model with osgviewer and bring up the on screen stats by pressing 's' three times - the will list the scene stats. How many geometry, primitives and vertices do you have in the scene? Robert. On 14 December 2011 09:40, Jen Hunter jenr...@web.de wrote: Hi, I'm curious about the time it takes to do intersection testing. I have roughly 800 Image points that I need to check for intersection with my model. My model isn't really complicated, it's basically just a huge box with a few rectangular elements that stand out a bit. It was created using Sketchup and is in Collada file format. I use the method computeIntersections. I'm working with OSG 2.8.2. However, even with kdtree support it takes about 120 to 190 ms to test for the 800 intersections. Without kdtrees it takes up to above 400 ms. I'm confused that it varies so much when the setup of the scene I tested was always the same. I am by no means an expert in computer graphics, so I ask you. Is it normal that it takes so long even for kdtrees, or is it likely that I do something terribly wrong? Thank you! Cheers, Dakota -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44379#44379 ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Newbie Questions re: Camera control (I think)
Matthew, Geodetic coordinates (lat,lon,alt) are typically mapped into some sort of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). Setting the view matrix will operate in the latter CS. The projection matrix does not control where you are looking. The view matrix determines that. The projection matrix controls the viewing frustum. Perhaps a review of the OpenGL transformation pipeline is appropriate here. Orientation (h,p,r) and position are concatenated together to form the view matrix. This topic has been discussed on how to manually set the view matrix to your liking. If you need some code snippets to get started, that can be provided...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Monday, January 02, 2012 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Newbie Questions re: Camera control (I think) Hi, I found the CameraControl wiki page, but it has a warning that it's out of date.. and I don't know how to update it to the osgViewer class because I can't get to the documentation (that, and I'm reasonably new to C++). - Given a point in 3d space with World Coordinates (eg, Latitude, Longitude, Altitude), how can I position the viewer at that point? I'm thinking that I need to create a matrix with my points in it, and then call camera.setViewMatrix(..). Is that correct? How do I convert my world coordinates into coordinates that will work in the camera? - Once I'm at that point, do I use camera.setProjectionMatrix to control where I'm looking? For example, say I want to look due North at lat 26, long -119, altitude 52. - Given a set of rotations that should happen to the camera (roll 3 degrees right, pitch 4 degrees up, etc), are those best handled by looking at the examples from osgGA::FirstPersonManipulator and going from there by building up a Matrix to use somewhere to rotate the camera's view? As of right now I've been tinkering with the code for the various implementations of the osgGA::FirstPersonManipulator and learning quite a bit - I just wanted to get these questions in my mind cleared up. I'm sorry that they're so basic =\ Thank you very much for your help, and for this community full of knowledge! Thank you again, Matthew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44529#44529 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Newbie Questions re: Camera control (I think)
Matthew, Perhaps you can elaborate a bit more on what you're trying to accomplish with OSG. That way the community can be in a better position to offer some advice and help. There are plenty of resources online that can help with understanding the OpenGL transformation pipeline. There's always the OpenGL redbook http://www.opengl.org/documentation/red_book/. Paul Martz has a great book as well that you can read for introduction http://www.opengldistilled.com/. This is a good place to start. If you google OpenGL transformation pipline, many hits and resources will come up that can help you. As for converting geodetic to geocentric coordinates, OSG can help you with that. Take a look at the EllipsoidModel class in OSG... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Tuesday, January 03, 2012 8:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) Hello - I really appreciate your reply... part of my problem is not knowing the proper terms to even be able to search for what I want... I think you're correct in suggesting she reading about OpenGL as well. Do you happen to have any suggestions? I'll look around for converting the geodetic coordinates to cartesian coordinates, which I assume must be based on the GeoTIFF scale I used as input.. That gives me something to search for! I'll also look up the view matrix discussions you mentioned here.. thanks! If course, any links to code, sample code, etc that you can provide would be a great help for jumping off. Its much easier to search for class and method names rather than abstract ideas.. Again, thank you! Matthew On Jan 3, 2012 7:19 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Matthew, Geodetic coordinates (lat,lon,alt) are typically mapped into some sort of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). Setting the view matrix will operate in the latter CS. The projection matrix does not control where you are looking. The view matrix determines that. The projection matrix controls the viewing frustum. Perhaps a review of the OpenGL transformation pipeline is appropriate here. Orientation (h,p,r) and position are concatenated together to form the view matrix. This topic has been discussed on how to manually set the view matrix to your liking. If you need some code snippets to get started, that can be provided...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Monday, January 02, 2012 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Newbie Questions re: Camera control (I think) Hi, I found the CameraControl wiki page, but it has a warning that it's out of date.. and I don't know how to update it to the osgViewer class because I can't get to the documentation (that, and I'm reasonably new to C++). - Given a point in 3d space with World Coordinates (eg, Latitude, Longitude, Altitude), how can I position the viewer at that point? I'm thinking that I need to create a matrix with my points in it, and then call camera.setViewMatrix(..). Is that correct? How do I convert my world coordinates into coordinates that will work in the camera? - Once I'm at that point, do I use camera.setProjectionMatrix to control where I'm looking? For example, say I want to look due North at lat 26, long -119, altitude 52. - Given a set of rotations that should happen to the camera (roll 3 degrees right, pitch 4 degrees up, etc), are those best handled by looking at the examples from osgGA::FirstPersonManipulator and going from there by building up a Matrix to use somewhere to rotate the camera's view? As of right now I've been tinkering with the code for the various implementations of the osgGA::FirstPersonManipulator and learning quite a bit - I just wanted to get these questions in my mind cleared up. I'm sorry that they're so basic =\ Thank you very much for your help, and for this community full of knowledge! Thank you again, Matthew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44529#44529 ___ osg-users
Re: [osg-users] Newbie Questions re: Camera control (I think)
Do you have a database to fly around in? If not, take a look at VirtualPlanetBuilder to build one...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Tuesday, January 03, 2012 9:37 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) I'm just working on a project to learn OSG, etc. For now, I've written a plugin for a flight simulator that will give me the GPS coords, altitude, heading etc.. and I wanted to see if I could get OSG to follow along with that data feed on my laptop. That's why I was asking about positioning the camera in space - I wanted to look at the same thing I was looking at in XPlane. I figured this would be a fun way to combine my interest in programming and aviation, while learning OpenGL/C++/OSG in the process. For now, I'll check out the EllipsoidModel. At first glance, it looks like I'll be good friends with this method by the end of things: void osg::EllipsoidModel::convertLatLongHeightToXYZ Going from the little I know, I could take those XYZ coords and place them into a matrix and then use that in the Viewer. I just need to work backwards from the input to Camera-setViewMatrix to find the APIs for creating that matrix.. --Matthew On Tue, Jan 3, 2012 at 8:01 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Matthew, Perhaps you can elaborate a bit more on what you're trying to accomplish with OSG. That way the community can be in a better position to offer some advice and help. There are plenty of resources online that can help with understanding the OpenGL transformation pipeline. There's always the OpenGL redbook http://www.opengl.org/documentation/red_book/. Paul Martz has a great book as well that you can read for introduction http://www.opengldistilled.com/. This is a good place to start. If you google OpenGL transformation pipline, many hits and resources will come up that can help you. As for converting geodetic to geocentric coordinates, OSG can help you with that. Take a look at the EllipsoidModel class in OSG... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Tuesday, January 03, 2012 8:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Newbie Questions re: Camera control (I think) Hello - I really appreciate your reply... part of my problem is not knowing the proper terms to even be able to search for what I want... I think you're correct in suggesting she reading about OpenGL as well. Do you happen to have any suggestions? I'll look around for converting the geodetic coordinates to cartesian coordinates, which I assume must be based on the GeoTIFF scale I used as input.. That gives me something to search for! I'll also look up the view matrix discussions you mentioned here.. thanks! If course, any links to code, sample code, etc that you can provide would be a great help for jumping off. Its much easier to search for class and method names rather than abstract ideas.. Again, thank you! Matthew On Jan 3, 2012 7:19 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Matthew, Geodetic coordinates (lat,lon,alt) are typically mapped into some sort of Cartesian coordinate system (x,y,z) (i.e. geocentric coordinates). Setting the view matrix will operate in the latter CS. The projection matrix does not control where you are looking. The view matrix determines that. The projection matrix controls the viewing frustum. Perhaps a review of the OpenGL transformation pipeline is appropriate here. Orientation (h,p,r) and position are concatenated together to form the view matrix. This topic has been discussed on how to manually set the view matrix to your liking. If you need some code snippets to get started, that can be provided...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matthew Runo Sent: Monday, January 02, 2012 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Newbie Questions re: Camera control (I think) Hi, I found the CameraControl wiki page, but it has a warning that it's out of date.. and I don't know how to update it to the osgViewer class because I can't get to the documentation (that, and I'm reasonably new to C++). - Given a point in 3d space with World Coordinates (eg, Latitude, Longitude, Altitude), how can I position the viewer at that point? I'm thinking that I
Re: [osg-users] Setting modelview matrix withviewer.getCamera()-setViewMatrix(modelViewMatrix) not working
Jaun, A couple of suggestions here... 1) look at the source code for setViewMatrixAsLookAt(...) to understand what it is doing with the input to create the view matrix. It calls a method makeLookAt(...) which creates an orthonormal basis in the rotation portion of the matrix from the eye,center,up input and then pre multiplies the result with the eye. 2) set the view matrix with setViewMatrixAsLookAt(...) and then get the resultant view matrix back out. Compare the returned result with your view matrix that you're passing into setViewMatrix(...) and see what is different. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Juan Herrera Sent: Monday, November 28, 2011 11:07 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Setting modelview matrix withviewer.getCamera()-setViewMatrix(modelViewMatrix) not working I might add that viewer.getCamera()-setViewMatrixAsLookAt(eye, center, up) does work. Why is this different? Cheers, Juan Herrera -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44086#44086 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] How to add texture to the terrain using vpbmaster
Can you provide an example of how you're using the osgdem command (i.e. flag settings, etc.)? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Xiaofeng Yang Sent: Wednesday, November 09, 2011 3:48 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] How to add texture to the terrain using vpbmaster Hi, I have downloaded the hgt format file from the dds.cr.usgs.gov and I used the osgdem to generate the terrain(ive format), I use osgDB::readNodeFile to get a node from the terrain file and I can get the lat,lon information everywhere in the terrain right. But the terrrain does not have the texture,So I download a jpg format picture and use globalmapper to set the coordinate system and the lat,lons. I can also use gdalinfo to get the information about the texture file. But when I use vpbmaster to patch the texture file to my terrain file,it always prints No soure file found to base database patching on. When I use osgdem to generate the terrain with texutre,I can get the ive terrain with texture,but it does not have the coordinate system or its system is not right. I do not know why and how to add the texture to the terrain well. Thank you! Cheers, Xiaofeng -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43794#43794 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] set material basic question
I'll attempt to make a guess on what may be happening... Since materials only makes sense with lighting enabled, the lighting normal may be dependent upon vertex order (auto normal generation). Specifying osg::Material::FRONT_AND_BACK option simply says to apply the material to both front and back faces of the polygon. If your lighting normal is facing opposite of the light source, the polygon face will be black (assuming ambient lighting/material is 0). -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Gianni Ambrosio Sent: Tuesday, November 08, 2011 2:39 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] set material basic question Hi All, I got the point. The vertex order of some faces of the wheel causes it. I modified one face of the wheel inverting the vertex order and after that modification I can see that face correctly coloured. Now, since I used the osg::Material::FRONT_AND_BACK option, why it doesn't work? In attachment the scene dump. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43755#43755 Attachments: http://forum.openscenegraph.org//files/wheel_red_927.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can i do masking out some part of my terrain? Isthat possible?
I'm not aware of anything in OSG that will allow you to mask your terrain the way you want. You may need to resort to a shader to get the desired effect... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Atilla Selem Sent: Wednesday, October 19, 2011 9:38 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How can i do masking out some part of my terrain? Isthat possible? Hi, i want to mask out some part of square myTerrain.ive node ( created using vpb ) according to user decided terrain radius. User can change mission radius starting from terrain center and i display a circle indicating user selection. Flying objects out of that radius is not created and can not be seen. (Aircrafts and other target objects..) if i could display myTerrain.ive node by just showing area covering that circle would be very fantastic 8). How can i do that using osg? i want the user to see only that circle/disk when camera position enables him to see all terrain area and objects. Thank you! Cheers, Lâ-Edri. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43456#43456 ___ 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] Large VPB Database build fails withoutobvious reason
Torben, Is this related to your previous email where you addressed the hiccup that is seen in osgdem when building with elevation only information? Just curious... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Wednesday, October 19, 2011 10:56 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Large VPB Database build fails withoutobvious reason Hi Robert, I ran the task file manually and the output is bassically the same as I listed already: Code: 0.018: Adding terrainTile 0.296: getTaskName(5,32,5) no nest, 6 12 0.296: DataSet::_run() 6 12 1.084: started DataSet::createDestination(13) 1.110: Time for after_reproject 0.025947 1.136: local_extents = xMin() -180.00 180.00 1.136: yMin() -60.00 60.00 1.136: AR=3.00 C1=3 R1=1 1.136: createNewDestinationGraph 1.272: Time for _destinationGraph-computeMaximumSourceResolution() = 0.00 1.272: Time for createDestinationGraph 0.135908 1.272: Time for after_computeNeighbours 0.06 1.272: completed DataSet::createDestination(13) 1.272: Error: no destination graph built, cannot proceed with build. 1.272: Time to write out DatabaseRevision::FileList - FilesAdded terrain_subtile_L5_X32_Y5/terrain_L5_X32_Y5.osgb.task.0.added, 0 1.272: Time to write out DatabaseRevision::FileList - FilesRemoved terrain_subtile_L5_X32_Y5/terrain_L5_X32_Y5.osgb.task.0.removed, 0 1.272: Time to write out DatabaseRevision::FileList - FilesModified terrain_subtile_L5_X32_Y5/terrain_L5_X32_Y5.osgb.task.0.modified, 0 1.272: Elapsed time = 1.271738 Do you have an idea why vpbmaster does not build the destination graph correctly? Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43458#43458 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About how to update the camera
Are you using a default manipulator or are you setting your camera position explicitly? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ramy panda Sent: Saturday, October 15, 2011 7:22 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] About how to update the camera Hi, Now I have faced a problem is that when i import a model into my own application, the model is not show at the center of the viewport, only after interacted with the model using translate function i can see the model in the view. I'm wondering that how to update the camera to make sure the model is showed in the center of the viewport after i import the model into the scene. Please be detail as i am a new user. Thanks very very very much. Thank you! Cheers, ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43421#43421 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Placing an object on a UTM file generatedwith osgdem
The --geocentric flag in osgdem builds a round earth database in meters with the coordinate system origin being the center of the earth. When you place your models on the earth (position and orientation), you'll need to keep this in mind. If your models are in meters you should be good and no rescaling is needed. Hopefully this addresses your question. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Wednesday, October 12, 2011 9:53 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Placing an object on a UTM file generatedwith osgdem I got everything working but have one more question: If the units of the object I am attaching to my terrain are in meters, and the original geotiffs that I started with before converting them using osgdem were also in meters, is any further scaling of the attached object necessary? I am worried that by converting the geotiffs to ive files using the --geocentric osgdem flag I may have changed the units of the terrain and may need some sort of ellipsoid model-based scaling equation for any objects that I attached to the terrain. Anybody have an answer to this? Much obliged. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43359#43359 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgCompute] Render order
J.P. Thanks for sharing... -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, October 12, 2011 10:45 AM To: OpenSceneGraph Users Subject: Re: [osg-users] [osgCompute] Render order Hi, reply to self... On 12/10/2011 16:45, J.P. Delport wrote: Hi, I want to mix some FBO pre-render cameras and osgCuda. Basically I need to do the following in a single frame: - do some FBO rendering - some cuda ops - again some FBO rendering - some cuda ops - again some FBO rendering For each cuda ops part I have a Computation node. Ideally I'd like to let the order be determined just by the order I've attached the nodes to a common parent node (this works for pre-render FBO cameras), but Computation creates render bins and no matter in what order I attach things (I've tried Computation with and without children) the order of my operations is wrong. Because I'm doing FBO rendering I want the cuda ops to be done in the render traversal too, i.e. I cannot do it in update traversal. Is there a way I can let Computation happen in the render traversal, but without it changing bins? I fixed it by placing the Computation node under a dummy FBO camera. Now all computation happens in pre-render stage and in right order. jp thanks 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. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Large VPB Database build fails without
I was seeing a similar (perhaps the same) problem a while back. I was also trying to build a database without imagery (just DTED only). I got sidetracked with other tasks so I wasn't able to chase down the problem. I was running an older version of OSG (2.9.8 I believe) and VPB on a Fedora core 13 machine. Resources were not a problem with this machine (12GB RAM, 16T disk space, Nvidia 9800 GTX card) so I doubt that was the problem. I too would be interested to find out what's causing the build failure you're seeing... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Sunday, October 09, 2011 5:12 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] Large VPB Database build fails without Hi, I try to build a database with DEM but without textures. After 317 tasks it fails and has still 1595182 tasks pending. After the fail it blacklists the one machine and so finishes the run. The log file of one of these tasks is the following: Code: 0.129: Adding terrainTile 5.253: getTaskName(5,33,0) no nest, 6 12 5.253: DataSet::_run() 6 12 17.588 : started DataSet::createDestination(13) 17.637 : Time for after_reproject 0.049001 17.686 : local_extents = xMin() -180.00 180.00 17.686 : yMin() -60.00 60.00 17.686 : AR=3.00 C1=3 R1=1 17.686 : createNewDestinationGraph 17.926 : Time for _destinationGraph-computeMaximumSourceResolution() = 0.00 17.926 : Time for createDestinationGraph 0.240480 17.926 : Time for after_computeNeighbours 0.10 17.926 : completed DataSet::createDestination(13) 17.926 : Error: no destination graph built, cannot proceed with build. 17.926 : Time to write out DatabaseRevision::FileList - FilesAdded terrain_subtile_L5_X33_Y0/terrain_L5_X33_Y0.osgb.task.0.added, 0 17.926 : Time to write out DatabaseRevision::FileList - FilesRemoved terrain_subtile_L5_X33_Y0/terrain_L5_X33_Y0.osgb.task.0.removed, 0 17.926 : Time to write out DatabaseRevision::FileList - FilesModified terrain_subtile_L5_X33_Y0/terrain_L5_X33_Y0.osgb.task.0.modified, 0 17.926 : Elapsed time = 17.926306 The situation is the same if i resume the build with Code: vpbmaster --tasks build_master.tasks It reloads all tasks from file and than again fails on the identical tasks. I don't know why osgdem complains about the missing destination graph with Code: Error: no destination graph built, cannot proceed with build. Any idea why it fails? my system is: Kubuntu 10.04 64 bit. Kernel 2.6.38-11-generic 12GB RAM OSG and VPB from trunk last week. Thank you for your help, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43278#43278 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Large VPB Database build fails without
Torben, When I get around to it, I will try to debug things on my end. I've been swamped with other priorities. I just wanted to inform you that I've seen the same problem when trying to build a database with DTED only (no imagery). If I add the imagery, things work fine as you have said... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, October 11, 2011 1:41 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Large VPB Database build fails without Hi Shayne, thanks for your feedback! In my case it's also definitly no my machine. Currently it builds a database with a bluemarbleNG texture as workaround and that build is scheduled for another two days. Then I can go on chasing the bug with roberts/your? help. I also added a single output line to the Taskmanager.cpp to make it more verbose. I'll send it as a submission asap. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=4#4 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Draw a line from world to screen
This topic has been covered before in various forms. Please see the following discussions for enlightenment... http://forum.openscenegraph.org/viewtopic.php?t=4991highlight= http://forum.openscenegraph.org/viewtopic.php?t=103highlight= http://forum.openscenegraph.org/viewtopic.php?t=1786highlight= -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Aurelien Albert Sent: Sunday, September 25, 2011 6:26 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Draw a line from world to screen Hi, I've made an Segment object which draw a segement from a point (x, y, z) to another (x, y, z) and working well. Now, I want to draw a Connector line from a point in space (x, y, z) to a point on screen (x, y). How can I transform my (x, y) screen point to find a equivalent (x, y, z) world point ? To convert from world to screen, this works well : Code: double width = pCamera-getViewport()-width(); double height = pCamera-getViewport()-height(); osg::Matrixd mv = pCamera-getViewMatrix(); osg::Matrixd mp = pCamera-getProjectionMatrix(); osg::Matrixd mw = pCamera-getViewport()-computeWindowMatrix(); osg::Matrixd worldToScreen = mv * mp * mw; osg::Vec4d position = osg::Vec4d(p_object-position(), 1.0) * worldToScreen; position = position / position.w(); double screenX = position.x(); double screenY = height - position.y(); But to convert from screen to world coordinate,I try this and it doesn't work : Code: osg::Vec4d screenPosition = osg::Vec4d(screenX, height - screenY, 0.5, 1.0); osg::Vec4d worldPosition = osg::Matrixd::inverse(worldToScreen) * screenPosition ; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42995#42995 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Get euler angles from rotation matrix
I'm not aware of any OSG function to give you what you want. It's probably because there are so many different conventions and sequences to address. Here's some useful links to extract Euler angles from a rotation matrix. These may be of some use for the problem you're trying to solve... http://www.euclideanspace.com/maths/geometry/rotations/conversions/matri xToEuler/index.htm http://paulbourke.net/geometry/eulerangle/Aij-to-Eulerangles.pdf -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexey Petruchik Sent: Thursday, September 08, 2011 5:19 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Get euler angles from rotation matrix Hi, everyone I have a rotation matrix, and I need to reconstruct yaw, pitch, roll angles from it. Is there any osg function to do this. I looked through MatrixDecomposition.cpp but didn't find any. Thank you! Cheers, Alexey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42531#42531 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Placing an object on a UTM file generated withosgdem
VPB will build the database using the CS of the source elevation/imagery. If the source is UTM, the database will be in that CS. If it uses lat/lon, it will be in that CS (both are flat earth databases). The placement of objects in the database will need to be in the CS the database uses or was built with. The geocentric flag will create a round earth type database where the origin is the center of the earth. You're probably getting the error because you need to re-project your data from UTM to WGS84 geodetic/georeferenced CS. Do a gdalinfo on your source data to see what it is... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ethan Fahy Sent: Monday, September 12, 2011 11:19 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] Placing an object on a UTM file generated withosgdem I have looked through all of the forum posts related to this issue and they have implicitly but not explicitly told me how to solve my problem, but being such a newbie I think I need some explicit help :-* I am starting with two geoTiff files, one dem and one terrain. I convert to ive using the following command line structure: osgdem -t terrain.GEOTIFF -d dem.GEOTIFF -l 1 -o terrain.ive I am able to load terrain.ive into my osg application and view it just fine. I then want to be able to add objects (e.g. tree osg files) onto the terrain. At this point I should mention that the geotiff files are in UTM WGS84 format. I have been trying to add a tree onto the terrain with the following osg code: Code: /* Load Scene Components from Files */ osg::ref_ptrosg::Node terrain = osgDB::readNodeFile(data\\terrain\\terrain.ive); osg::ref_ptrosg::Node tree = osgDB::readNodeFile(data\\tree\\Tree1.osg); /* Group Scene Components */ /*Tree Transform*/ osg::ref_ptrosg::PositionAttitudeTransform treeXform = new osg::PositionAttitudeTransform; osg::Vec3 treePosit(?,?,?); treeXform-setPosition( treePosit ); osg::Vec3 treeScale(1,1,1); treeXform-setScale(treeScale); /*Tree Rotation*/ osg::ref_ptrosg::MatrixTransform treeRotation = new osg::MatrixTransform; const double angle = osg::DegreesToRadians(0.0); const Vec3d axis(1, 0, 0); treeRotation-setMatrix(Matrix::rotate(angle, axis)); osg::ref_ptrosg::Group root = new osg::Group(); root-addChild(terrain);//add terrain to root root-addChild(treeXform);//add translation to root treeXform-addChild(treeRotation);//add rotation to translation treeRotation-addChild(tree);//add tree to rotation My question is whether this osg command / osg code is on track and I simply need to figure out appropriate values for my treePosit variable or whether I need to take a fundamentally different approach. I have read about attaching objects to geotiffs that were converted using the --geocentric flag, but if I add the --geocentric flag I get the following error: ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed. I have also seen the --TERRAIN flag for osgdem, but I definitely don't know if that's what I need. I have also looked into using osgEarth, which from what I've read might take care of more of this stuff automatically, but I'd rather figure this out using VPB/osgdem since I think I'm really close to a solution. Thanks in advance for any help! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42652#42652 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is the Z-Buffer linear or non-linear?
The transform below for the orthogonal projection is indeed linear, mapping [n,f] to [-1,1] in linear fashion. If you want to linearize depth with a perspective projection (i.e. survive the perspective divide between the vertex and fragment shader), here's a way to do that. The example uses HLSL but it gets the point across... http://www.mvps.org/directx/articles/linear_z/linearz.htm Another interesting discussion related to linear depth using W-buffers can be found at http://www.mvps.org/directx/articles/using_w-buffers.htm Just make sure you have support for W buffers... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Großer Sent: Wednesday, August 24, 2011 5:58 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Is the Z-Buffer linear or non-linear? Hello, I think I got it. Correct me if I am wrong, if I use an orthogonal projection I get linear Z-Buffer values. If I use a perspective projection I get non-linear values. The Z-Buffer value (z') of a perspective projection is: z' = (far + near) / (far - near) + 1/z ((-2 * far * near)/(far-near)) The Z-Buffer value (z') of a orthogonal projection is: z' = 2 * ((z-near)/(far-near))-1 So, I use a orthogonal projection therefore I get a linear Z-Buffer. I hope that is right. Cheers Martin Original-Nachricht Datum: Wed, 24 Aug 2011 10:01:23 +0200 Von: Martin Großer grosser.mar...@gmx.de An: osg-users@lists.openscenegraph.org Betreff: [osg-users] Is the Z-Buffer linear or non-linear? Hello, I am completely confused about the Z-Buffer. I thought it is non-linear but now I read a lot in forums and now I am not sure about that. The reason about this question is I want render linear depth values into a texture. I think, I can do it with this shader: varying float depth; uniform float near; uniform float far; void main(void) { vec4 viewPos = gl_ModelViewMatrix * gl_Vertex; depth = (-viewPos.z-near)/(far-near); gl_Position = ftransform(); }; varying float depth; void main(void) { gl_FragDepth = depth; } But the poor think is all other shader will be overwritten. Now I use this: _rendertarget-setInternalFormat(GL_DEPTH_COMPONENT); _cam-setClearMask(GL_DEPTH_BUFFER_BIT); _cam-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); _cam-attach(osg::Camera::DEPTH_BUFFER, _rendertarget); _cam-setRenderOrder(::osg::Camera::PRE_RENDER, 0); But this is nonlinear, isn't it? I hope someone can help me about this. Thanke you very much. Martin -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de ___ 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] An Open Scene Graph solicitation has been postedon FedBizOpps
However, it is targeted for a specific host OS / GPU combination and is NOT a general enhancement. Of course, the problem may not exist on Red Hat or Fedora or Ubuntu [or insert Linux variant here] or Windows or Macintosh. Can NIST prove that it does not exist on those platforms! They provide links to get the test bed software which manifests the problem. It might be worthwhile (if one has the hardware) to see if this problem exists on other OS types. It should be fairly easy to do. My guess is that the problem will persist on those other platforms... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of John Richardson Sent: Monday, August 22, 2011 1:09 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] An Open Scene Graph solicitation has been postedon FedBizOpps Snipped to reduce verbosity... ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
I've had this problem before with models that are unit-less. I just manually scaled the models (as Paul suggests) until they looked right based on landmarks in the database where the sizes were known. It's an empirical approach but it's the best you can really do if you don't know the units of the model. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Friday, August 12, 2011 1:50 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] dimension oh a model On 8/12/2011 11:11 AM, Sanat Talmaki wrote: Hi Paul, Sorry for my late reply to your post. That is a very good point you bring up about the units of different objects in a scene. When one uses data from USGS in VPB to create a terrain, the rest of the objects have to be scaled up or down to represent their real world size prior to be being used in the scene... But the confusion for me arises when say I load a truck in osg and its dimensions are (12, 6, 8) = (L,W,H). (don't know what units these are in) Without knowing the units of the model (whether 12 feet/meters), how does one apply a scaling factor? As I said in my previous post, if you don't have access to any metadata that tells you what the units are, there's no way for your software to handle this in an automated way. You must either manually scale the model to fit your application coordinate system, or you must manually create some metadata. In the case you cite, both options would be based entirely on guesswork. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
It has worked for us just fine in the absence of data. Good luck with your effort... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sanat Talmaki Sent: Friday, August 12, 2011 2:59 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] dimension oh a model Coincidentally that was the approach I was going to take: Place some object of known size on my terrain and scale the unknown units object accordingly, sort of digitally 'eyeballing' it. This empirical approach seems to be the most appropriate way when dealing with objects of unknown units that need to be used with other objects/terrain of a known size ( units). Thanks Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42042#42042 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
The odd algorithm you're referring to is bilinear interpolation which essentially defines a hyperbolic paraboloid (the simplest surface) through 4 non-coplanar points (i.e. the infamous quad). For intersection purposes in OSG, it's good that it breaks the quad up into two triangles. Planes are easier to intersect than bilinear surfaces... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mike Garrity Sent: Thursday, August 04, 2011 8:24 AM To: OpenSceneGraph Users Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned 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, August 02, 2011 4:49 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. Most (all?) cards today do break them into 2 tris, but nothing in the OpenGL spec says that they have to, or specifies exactly how they should do it. The reason is that the original SGI geometry engine did not split them. It drew quads directly with an odd algorithm for interpolating values across the interior. Quad lives on as a historical quirk, like the panda's thumb. -Mike Garrity -The MathWorks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 vertices returned
Torben, My guess is that the quads are geometrically represented by two triangles with a shared edge. I believe the intersector is returning a ray/triangle intersection so one (that is hit) of the two triangles that make up the quad is being returned. This probably doesn't solve your problem but it may explain why you're getting only 3 vertexes on return... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, August 02, 2011 12:39 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] intersection with quad mesh: only 3 vertices returned Hi, I have a mesh of quads. If i intersect them, it hits the face and returns me the results (osgUtil::LineSegmentIntersector::Intersection result) As I tried to access the indices I realized that it only returns 3 vertices. ( result.indexList.size() == 3 ) Is this a bug or do I miss something? I would like to acces the 4 vertices of the quad to manipulate the vertex I intersect next to. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41801#41801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection with quad mesh: only 3 verticesreturned
It is true that QUAD is an OpenGL primitive but the GL driver tessellates it into two triangles underneath the hood. As for how OSG handles quads relative to intersections, it is my understanding that the intersector works with line/triangle intersections. If you're trying to intersect a quad, however, it would seem that if either of the two triangles is hit, 4 vertexes would/should be returned. I haven't looked at the code to really know for sure. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, August 02, 2011 1:14 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] intersection with quad mesh: only 3 verticesreturned Hi S2LR, I thought QUAD is a OpenGL primitive. Your statement make sence to me. But then OSG hides the substitution by 2 triangles quite good, also in the wiremode of osgViewer the quads are displayed. I thought (even when not to often used as triangles) that quads are natively supported and would work with intersections. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41804#41804 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VirtualPlanetBuilder database and rotations for viewmatrix
Michael, Position and orientation of the ownship on a VPB sphere has been discussed at length on this forum. You should have no problem finding what you need to do. Check out http://forum.openscenegraph.org/viewtopic.php?p=40200#40200 for more info. For an arbitrary entity (aircraft or otherwise), the transform needs to be different. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of michael bosse Sent: Saturday, July 09, 2011 11:29 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] VirtualPlanetBuilder database and rotations for viewmatrix Hi everyone, I am working on a little toy flight sim type program using the blue marble data with virtual planet builder, built with --geocentric in wgs84. I have managed to integrate some basic physics, and I set up an eye-point above the vehicle facing down with north always up in my view. I want to have a mode where the view is actually at the eyepoint of the aircraft and matches its rotations. This is where I am having problems... The data I have are the euler angles and position (xyx). I've tried a number of approachesto manually set the viewmatrix, but so far, I haven't had much luck. I'll outline what i have tried below. At first I tried using a make look at, but I couldn't figure out what the parameters other than eye should be, so I moved on to setting up the matrix myself. First I tried building the rotation matrix by setting it like you would the model matrix, but I realized that it should actually be the inverse of that. I then tried taking the rotation matrix of the aircraft and the translation of the aircraft, and applying them like they do in flightgear, which is : double phi, theta, psi; // given in radians osg::Vec3d position ( x, y, z ); // gcc meters osg::Quat Qeul = makeEulerQuat( phi, theta, psi ); // same function used for drawing the model which works... osg::Matrixd viewMatrix ( osg::Matrixd::translate( -position ) * osg::Matrixd::rotate( Qeul.inverse() ) ); getCamera()-setViewMatrix(viewMatrix); I'm stuck on this one, I haven't been able to get the camera to look correct in any orientation other than top down (because I know how to set up makelookat for that ;)). This must be a fairly common problem, perhaps there is an FAQ or an example I missed that spells it out. Anyone have any idea what I am doing wrong? Thank you!, michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=41287#41287 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenGL vs Direct3D: A tale of missed opportunities, gross stupidity, willful blindness, and simple foolishness.
Chris, Great defense of OGL. Clearly there were a few OGL bigots in that forum that really spiced things up with some of their comments. The DirectX vs. OGL debate is more akin to a religious war than anything else. Long live OGL...and of course, OSG... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: Thursday, June 30, 2011 10:03 AM To: OpenSceneGraph Users Subject: [osg-users] OpenGL vs Direct3D: A tale of missed opportunities, gross stupidity, willful blindness, and simple foolishness. I threw in my two cents and pimped OSG in the Reddit comments. http://www.reddit.com/r/programming/comments/icfw3/opengl_vs_direct3d_a_ tale_of_missed_opportunities/ -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FAR_PLANE_CULLING
Just as a follow-up question on this topic, what settings are included in the DEFAULT_CULLING? Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Thursday, June 23, 2011 3:30 PM To: OpenSceneGraph Users Subject: Re: [osg-users] FAR_PLANE_CULLING On 6/23/2011 3:14 PM, Terry Welsh wrote: Haven't looked at this in a while, but I was just performance tuning an old app and got a significant boost by adding in CullSettings::FAR_PLANE_CULLING. Why isn't this included as part of DEFAULT_CULLING? I don't have any hard data, but I suspect the performance penalty for culling with the far plane when you shouldn't isn't near as bad as ignoring the far plane when you should use it. (I suspect NEAR_PLANE_CULLING is not as useful for most apps.) Hi Terry -- Do you have auto-compute near/far turned on? If so, there shouldn't be anything behind the far plane. In that case, it doesn't make sense for the CullVisitor to check every single Drawable's bounding box against a plane that it can't possibly be clipped by. For this reason, culling against the far plane is off by default. If you disable auto-compute near/far, and you expect part of your scene to be behind the far plane, then you should enable far plane culling. I'd expect to see a performance boost in such a case. Hope that helps, -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FAR_PLANE_CULLING
Thanks Tony...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tony Horrobin Sent: Friday, June 24, 2011 8:19 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] FAR_PLANE_CULLING Hi Shayne, The definition is in include/osg/CullSettings. Cheers, -Tony -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40863#40863 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] How to convert texture file to same coordinatesystem as height file
Try using the following on your texture file (intexturefile)... gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear intexturefile outtexturefile outtexturefile will then be used as input for osgdem. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of abhishek agarwal Sent: Thursday, June 09, 2011 9:55 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] How to convert texture file to same coordinatesystem as height file Hi, I have a .dem file which i'm using as height and .tif file as texture. Height file has latitude and longitude coordinate system but texture file do not. I want to create .osg file combining both using osgdem... -cs +proj=latlong +datum=WGS84 -o ... but its giving some error.. Should both files(height texture) contain same coordinate system(geogcs) for me to able to use osgdem, for i want to retrieve latitude and longitude data at each point of the terrain? I have given the output of gdalinfo of both files down. Can you help me with gdal(command) to convert texture file to same coordinate system as height file so that i can use them to create .osg file using osgdem and then extract latitudelongitude data for each poit on the terrain. height file:: Driver: USGSDEM/USGS Optional ASCII DEM (and CDED) Size is 1802, 1802 Coordinate System is: 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]] Origin = (75.7498616,34.7504166) Pixel Size = (0.0002778,-0.0002778) Metadata: AREA_OR_POINT=Point Corner Coordinates: Upper Left ( 75.7498611, 34.7504167) ( 75d44'59.50E, 34d45'1.50N) Lower Left ( 75.7498611, 34.2498611) ( 75d44'59.50E, 34d14'59.50N) Upper Right ( 76.2504167, 34.7504167) ( 76d15'1.50E, 34d45'1.50N) Lower Right ( 76.2504167, 34.2498611) ( 76d15'1.50E, 34d14'59.50N) Center ( 76.0001389, 34.5001389) ( 76d 0'0.50E, 34d30'0.50N) Band 1 Block=1802x1802 Type=Int16, ColorInterp=Undefined NoData Value=-32767 Unit Type: m texture file:: Driver: GTiff/GeoTIFF Size is 1802, 1802 Coordinate System is `' Metadata: TIFFTAG_SOFTWARE=IrfanView TIFFTAG_XRESOLUTION=762 TIFFTAG_YRESOLUTION=762 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Corner Coordinates: Upper Left (0.0,0.0) Lower Left (0.0, 1802.0) Upper Right ( 1802.0,0.0) Lower Right ( 1802.0, 1802.0) Center ( 901.0, 901.0) Band 1 Block=1802x1 Type=Byte, ColorInterp=Red Band 2 Block=1802x1 Type=Byte, ColorInterp=Green Band 3 Block=1802x1 Type=Byte, ColorInterp=Blue Thank you! Cheers, abhishek -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40322#40322 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting up a camera
Diana, First off, I don't see where you're setting the view matrix for the camera in your code below. You compute the transform, but you'll need to attach it to the camera. Since it looks like you're navigating on a sphere, I would try the following in your while loop below... osg::EllipsoidModel convert; osg::Matrixd position; osg::Matrixd t_matrix; convert.computeLocalToWorldTransformFromLatLongHeight(lat,lon,height,pos ition); t_matrix = position; t_matrix.invert(t_matrix); osg::Matrixd rotate2YUp; rotate2YUp.makeRotate(-M_PI_2, osg::Vec3f(1.0, 0.0, 0.0)); t_matrix *= rotate2YUp; viewer.getCamera()-setViewMatrix(t_matrix); viewer.frame(); Of course, I'm assuming that you have all the other camera state (i.e. projection matrix, viewport, etc.) set up correctly. The above doesn't include an orientation transform so you will need to add that. When you do, it will be concatenated with the position matrix. Make sure that lat, lon are in RADIANS when you call computeLocalToWorldTransformFromLatLongHeight. Height is usually in meters. One more thing...it would probably be best to move the code outside of the while loop and place it in an UpdateCallback... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Diana Kittelmann Sent: Wednesday, June 08, 2011 2:59 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Setting up a camera Yeah, I'm just seeing the blue background. And yaeh im struggeling with the math to set up my matrix. I set it up like this: while(!viewer.done()) { osg::EllipsoidModel convert; convert.convertLatLonHeightToXYZ(lat, lon, height, x, y, z); osg::Vec3 pos(x, y, z); osg::Matrixd matrix; matrix.setRotate(osg::Quat(osg::DegreesToRadians(0.0), osg::X_AXIS, osg::DegreesToRadians(0.0), osg::Y_AXIS, osg::DegreesToRadians(0.0), osg::Z_AXIS)); matrix.setTrans(pos); viewer.getCamera(); viewer.frame(); } But I'm not sure if this is right. Diana -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40200#40200 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] How to extract height data from .dem files usingVPB and OSG
If you used VPB to build an osgTerrain database, you can get what you want with the osgSim class. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of abhishek agarwal Sent: Thursday, June 02, 2011 11:27 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] How to extract height data from .dem files usingVPB and OSG Hi, I'm trying to build a terrain using .dem file for height. The file contains all information on lattitude , longitude and height But i don't know how to make use of them.. i don't know how to extract height in osg program... I need height data to clamp objects to the terrain. Can you help me? Waiting for reply. Thank you! Cheers, abhishek -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40043#40043 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Too long to generate the DEM with osgdem
Try using the --TERRAIN option in the osgdem command to see if that makes a difference in your build times... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ijustfu Sent: Friday, May 27, 2011 6:26 PM To: osg-users Subject: [osg-users] Too long to generate the DEM with osgdem Dear all, I am newer for using OSG. I compile gdal and VPB and rightly get all the files with VS2005. When I use osgdem to generate DEM, I find it generates .IVE and a folder of XXX-_root_L0_X0_Y0 . The problem is: It takes too long to generate the DEM. I check the time of file genration time and find the intervals between first several file is very short for level 0, level 1 and level 2. Coming to level 3 and after, the intervals are long, in my case 2 minutes or 3 minutes. So, after one and a half days, the DEM is only generated half. The input files are : Texture is: texture.tilf 70m 4019*4284 ; DEM is: height.tif 47m 4019*4284. The comand line to generate DEM is : osgdem -t texture.tif -d height.tif -l 8 -a mydem.osga Anybady can help me? Thanks a lot. 2011-05-28 ijustfu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersection testing in a separate thread
Craig, We've done something similar to what you want to do but in a separate process rather than a separate thread. We have done it in an asynchronous thread as well. The reason we chose to go with a process is that it allows us to run it on a remote machine away from the rendering process if need be. The process has a listening thread that receives two world positions (e.g. line of sight from ownship to target) over the network. Upon reception, it computes the intersection with a terrain database (i.e. node read into a scenegraph) and returns the closest intersection distance back over the network to the other process that made the request via a sending thread. Bottom line is that it can be done. It basically amounts to having asynchronous traversal of the same scenegraph, one for rendering traversal and the other for intersections. These traversals can either be done in different threads or different processes. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Craig S. Bosma Sent: Thursday, May 12, 2011 1:14 PM To: OpenSceneGraph Users Subject: [osg-users] Intersection testing in a separate thread Hi, I have an OSG-based simulation that I'm considering retrofitting to decouple the actual simulation rate from the render frame rate. It's not viewer-based. A simplified example would be and application that listens for a network message identifying two world positions, performs and intersection test, and returns a response, while rendering/updating the scene. Currently this happens serially, but I want to put the network listener and intersection testing on a separate thread. Obviously the shared data here is (a portion of) the scenegraph, which may be modified by the render/update thread. I want the network/query thread to be able to respond as quickly as possible, and not depend on how fast the scene can be drawn, as it is currently. Does anyone have any advice/experience/examples for how to best approach this kind problem? Is it even feasible? Thanks, Craig ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersection testing in a separate thread
J-S, Yes, a great point I failed to bring up about the mutex. Thanks for mentioning that. We did have to do that to protect the shared resource when we used threading. For our stuff, one process (out-the-window) does the usual traversal (via viewer.frame) while the other sits idle until a request comes in for either HAT/HOT or LOS. Once a request comes in, it just computes the intersection with the terrain via the osgSim class and sends the scalar result back. Both processes load the same PagedLOD terrain node but they're using completely different graphs. We only check for intersection with terrain and nothing else... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Thursday, May 12, 2011 2:37 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Intersection testing in a separate thread Hi Shayne, Craig, Bottom line is that it can be done. It basically amounts to having asynchronous traversal of the same scenegraph, one for rendering traversal and the other for intersections. These traversals can either be done in different threads or different processes. But the case of a different thread vs a different process is not the same. In his case, there will be (optimally) one copy of the scene graph, and both the rendering and the intersection thread will access it. He will need a mutex which would be held by the rendering thread while it's in the update phase, and by the intersection thread while it does an intersection. In your case, you have two copies of the scene graph, so there are no threading issues. (how did you update the scene graph between processes?) But that doesn't mean it can't be done, just that it's not quite as simple as that. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ 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] Manual perspective distortion?
Alexander, By moving the corners of the frustum, are you wanting to tweak the frustum corners so that they have different depths (i.e. tilt the near plane so that it is no longer orthogonal to the eye)? I don't think OGL (and hence OSG) will allow you to do this directly. There is a munge that may allow you to effectively specify an oblique near clipping plane to give you the effect you're looking for. Check out the link http://www.terathon.com/gdc07_lengyel.pdf. Pay particular attention to the last part of the presentation. If you want to do distortion correction, you can resort to another technique other than just using the projection matrix. One way to do this is to use a two-pass solution whereby you render to texture and then distort the texture coordinates at small increments before rendering to an on-screen buffer. I think the first link I sent you last week talks about this. There are other ways to do the distortion correction as well such as shaders, etc. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexander Dieterle Sent: Monday, May 09, 2011 3:18 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Manual perspective distortion? Good morning everyone, I hope everyone of you had a nice and enjoyable weekend? Here in Germany it was brilliant weather, in addition, yesterday was mother's day so we had a very enjoyable time with the family - hope the same for you! :) Anyways - first off, thank you all very much for your answers. Torben, I did read into your code on Friday and, from a first glance at it, it seems like a possible solution for the problem. I think the perfect way to create that matrix would be by using a camera and creating the distortion pixel map by analysing the offset dynamically via the camera image. It's a quite complex way to do it, but the result should be quite good - however, if I can't find a student to write his bachelor thesis on that, I fear there won't be resources available to do it ;) Shayne, thank you very much - the links you offered perfectly describe the issues I'm dealing with. If I understand you right, I am already tweaking the frustum to calibrate the viewing area by using setProjectionMatrixAsFrustum(left, right, bottom, top, near, far); . The problem with this method is that by using each of those parameters I can only move an entire border of the projection area - so the entire left, right, bottom or top border of the frustum. This allows me to adjust the frustum such that it does fit into the projection screen; however, it does not help at all against the distortion in the image. To do so, I had to be able to move the corners of the frustum individually, and that's something I don't quite know how to do it. I'll read into the paper more deeply and will let you know if it could help me any further. Have a great start in the new week! -Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39189#39189 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Try omitting the s_srs portion of the gdalwarp command to see if that makes any difference. I believe dted files will need to be reprojected as well since VPB builds the database using the source data coordinate system. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Atilla Selem Sent: Friday, May 06, 2011 12:39 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!! Hi Shayne, Hi Glenn, Thanks for ur kind replies.. Shayne, As you know MyTerrain.tif file projection info was; Geographic ( Latitude / Longitude ) [N:36, E128] [N:38, E130] is in Utm Zone 52 Datum : WGS84 Unit : Arc degrees. i tried to reproject MyTerrain.tif file using ur gdalwarp command like this.. gdalwarp -s_srs proj=latlong +datum=WGS84 -t_srs proj=utm +zone=52 +datum=WGS84 MyTerrain.tif MyTerrainUtm.tif command prompt displayed such an error; ERROR 1 : Translating source or target SRS failed: proj=latlong +datum=WGS84 Is gdalwarp command true in terms of parameters? And one more question.. Should i run gdalwarp command for each of my dted-2 files which have Geographic projection before using osgdem? Thanks a lot, Atilla. S2LR wrote: Try using the following to reproject your data... gdalwarp -s_srs proj=latlong +datum=WGS84 -t_srs proj=utm +zone=11 +datum=WGS84 infile outfile Do this before using osgdem on your data files. UTM zone selection will be dependent upon where your lat/lon is... -Shayne -Original Message- From: [mailto:] On Behalf Of Atilla Selem Sent: Thursday, May 05, 2011 11:09 AM To: Subject: Re: [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!! Hi Glenn, Thanks for the tip.. but i really need to know, Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file (since their projections are both Geographic - Lat/Lon) before executing osgdem? Or should i do re-scaling or whatever after i load terrain in osg application? And What tool or command option should i use to reproject to UTM? thanks in advance.. Atilla. Glenn Waldron wrote: Atilla,osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem (http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem () wrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you!
Re: [osg-users] Manual perspective distortion?
If I understand you correctly, you want to tweak the viewing frustum? You should be able to rotate and scale (move in and out) the clipping planes of an asymmetric viewing frustum (projection matrix) so that the four sides of intersection with the near clipping plane form a general quadrilateral. This should allow you to tune to the area of projection that you're interested in. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexander Dieterle Sent: Friday, May 06, 2011 3:59 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Manual perspective distortion? Dear OSG Forum readers, as we recently installed a multi-projector-based viewing screen I am currently working on its calibration. I managed to fix most of the displaying issues so far; however, one issue remains that I am quite unsure of how to approach it. Due to the mounting of the projectors in relation to the viewing screen, the projected image is distorted in a way that the projected image no longer resembles a rectangele but a trapezium. To give you a better understanding of the situation, I made a small sketch to visualise the problem (compare attachment). The grey area is the projection area, while the blue frame resembles the area displayed by the projector. As can be seen in the image, whilst the left and bottom corners are quite well aligned, the upper right corner flees the projection area. Since the mounting of the projectors cannot be changed or adjusted further, I have to solve the problem on software side. I was thinking of somehow manually creating a perspective distortion matrix, such that I can move that corner so it fits in the projection area. However, I am a bit lost how to do that. Is there anyone who could point me into the direction of how such a matrix could be created and what matrix to use at all? Intuitively, I've searched a bit in the direction of a projetion matrix, but couldn't quite find the right way to do it yet! Anyways, thank you very much in advance for reading :) Best regards, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39083#39083 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Manual perspective distortion?
Just as a follow up, these links may also help you solve your problem. The last one may be of particular interest to your application... http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node 33.html http://catarina.udlap.mx/u_dl_a/tales/documentos/dsc/mora_l_ma/capitulo3 .pdf -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: Friday, May 06, 2011 1:54 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Manual perspective distortion? If I understand you correctly, you want to tweak the viewing frustum? You should be able to rotate and scale (move in and out) the clipping planes of an asymmetric viewing frustum (projection matrix) so that the four sides of intersection with the near clipping plane form a general quadrilateral. This should allow you to tune to the area of projection that you're interested in. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alexander Dieterle Sent: Friday, May 06, 2011 3:59 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Manual perspective distortion? Dear OSG Forum readers, as we recently installed a multi-projector-based viewing screen I am currently working on its calibration. I managed to fix most of the displaying issues so far; however, one issue remains that I am quite unsure of how to approach it. Due to the mounting of the projectors in relation to the viewing screen, the projected image is distorted in a way that the projected image no longer resembles a rectangele but a trapezium. To give you a better understanding of the situation, I made a small sketch to visualise the problem (compare attachment). The grey area is the projection area, while the blue frame resembles the area displayed by the projector. As can be seen in the image, whilst the left and bottom corners are quite well aligned, the upper right corner flees the projection area. Since the mounting of the projectors cannot be changed or adjusted further, I have to solve the problem on software side. I was thinking of somehow manually creating a perspective distortion matrix, such that I can move that corner so it fits in the projection area. However, I am a bit lost how to do that. Is there anyone who could point me into the direction of how such a matrix could be created and what matrix to use at all? Intuitively, I've searched a bit in the direction of a projetion matrix, but couldn't quite find the right way to do it yet! Anyways, thank you very much in advance for reading :) Best regards, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39083#39083 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!!
Try using the following to reproject your data... gdalwarp -s_srs proj=latlong +datum=WGS84 -t_srs proj=utm +zone=11 +datum=WGS84 infile outfile Do this before using osgdem on your data files. UTM zone selection will be dependent upon where your lat/lon is... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Atilla Selem Sent: Thursday, May 05, 2011 11:09 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] Flat Database Generation in Meters reallyshocked me when i load it to my osg application..!!! Hi Glenn, Thanks for the tip.. but i really need to know, Where should i do reprojection? In my dted-2 files and/or in my GeoTiff.file (since their projections are both Geographic - Lat/Lon) before executing osgdem? Or should i do re-scaling or whatever after i load terrain in osg application? And What tool or command option should i use to reproject to UTM? thanks in advance.. Atilla. Glenn Waldron wrote: Atilla,osgdem is creating your model in what's called a plate carre projection -- in which degrees are simply reinterpreted as meters. That is why your 2x2 degree cell is appearing as 2x2 meters. You need to reproject into a proper projected spatial reference system (like UTM) to get the correct extents. Check the bottom of this page for tips: http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem (http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem) Glenn Waldron / Pelican Mapping / @glennwaldron On Thu, May 5, 2011 at 12:25 PM, Atilla Selem () wrote: Hi, i have tried to generate a terrain (.ive) database using osgdem commandline options in order to buid a flat database where coordinates are in meters. After successfull generation i put that terrain in my osg application and really shocked! Before telling you what i saw as the output let me tell you my inputs. - i have four Dted-2 elevation file, - i have one GeoTiff image which is successfully mapped on dted files. - Dteds are starting (from 36N, 128E to 38N, 130E). So there are 4 1x1 degree cells [ Total size is 2x2]. - GeoTiff image also extends from 36N, 128E to 38N, 130E. So it covers [2x2] elevation file without no problem. Dted and Image Coordinate Systems are: Geographic ( Latitude / Longitude ) Datum : WGS84 Unit : Arc degrees. after putting dteds and image in seperate folders ( MyDted, MyImage ) i executed the following vpb command to generate my flat database. - osgdem -t MyDted -d MyImage -l 8 -v 0.1 -o MyTerrain_Flat.ive after executig above line and loading Terrain_Flat.ive on my osg application it was really difficult to find where is MyTerrain_Flat.ive on my view. When i zoom in What i saw was a 2x2 meter flat database in osg size. !!!It was located on x = 128 , y = 36 on my view according to ( 0,0,0) of my scene!!! Real size of Dteds of Image was 178 km in Easting and 221 km in Northing.. i have checked size and everythings was ok with Dted and Image. Now the question is 1 - Is there a problem with vpb when creating flat database in meters? 2- Have i missed a command line option? 3- Why is the generated terrain covers 2x2 meters although it is 178 x 221 km in real size? 4- Why it is located in x = 128 , y = 36 ? Those were Lower Left Lat/Lon coordinates of dteds and image file? 4- Isn't it possible to generate real size flat terrains in meters in x,y,z using vpb? Any help is really appreciated... ... Thank you! Cheers, Atilla -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39045#39045 (http://forum.openscenegraph.org/viewtopic.php?p=39045#39045) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39053#39053 ___ 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] Unable to place model on vpb terrain. How To ?
Sanat, The code I gave you assumes that your VPB terrain was built using the --geocentric flag (e.g. round earth). If not, then you must resort to what Glenn recommended in his email and handle the coordinate conversions correctly from a flat UTM (or whatever) to a round earth. If you do decide to build your VPB terrain using --geocentric, the X,Y,Z coordinates have their origin at (0,0,0) (i.e. the center of the earth) so your Z coordinate in convertXYZToLatLongHeight(276119.7034106, 4685765.312, 0.0,...) should never be zero unless you're exactly at the equator (yielding a latitude of zero). In your call convertLatLongHeightToXYZ(osg::DegreesToRadians(42.291966f), osg::DegreesToRadians(-83.715645f), 0.0f,...) an altitude of zero will only give you an X,Y,Z point on the ellipsoid. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sanat Talmaki Sent: Friday, April 08, 2011 11:07 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Unable to place model on vpb terrain. How To ? Hi Shayne, Thanks for your reply. I have tried a few different things and have a few questions from that: First of, when I try something like this: Code: osg::ref_ptrosg::EllipsoidModel em = csnVisitor.coordinateSystemNode-getEllipsoidModel(); if(!em) { std::cout ellipsoid model is null\n; } //where csnVisitor has a data member storing coordsystemnode To get over this, I need to set the ellipsoid model first and then try the above. This seemed strange but since the ctor is overloaded, I didn't think much of it. But now that the convertXYZToLatLong and vice versa are giving me incorrect results, I am wondering if this maybe a cause?? Second, when I tried using a set of coords for which I had precomputed the geocentric (XYZ) coords from lat-long using osgEarth, I got incorrect numbers. Code: csnVisitor.coordinateSystemNode-getEllipsoidModel()- convertLatLongHeightToXYZ(osg::DegreesToRadians(42.291966f), osg::DegreesToRadians(-83.715645f), 0.0f, terrainPosition.x(), terrainPosition.y(), terrainPosition.z()); double latitude, longitude, height; csnVisitor.coordinateSystemNode-getEllipsoidModel()-convertXYZToLatLon gHeight(276119.7034106, 4685765.312, 0.0, latitude, longitude, height); I think I have these functions right. But cannot figure out what maybe causing this error. Third, when I try to get the height above terrain like: Code: osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain, terrainPosition) //where terrain position is from the convert to XYZ function This gives me a wrong height value. I wanted to know what it is that I can check or that I maybe doing wrong. I have attached the terrain file (osg) that I am using in case that helps. Thank you Sincerely, Sanat. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38350#38350 Attachments: http://forum.openscenegraph.org//files/northcampus6levels_134.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building an Altimeter
Rusty, If your altimeter renders correctly and gives you correct results, then I'd say your implementation is probably fine. There are plenty of OSG examples and tutorials that you can compare with to see if you're on the right track. On understanding how normals are used, I would suggest that you learn about how OpenGL renders objects in a scene since OSG uses OGL for its rendering. The normals in a primitive are only used when lighting is enabled. There are normals that are used for culling but that's another discussion. If you want your lines to always appear bright red, don't use normals, turn off lighting, and specify the color red before drawing the line. Color can be specified per primitive or per vertex depending on what you want to do. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Rusty Shackleford Sent: Saturday, April 09, 2011 2:45 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Building an Altimeter Hi, I'm working on a tool that visualizes a spacecraft in orbit around a planetary body. As it is set up now, the position of that spacecraft is given relative to the center of the body as an x,y,z coordinate. What I'm trying to do right now is set up a simple altimeter that looks essentially like a ruler reaching from the planetary surface up to a little past the spacecraft. That is, a straight line with perpendicular lines crossing it at regular intervals. The black circle is the spacecraft, the black blob at the bottom is the planetary surface, and I'm trying to draw that ladder with regular demarkations. I'm VERY new at OSG (two weeks in) so I could be going about this completely wrong, please let me know if so. What needs to happen is for the altimeter to follow the spacecraft (position given by end in the code) such that the central line always intersects it and the origin stays at the center of the planet (given by start). I've included the code here for building the altimeter. It outputs a group that is attached to the root node to which the planet is also attached. Code: osg::Group* Visualizer::getAltimeter(osg::Vec3 start, osg::Vec3 end, int interval) { int distance = sqrt(pow(end[0]-start[0],2) + pow(end[1]-start[1],2) + pow(end[2]-start[2],2)); osg::Group* g = new osg::Group(); osg::Geode* geode = new osg::Geode(); //Line running up the middle osg::Geometry* line_x_red = new osg::Geometry(); osg::Vec3Array* verticesx = new osg::Vec3Array(2); (*verticesx)[0]=start; (*verticesx)[1]=end; line_x_red-setVertexArray(verticesx); // set the color osg::Vec4Array* red = new osg::Vec4Array; red-push_back(osg::Vec4(1.0f,0.0f,0.0f,1.0f)); line_x_red-setColorArray(red); line_x_red-setColorBinding(osg::Geometry::BIND_OVERALL); // set the normal in the same way color. osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,0.0f,-1.0f)); line_x_red-setNormalArray(normals); line_x_red-setNormalBinding(osg::Geometry::BIND_OVERALL); line_x_red-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,2)); //Surface of planet, no need to mark below this int surfaceE = 10; int numMarkers = (distance-surfaceE)/interval; osg::Geometry* marker[numMarkers]; //Construct elevation marks for(int i = 0; inumMarkers;i++) { marker[i] = new osg::Geometry(); osg::Vec3Array* vertices = new osg::Vec3Array(2); (*vertices)[0]=osg::Vec3(-50,i*interval + surfaceE,0); (*vertices)[1]=osg::Vec3(50,i*interval + surfaceE,0); marker[i]-setVertexArray(vertices); marker[i]-setColorArray(red); marker[i]-setColorBinding(osg::Geometry::BIND_OVERALL); marker[i]-setNormalArray(normals); marker[i]-setNormalBinding(osg::Geometry::BIND_OVERALL); marker[i]-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,2)); geode-addDrawable(marker[i]); } geode-addDrawable(line_x_red); altimeterFrame = new osg::PositionAttitudeTransform(); altimeterFrame-addChild(geode); g-addChild(altimeterFrame); return g; } If this is a good way to go about it, my next question is about normals, which I don't fully understand. I'd like the lines to appear bright red, regardless of which angle they're viewed from. An added bonus would be for the markers to rotate around the central line to always face the camera. I imagine this could be done with Billboards, but some initial experimentation showed I have a lot to learn regarding them. This is my first post on this board, so excuse me if I've missed a point of etiquette, I'd be glad to elaborate on anything if need be. All advice is greatly appreciated. Thank you! Cheers, Rusty -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38368#38368 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing
Re: [osg-users] Unable to place model on vpb terrain. How To ?
Sanat, You have to use the osgSim class to achieve your objective. In particular, use the method osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain_node, osg::Vec3d(X,Y,Z)) where X,Y,Z is the geocentric coordinates (earth centered) calculated from a given lat,lon,alt. The method to calculate X,Y,Z from a given lat,lon,alt is in the EllipsoidModel class. You can extract the height on terrain from the above HAT calculation to place your models on the terrain surface. The reason why you want to use the osgSim class is that it accounts for VPB pagedLOD databases when determining HAT/HOT and LOS calculations. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sanat Talmaki Sent: Friday, April 08, 2011 12:10 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Unable to place model on vpb terrain. How To ? Hi, I am trying to place a model on a vpb terrain by supplying the lat-long coordinates. I followed a couple of threads in the forum that suggested to use the CoordinateSystemNode and ellipsoid model. But that didn't work for me (or maybe I am not following it right). I have attached the terrain along with my post. So far this is what I am doing: Code: osg::ref_ptrosg::Group root = new osg::Group(); osg::ref_ptrosg::CoordinateSystemNode csn = new osg::CoordinateSystemNode(); csn-setEllipsoidModel(new osg::EllipsoidModel()); osg::ref_ptrosg::Group terrainGroup = new osg::Group(); //osg::ref_ptrosg::Node terrain = osgDB::readNodeFile(NorthCampus6Levels.osg); osg::ref_ptrosg::Node terrain = osgDB::readNodeFile(NorthCampus6LevelsNoCS.osg); terrainGroup-addChild(terrain); osg::Vec3d m_surface; csn-getEllipsoidModel()-convertLatLongHeightToXYZ(osg::DegreesToRadian s(42.291966f), osg::DegreesToRadians(-83.715645f), 0.0f, double(m_surface.x()),double(m_surface.y()),double(m_surface.z()) ); I tried using a visitor to find the CoordSystNode in my scenegraph but when I checked getEllipsoidModel I got a null. I have used osgEarth in the past and was able to place a model on that. But I presently need to use vpb. If anyone can point me in the right direction, it would be great. Thank You. Sincerely, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38336#38336 Attachments: http://forum.openscenegraph.org//files/northcampus6levels_171.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
Most of the IG industry uses CIGI to pass data from the host to the IG (and back for end of frame and mission functions stuff). I'm sure the architecture is well defined on this. For starters, you can take a look at Boeing's Multi Purpose Viewer software which is an IG test bed for the CIGI protocol. They interface it to a generic host. The Multi Purpose Viewer uses OSG on the backend for rendering. This might give you some ideas on what you can do to add CIGI into your IG stuff... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Tuesday, March 29, 2011 6:45 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual Hi Vijeesh, here is some explanation how the SLOT mechanism works currently: it is a list of SLOT classes. A slot class contains the following members: * string name * double value * string sValue (string value) * enum direction: TO_OBJ | FROM_OBJ * enum type: STRING | DOUBLE If a software module wants to store some values which are directed TO the visual Objects ( e.g. object3_LAT), it searches in this list for the slot with the corresponding name, type and direction and stores the value in it. The object updater for example reads on every update in this slot list for a slot with the appropriate name and read the value to apply it to its own object. This has the the following implications: * Supposed to be very slow if lot's of variables are used: if someone searches in the list, he has to perform many string comparisons. * Only strings and doubles can be stored but no complex data structures ( e.g. cigi containers) My approach with the slots was only a first shot. I would be very glad if we could discuss this, maybe also with other users in the forum. It would be great to construct a more sophisticated and usefull architecture to manage the data of the IG. After that I would implement this solution asap, but currently I have no idea in which direction we should proceed. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38007#38007 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] short video flying with wiimote
Very cool...:) -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Massimo Tarantini Sent: Friday, March 25, 2011 4:57 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] short video flying with wiimote Hi all, this is a short demo of my terrain integrated with a wiimote : www.youtube.com/watch?v=cGbD5bpu2uY -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37901#37901 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] coordinate system in terrain
You can take a look at the .ive file. Even though most of it is unreadable, you can look for the ellipsoid axis and flattening values. Both of those will determine if it's round earth. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vijeesh Theningaledathil Sent: Thursday, February 24, 2011 11:56 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] coordinate system in terrain Hi Shayne Thanks. But still I cannot make out how to differentiate between flat earth and ECEF. Is there anything we can check to identify? Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37117#37117 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] coordinate system in terrain
If you want to use delta3D or subrscene to render the terrain, don't use the --geocentric option in osgdem. Neither one of those applications support VPB round earth databases... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vijeesh Theningaledathil Sent: Friday, February 25, 2011 12:49 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] coordinate system in terrain Hi, Thanks Mr. Ralf. But from the output of gdalinfo, how can i say that it is flat earth or round earth. In my first post i had pasted the output of gdalinfo for the source files. My problem is I'm not able to render the terrain generated from the above source files using any of the IG(subrscene, delta3d). Can you tell me which IG is best suitable to render the terrain. And I need to know the origin lat lon if its a flat earth. I used osgdem to generate my terrain with --geocentric option. Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37119#37119 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to compute the coordinates of specific point ?
Perhaps you can be a bit more specific on your problem mathematically. Your original post was somewhat vague on what you're trying to accomplish... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mr Alji Sent: Thursday, February 24, 2011 2:48 AM To: OpenSceneGraph Users Subject: Re: [osg-users] How to compute the coordinates of specific point ? Thank you for answering, not really what I am looking for but it already helped ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ANN: osgEarth 2.0 released
Impressive... Thank you. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, February 24, 2011 10:02 AM To: OpenSceneGraph Users Subject: [osg-users] ANN: osgEarth 2.0 released osgEarth 2.0 is here! Many thanks to everyone in the community who has supported the project and helped us to make it a success. osgEarth is an on-demand terrain rendering toolkit for OSG. It's goals are to * render terrain on the fly with little or no preprocessing * support imagery, DEMs, and vectors from web mapping services as well as local data sources * make it as easy as possible to get a global terrain model up and running Some highlights of Version 2.0: * Shader composition framework - integrate your own shader code with osgEarth's terrain shaders with no copy-n-paste * Overlay decorator - new flexible mechanism for draping geometry on the terrain * GPU compositing - render imagery using texture arrays, multitexturing, or multipass * SkyNode - sun, stars, and atmospheric lighting And now some links: * Release notes: http://www.osgearth.org/wiki/ReleaseNotes20 * osgEarth wiki: http://osgearth.org * GitHub repository: https://github.com/gwaldron/osgearth * Support forum: http://forum.osgearth.org * Press release: http://pelicanmapping.com/?p=136 Enjoy! Glenn Waldron : Pelican Mapping : twitter.com/glennwaldron ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org