Re: [osg-users] [vpb] coordinate system in terrain
If the source data is using UTM coordinates already, you can just do osgdem --TERRAIN --PagedLOD -t texturedir -d elevdir -l 10 -o utmdatabase.ive If the source data is not using UTM, you can use gdal to reproject the data by gdalwarp -t_srs proj=utm +zone=11 +datum=WGS84 infile outfile If gdalwarp complains, try the command gdalwarp -s_srs proj=latlong +datum=WGS84 -t_srs proj=utm +zone=11 +datum=WGS84 infile outfile In either case, outfile is the new source data you'll feed into the osgdem command above. I picked zone 11 as an example for UTM. You'll need to choose your own zone for your purposes. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vijeesh Theningaledathil Sent: Wednesday, February 23, 2011 8:35 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] coordinate system in terrain Hi, How can I generate terrain in UTM coordinate using osgdm? Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37026#37026 ___ 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] RTT and MatrixManipulator
Martin, How do you have your composite viewer set up? Is it multiple views in a window or a single view per window? If you're using multiple views/viewports embedded in a single window, the viewport (x,y) are relative to the window. If your views are set up in separate windows (i.e. a view viewport per window) then the viewport (x,y) are (0,0). From what you described, I would guess it's the latter. Each view/camera should have a viewport defined otherwise things won't draw (they're clipped out). -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Großer Sent: Tuesday, February 15, 2011 7:29 AM To: OpenSceneGraph Users Subject: Re: [osg-users] RTT and MatrixManipulator I think it works now! My problem was in the following line: rtt_cam-setViewport(_x,_y,_width,_height); _x and _y musst be zero in all views. I guess it makes sense, but I am not sure. However, I wrote rtt_cam-setViewport(0,0,_width,_height); and it works fine! Cheers Martin Original-Nachricht Datum: Tue, 15 Feb 2011 14:40:18 +0100 Von: Martin Großer grosser.mar...@gmx.de An: OpenSceneGraph Users osg-users@lists.openscenegraph.org Betreff: Re: [osg-users] RTT and MatrixManipulator Ok it works for one view in my composite viewer. The problem was my texture. It didn't have the right size. However, I have 4 views and the render to texture only works for the first view. I get the following message: RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd9 Is render to texture per view of a composite viewer possible? There are any experience about this? Cheers Martin Original-Nachricht Datum: Tue, 15 Feb 2011 12:50:34 +0100 Von: Martin Großer grosser.mar...@gmx.de An: osg-users@lists.openscenegraph.org Betreff: [osg-users] RTT and MatrixManipulator Hello, I want to render my scene in a texture and after this I want to use that texture on a Plane in the front of a ortho camera. My question is how can I use the matrix manipulator on the rtt camera? Here my idea to do this, but it doesn't work. It is only a short form of the code to show my scene graph structure. // Plane plane-getOrCreateStateSet()-setTextureAttributeAndModes(0,texture,ON | OVERRIDE); // RTT Camera rtt_cam-setRenderTargetImplementation( FRAME_BUFFER_OBJECT ); rtt_cam-attach(COLOR_BUFFER, texture, 0, 0); // Ortho Camera ortho_cam-addChild(plane); ortho_camsetReferenceFrame(::osg::Transform::ABSOLUTE_RF); ortho_cam-setProjectionMatrixAsOrtho2D(0.0,1.0,0.0,1.0); ortho_cam-setViewMatrix(::osg::Matrix::identity()); ortho_cam-setRenderOrder(::osg::Camera::POST_RENDER); // Root Node root-addChild(scene); root-addChild(ortho_cam); // View view-setCamera(rtt_cam); view-setSceneData(root); view-setCameraManipulator(trackball); Any ideas? Thanks and best regards Martin -- Schon gehört? GMX hat einen genialen Phishing-Filter in die Toolbar eingebaut! http://www.gmx.net/de/go/toolbar ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de/go/dsl ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit gratis Handy-Flat! http://portal.gmx.net/de/go/dsl ___ 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] osgProducer/Viewer
Shyuan, What version of OSG are you using? I believe osgProducer/Viewer has been replaced by osgViewer/Viewer... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tze Shyuan Sent: Tuesday, February 15, 2011 7:51 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] osgProducer/Viewer Hi, I am trying out the tutorial on StateSets from this websites however, i am having this problem: fatal error C1083: Cannot open include file: 'osgProducer/Viewer': No such file or directory how can i solve this problem? Thank you! Cheers, shyuan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36688#36688 ___ 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] Marching Cube Exampleï¼
There is an example of the usage of the marching cubes algorithm in the Nvidia GPU computing SDK (OpenCL Marching Cubes Isosurfaces)... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David Guthrie Sent: Tuesday, February 15, 2011 10:06 AM To: osg-users@lists.openscenegraph.org Subject: Re: Marching Cube Exampleï¼ Hi, Isn't marching cubes patented? Thank you! Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36699#36699 ___ 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] Marching Cube Example?
This is a true statement for the parametric surface stuff. In a previous life when I worked on OpenGL drivers, evaluators were always implemented in the slow path... -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: Tuesday, February 15, 2011 12:23 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Marching Cube Example? Hi David, Well, I think the question was is there any examples of OSG doing that kind of stuff and I don't recall anything! In fact I've seen one exaple that even segest the usage of nerbs and only a token segestion of using shaders in OSG! :x Somthing they need to work on, or so I think! NURBS are not that useful in real-time 3D for now, graphics cards concentrate on polygon rendering and OSG focuses this as well. OpenGL (actually GLU) has some evaluators that allow specifying curves and surfaces which it will internally tessellate into polygons, but I think this is not that efficient. If you want such functionality, I think osgModeling (an external library built on top of OSG) provides it. As for shaders, I think you haven't looked that hard, there are many examples in the OSG sources and the examples of using shaders in OSG. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
CIGI is an industry standard for controlling most aspects of an Image Generator. This includes ownship and entity behaviors along with a lot of other stuff. Most commercial IG vendors support CIGI. You can learn more about the ICD by reading here... http://cigi.sourceforge.net/ -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ted morris Sent: Saturday, February 12, 2011 9:05 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Camera control in osgvisual this indeed has caught my eye as well. But I am not familiar with the CIGI standard. Would this include the ability to manage object motions and behaviors across the cluster? (e.g., not only camera positioning). thnx, t On Fri, Feb 4, 2011 at 11:40 AM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Torben, Thanks for the information. I ask this because I'm currently working on doing a CIGI tie-in to an OSG-based IG backend I've been developing. I'm not a proponent for reinventing the wheel so to speak so I'm always on the lookout for other options in this regard. osgVisual would be something I would seriously consider using if it supported CIGI. Unfortunately our hosts talk CIGI so we need this support. By way of interest, I have found another OSG-based IG solution called SubrScene that does talk CIGI but it appears to be using a pretty old version of OSG. I'm not sure it's OpenSource so updating it to the current OSG might not be an option. SubrScene is included with the distribution of OpenEaagles which is OpenSource. I will still play with osgVisual to see what it has to offer...:) Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Friday, February 04, 2011 12:06 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual Hi S2LR, Yes, there were plans to create a CIGI implementation of extLink. Unfortunately for more than one year the project is not funded so all developments are competetive to my job. Therefore I can't spend as many hours as I would like to and CIGI support ist not on top of my todo stack.. But I would like to support any development in the direction of CIGI! It would be an improvement because currently only my proprietary extLink implementation is available. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36357#36357 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
CIGI uses UDP so updating osgVisual to use CIGI shouldn't be an issue in terms of performance. Effectively you'd be replacing one UDP implementation with another that uses an industry wide standard for the packet description...a big plus IMO. Like I stated earlier, CIGI is used by most commercial IG vendors so performance is more than adequate. The main advantage of CIGI is that it provides a common interface for a simulation host so that you can run the same host on different IGs on the back end. We just swapped out an old IG for a newer one with minimal changes to our host software. If osgVisual supported CIGI, I can guarantee that you would open it up to a much wider audience of users...at least in the simulation industry for sure. Having an OpenSource solution here would be a benefit. Right now, the software that currently ties CIGI to OSG for multi-channel IG purposes is proprietary in nature. VT-MAK is one such company that comes to mind... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Sunday, February 13, 2011 4:48 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual Hi Tedzini, I'm not very familiar with CIGI, but it seem to be a communication library for communication with the sim-host. I'm quite sure you can use CIGI not only for managing the camera but also for managing objects you want to display. Currently osgVisuals cluster module is used to transport objects or camera modifications from the master to all slaves, but maybe that UDP implementation could be replaced by CIGI - it mainly depends on the performance. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36587#36587 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
Boeing's multipurpose viewer (MPV) was designed to simply be a test harness for the CIGI protocol. It's a far cry from it being used as a general purpose IG. I've downloaded MPV from the CIGI site and played with it. It does use old OSG stuff (osgProducer). I had to modify it to use the newer osgViewer stuff. It also does not support osgTerrain type or round earth geocentric databases last time I checked. Lastly, the largest deficit IMO, is that it doesn't support multi-channel rendering with OSG...a big drawback. It does support multi-window rendering on one machine but not true multi-channel (i.e. a channel per box). In short, it would require a great deal of modification and development to bring it up to a point that it could be used as a commercial IG. One might get closer to the goal by making osgVisual talk CIGI... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Philip Taylor Sent: Sunday, February 13, 2011 6:49 PM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] Camera control in osgvisual Last time I downloaded the CIGI source code it came with an OSG application MPV aka Multi-Purpose Viewer http://cigi.sourceforge.net/ Looking at the WIKI page at the above site, it states that it requires OSG 2.4 but will work with 2.6 - that makes it quite an old implementation but MPV is only supposed to be an example, with limited functionality. It would be real cool to have an updated version ... PhilT From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ted morris Sent: 13 February 2011 20:14 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual yes... I'll have to have a closer look at this when I have some time. Thanks for spending to the to develop an interface for this functionality; I think it will be very useful. -t On Sun, Feb 13, 2011 at 5:48 AM, Torben Dannhauer tor...@dannhauer.info wrote: Hi Tedzini, I'm not very familiar with CIGI, but it seem to be a communication library for communication with the sim-host. I'm quite sure you can use CIGI not only for managing the camera but also for managing objects you want to display. Currently osgVisuals cluster module is used to transport objects or camera modifications from the master to all slaves, but maybe that UDP implementation could be replaced by CIGI - it mainly depends on the performance. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36587#36587 ___ 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] libvpb.so.10: cannot open shared object file
The PATH env variable should really only contain the paths to shared objects and executables (i.e. /usr/local/bin). LD_LIBRARY_PATH should be set to /usr/local/lib instead... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of jamil farooq Sent: Monday, February 07, 2011 1:44 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] libvpb.so.10: cannot open shared object file Hi, thanx i have included the /usr/local/lib/ in PATH env variable and its working now:) Thank you! Cheers, jamil -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36408#36408 ___ 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] VPB vs osgEarth...
I suppose if you're unable to build from source, this would be a viable option. However, I would rather download the source and build OSG and VPB myself if I have the means and tools to do so. Building both from source is trivial and there are ample instructions for accomplishing the task.. Just my .02... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Neil Neilson Sent: Friday, February 04, 2011 8:15 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] VPB vs osgEarth... Hi Robert robertosfield wrote: As for obtaining osgdem.exe for money, not sure who's selling it, ... http://www.alphapixel.com/osg/ Click here to buy a VPB download subscription through 2Checkout.com. Thanks Neil -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36372#36372 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
Torben, Thanks for the information. I ask this because I'm currently working on doing a CIGI tie-in to an OSG-based IG backend I've been developing. I'm not a proponent for reinventing the wheel so to speak so I'm always on the lookout for other options in this regard. osgVisual would be something I would seriously consider using if it supported CIGI. Unfortunately our hosts talk CIGI so we need this support. By way of interest, I have found another OSG-based IG solution called SubrScene that does talk CIGI but it appears to be using a pretty old version of OSG. I'm not sure it's OpenSource so updating it to the current OSG might not be an option. SubrScene is included with the distribution of OpenEaagles which is OpenSource. I will still play with osgVisual to see what it has to offer...:) Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Friday, February 04, 2011 12:06 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual Hi S2LR, Yes, there were plans to create a CIGI implementation of extLink. Unfortunately for more than one year the project is not funded so all developments are competetive to my job. Therefore I can't spend as many hours as I would like to and CIGI support ist not on top of my todo stack.. But I would like to support any development in the direction of CIGI! It would be an improvement because currently only my proprietary extLink implementation is available. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36357#36357 ___ 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] Website unreachable
Can't get there from Utah either...for both links... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: Friday, February 04, 2011 11:54 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Website unreachable http://www.openscenegraph.org/projects/osg Unreachable from Colorado right now, though http://www.openscenegraph.org/ responds. -- 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.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera control in osgvisual
This is an interesting thread of discussion. In terms of communicating with a simulation host, are there any plans to support CIGI for communicating between the host and osgVisual? I would think that would be a good thing to support... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben Dannhauer Sent: Thursday, February 03, 2011 12:16 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Camera control in osgvisual Hi vijeesh, I personally use the animationpath ( I recorded it for 1 second while hovering on the destination location) so it immediately strts at that position and as soon as I want to use another camera manipulator, I use that. So I use th animationpath not for playing a real animation but to start at my desired location. You said you want to use a simulation host. Then you have to subclass extLink to use any network technique to transport lat, lon, alt, and rot_x, rot_y and rot_z from your simultion host to the visual system. You can look into extLinkVCL for inspiration. If you have a running simulation host which provides the correct lat/lon coordinates for your aircraft, then the visual system will immediately retrieve that values over your extLink and will position the camera accordingly. Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36313#36313 ___ 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] vpbmaster build question...
Thanks Robert. I'll investigate the logs and report my findings... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Tuesday, February 01, 2011 1:59 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] vpbmaster build question... Hi Shayne, It sounds like VPB is black listing cores due to errors on the tasks that ran on these cores, so it's limiting the build to just the ones that are working. VPB does this to handle outages on a network build where problems on a single machine don't bring the whole build to a halt. If it is black listing that is limiting the cores that are available then you'll need to look at the logs to see if there have been any failures and any reports of blacklisting. You will find a logs directory in the directory that you ran the build from and within this there will be lots of separate .log files that will provide the output from each osgdem run, one per task. If it isn't black listing then you'll need to try running vpbmaster in a debugger and see what is going w.r.t threading. Robert. On Mon, Jan 31, 2011 at 11:43 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, I fired off a VPB build using vpbmaster on a 16 processor machine running Linux Fedora core 13. The number of tasks generated was 5314 for this build. As predicted, vpbmaster fired off 16 osgdem threads to work on the build. As the build went along I noticed that the number of osgdem threads running had slowly decreased until that now there are only 0 to 2 threads running with about 2500 tasks remaining. I never see any more osgdem threads than 2 being generated to work on the build. This seems a bit strange. Is this correct behavior? I would have thought that up to 16 threads would have been working as the build process went along to completion. There is no indication of any errors in the output so far. Has anyone else seen this or know what might be going on? Thank you! -Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36210#36210 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Linker error during execution
J-S, The setting that you amply described IS what we do. We do it quite often so that things don't run so slow when we're debugging our app (not OSG). We may need to run a while before we break into our code for debugging. Running with OSG debug libs is too slow for this scenario so we use the release libs instead with the settings set accordingly. Obviously we don't mix and match when we ship our product to customers... -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: Friday, January 28, 2011 10:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Linker error during execution Hi Shayne, That's interesting because we have ran a debug solution with the release OSG libs before without incident. We're using VC++ 9.0 on Vista 64 bit... That's why I said with default settings in my previous post. There is one way to make that work: you change the project settings to disable iterator debugging in your debug builds of OSG, and make it link to the Debug runtime (/MD instead of /MDD), in which case there's no problem, release and debug can be mixed. I'm guessing that's what you did... But in general that's not recommended because then THAT setting has to match for all libs / executables, and it's not the default so it's easy to get mixed up. So to be precise, we shouldn't say debug and release can't be mixed, we should say _HAS_ITERATOR_DEBUGGING setting and runtime can't be mixed. But we generally use the former as shorthand. Check it out, it's a common thing and I'm surprised you hadn't heard about it before. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Linker error during execution
J-S, I appreciate the input and insightful discussion. This is good information to have for both new and experienced developers. Thank you! -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: Friday, January 28, 2011 12:17 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Linker error during execution Hi Shayne, The setting that you amply described IS what we do. We do it quite often so that things don't run so slow when we're debugging our app (not OSG). We may need to run a while before we break into our code for debugging. Running with OSG debug libs is too slow for this scenario so we use the release libs instead with the settings set accordingly. Yeah, that explains it. So it really was because my wording of don't mix debug and release was not thoroughly accurate... Sorry about that. Still, I really recommend most users don't change the default settings, because then you're totally on your own. Any dependency you use, you'll have to recompile yourself from source, you won't be able to use any precompiled binaries. And for new users, I think it's easier just to say link debug to debug, release to release and you're fine. See the OP of this thread for example, who was setting /MD in his debug build when OSG was built with /MDD. Plus, just how slow it is in debug is a matter of perspective... It is much slower but if you're not debugging too often then it might not matter. Honestly, you haven't seen anything until you've used boost::persistence in debug. THAT's slow. :-) And the other thing is, if you're not actively debugging, then you can run without attaching the debugger (use Ctrl-F5 instead of F5). Then it's much faster than running with the debugger attached (not quite as fast as release, but much faster). And then you can attach the debugger only when you get to a point where you want to debug the running code. That's how we survive using boost::persistence in debug - the persistence is used in loading/saving files, so we start without the debugger, load our scenario, and then attach the debugger. Loading is therefore much faster than with the debugger attached. But of course that doesn't work if we need to debug the actual loading of a scenario. Then we're screwed :-) Another approach could be to always run in release, and just have another configuration with symbols (and possibly with optimization turned off). Sure, why not. But I digress. To each his own. We use release and debug, with the default settings in debug, and just make sure not to mix the two. I recommend the same for new users, but more experienced users can do whatever they want and there are many different ways to get mostly the same result... It all comes down to knowing what you're doing, and if you don't want to know all the small details then you'd be better keeping the default settings I think. I'll make sure to be more precise next time I talk about not mixing A and B... :-) J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Linker error during execution
Just a quick comment... Unless you're debugging into OSG code, I would not use the debug libraries. Things will run SLOOOW. Use osg.lib, osgDB.lib, etc... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mukund Keshav Sent: Thursday, January 27, 2011 2:06 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Linker error during execution Hello everyone, i tried executing the very first tutorial provided in the OSG website(basic geometry.cpp). Well i got this error:(a link error) error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function public: __thiscall std::_Vector_const_iteratorclass osg::Vec3f,class std::allocatorclass osg::Vec3f ::_Vector_const_iteratorclass osg::Vec3f,class std::allocatorclass osg::Vec3f (class osg::Vec3f *,class std::_Container_base_secure const *) (??0?$_Vector_const_iterator@VVec3f@osg@@V?$allocator@VVec3f@osg@@@std@@@std @@QAE@PAVVec3f@osg@@PBV_Container_base_secure@1@@Z) The error looks pretty scary. im not sure what is wrong. i ran few other programs, and it was fine. im not sure what this one meant though. i have linked the following libraries: osgd.lib osgDBd.lib osgViewerd.lib osgTextd.lib osgUtild.lib OpenThreadsd.lib Can anyone please provide some suggestions? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36061#36061 ___ 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] OpenSceneGraph with glut support
You can declare and register a PostDrawCallback with the camera class to do OGL rendering. It will get called after the OSG rendering traversal... void PushOSG_GL_State() { // since OSG and OGL share the same render context, push OGL state used by OSG glPushAttrib(GL_ALL_ATTRIB_BITS); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glMatrixMode(GL_PROJECTION); glPushMatrix(); glMatrixMode(GL_TEXTURE); glPushMatrix(); } void PopOSG_GL_State() { // pop it back off when done with our explicit OGL rendering... glMatrixMode(GL_TEXTURE); glPopMatrix(); glMatrixMode(GL_PROJECTION); glPopMatrix(); glMatrixMode(GL_MODELVIEW); glPopMatrix(); glPopAttrib(); } struct OGLPostDrawCallback : public osg::Camera::DrawCallback { OGLPostDrawCallback(){} virtual void operator () (const osg::Camera camera) const { PushOSG_GL_State(); // OpenGL rendering happens here... renderOGL(); PopOSG_GL_State(); } }; . . . view-getCamera()-setPostDrawCallback(new OGLPostDrawCallback); . . . I'm sure there are other ways to do this but this is what we're doing. It works fine. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mukund Keshav Sent: Tuesday, January 25, 2011 1:09 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] OpenSceneGraph with glut support Hi Robert, im really sorry, i somehow missed out on your post on my first read. Thanks for the detailed explanation. Well im a student and looking at the vastness of OSG, i felt it would require quite a lot of time. So, i was looking for support from the lower level APIs. Thanks ... Hi Shayne, Our OpenGL rendering is in a wrapper which happens in a post draw callback. This seems to work fine. The key is in state management since OSG and OpenGL share the same render context. Could you please elaborate with some links or small examples? i did not quite get you. Thanks a lot! Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35963#35963 ___ 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] OpenSceneGraph with glut support
I agree with Robert that you need to jettison GLUT. It's a mickey mouse framework for mickey mouse apps. It was never intended to be used in real applications. Embedding an OSG viewer in a GLUT window reduces the viewer down to running single threaded which is not good for performance. Our application currently uses OSG and OpenGL together. Our OpenGL rendering is in a wrapper which happens in a post draw callback. This seems to work fine. The key is in state management since OSG and OpenGL share the same render context. Our goal is to eventually port the OpenGL rendering over to OSG but for the time being this is what we're doing to get by. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mukund Keshav Sent: Saturday, January 22, 2011 11:29 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] OpenSceneGraph with glut support Hello, im using OpenSceneGraph for the past 2 days. Well, i would be needing it mostly for terrain rendering. i was wondering if i can use OSG with some low level gl functions? What i mean is, say im using OpenSceneGraph. Now i want to use some gl functions, can i use both together. something like this: Code: /* Use gl functions, build the projection matrix */ .. .. /* Now build the modelview matrix */ .. .. /* Now i build some scene using OSG */ .. .. /* gl functions to render */ .. Can i use this approach. i would like to use the lower level flexibility + the ease with higher level APIs. Is this possible? This is exactly like the question asked here: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg12497.html Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35897#35897 ___ 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] NVidiaTextureTools integration moved from VPB to OSG
Robert, Thanks for the input. I will try to compile and run the latest trunk with NVTT on Fedora core 13 and report any problems... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, January 21, 2011 10:41 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] NVidiaTextureTools integration moved from VPB to OSG Hi Shayne, On Fri, Jan 21, 2011 at 4:58 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: This may be a dumb question in relation to this thread, but does one still need to employ the Mesa tools to bypass the graphics card when using VPB to build databases with the NVTT? VPB still links to OpenGL, virtual of OSG link to it, but you won't need a graphics context at runtime. This means the actual version of OpenGL should be moot, whether you have a software or hardware GL driver won't affect VPB as NVTT will take on the responsibility of doing the GL compression. 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] Calculating altitude with LineSegmentIntersector
If you're using a geocentric database, you can use the osgSim::GetHeightAboveTerrain(...) method to get the altitude of either the terrain itself or an altitude above the terrain at a given lat,lon. This method takes into account paged databases in extracting the correct value... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of issam boughanmi Sent: Wednesday, January 12, 2011 1:46 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Calculating altitude with LineSegmentIntersector i have some trouble to calculate the altitude in my application i have - a pagedlod terrain - a runway - and an airplane model i have taken some of the osgearth code in elevationmanager.cpp as a starting point this code is called every frame : Code: Transform tr; mAirplane-GetTransform(tr); tr.GetTranslation(x,y,z); osg::Vec3d start, end, zero; start.x() = x; start.y() = y; start.z() = 5; end.x() = x; end.y() = y; end.z() = -5; zero.x() = x; zero.y() = y; zero.z() = 0; osgUtil::LineSegmentIntersector* i = new osgUtil::LineSegmentIntersector( start, end ); osgUtil::IntersectionVisitor iv; iv.setIntersector( i ); mTerrain-GetOSGNode()-accept( iv ); osgUtil::LineSegmentIntersector::Intersections results = i-getIntersections(); if ( !results.empty() ) { const osgUtil::LineSegmentIntersector::Intersection result = *results.begin(); osg::Vec3d isectPoint = result.getWorldIntersectPoint(); double out_elevation = (isectPoint-end).length2() (zero-end).length2() ? (isectPoint-zero).length() : -(isectPoint-zero).length(); std::cout distance std::endl; ps : i am using delta3D the problem is that the result out_elevation is always a static number and it don't change when i move the airplane what the simplest formula to calculate the altitude with the LineSegmentIntersector ? thanks and good day -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35567#35567 ___ 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] PERSPECTIVE --FIELD OF VIEW
May I suggest you look at how OpenGL sets up the projection matrix. This is what OSG uses. gluPerspective is the routine that uses fovy and aspect to set up the projection matrix; It may be more intuitive for you to use the setProjectionMatrixAsFrustum() method in OSG to establish the projection matrix. For example, you could set things up as follows given vertical and horizontal fovs... double left = tan(osg::DegreesToRad(fov_left)) * near; double right = tan(osg::DegreesToRad(fov_right)) * near; double bottom = tan(osg::DegreesToRad(fov_bot)) * near; double top = tan(osg::DegreesToRad(fov_top)) * near; view-getCamera()-setProjectionMatrixAsFrustum(left, right, bottom, top, near, far); where near and far are the frustum near and far clipping planes. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sümeyra Söyler Sent: Wednesday, January 12, 2011 8:36 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] PERSPECTIVE --FIELD OF VIEW Hi, I have been looked the perspective projection.But,I dont understood some value in there.Pls help me...Can I change fovy with fovx.Is there a value like fovx.Can I change horizantol value of the fov(x) not fov (y).Other problem is Aspect that I could not understand exactly what it mean Thank you! Cheers, Sümeyra :' -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35585#35585 ___ 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] [forum] Line Of Sight and skyline tools
Dan, Take a look at the osgintersection example. It uses osgSim::LineOfSight class... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Darko Radiceski Sent: Monday, January 03, 2011 10:01 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [forum] Line Of Sight and skyline tools Hi all, I had a question in regards to possible examples of lines of sight or skyline tool implementations in OSG. I did notice the OSGSim LineOfSight helper class in my research and was wondering if there are any examples of that class in use. Also any examples of skyline calculation from the loaded data within the scene? Any advice or pointers would be greatly appreciated. Thank you! Cheers, Dan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35287#35287 ___ 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] geographic to geocentric coordinate transformation
Deniz, If you're using osgdem with the --geocentric flag set, you're building a geocentric database which is correct. Here's a code snippet that may help you position your camera on the spheroid in geocentric space. It sets the view matrix for the camera given the lat, lon and alt. Roll, pitch, and yaw are zero in this example which means you will be flying level looking north. osg::Matrixd vm; ellipsoid-computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadia ns(lat), osg::DegreesToRadians(lon), alt, vm); vm.invert(vm); osg::Matrixd rotation2YUp; rotation2YUp.makeRotate(-M_PI_2, osg::Vec3f(1.0, 0.0, 0.0)); vm *= rotation2YUp; view-getCamera()-setViewMatrix(vm); Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of deniz diktas Sent: Monday, December 27, 2010 3:35 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] geographic to geocentric coordinate transformation Hi, I am using osgdem to generate a terrain from a set of dted-files in geocentric coordinates. What I am trying to do next is to navigate the camera along a path given in geographic coordinates (lat, long, alt). However, when I try to convert a geographic coordinate (of which I am sure from where the terrain is visible) to geocentric coordinates, and place my camera there I do not get to see anything. I transform the coordinates using osg:EllipsoidModel. I also realized that I am getting weird output results from the Ellipsoid transformation: when I construct a bounding sphere bounding the whole terrain (built in geocentric coord-sys) and test a point at the center of the terrain (converted from geographic to geocentric coordinates) to see if it is included in this bonding sphere, it turns out that this point in geocentric coordinates is not included inside this bounding sphere - which is a contradiction. am I missing something when performing the transformation from geographic to geocentric coordinates? are there other transformations I have to incorporate into my calculation? or am I building my terrain database with the wrong parameters ? I use --geocentric option and I pass the root directory of all dted files. I use osg-version 2.9.5 and virtual-planet-builder-v11. any help is greatly appreciated.. Thank you! Cheers, deniz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35183#35183 ___ 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] geographic to geocentric coordinatetransformation
Deniz, Which method in EllipsoidModel were you using to do the transform from (lat,lon,alt) to (X,Y,Z)? Can you provide a code snippet on how you're doing the transform? Also provide the actual osgdem command you're using to build your database... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of deniz diktas Sent: Tuesday, December 28, 2010 1:10 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] geographic to geocentric coordinatetransformation Hi Shayne, thank you for your reply. but the problem I am facing is related to the transformation. But I will keep your suggestion in mind when placing the camera, so thanks again :) The input to the application will be a flight-path given as a list of consecutive points in geographic coordinates which have to be transformed to geocentric coordinates (I also have orientation information of the airplane) but somehow the ellipsoid model fails to do it appropriately. I found another tool that transforms the coordinates correctly and I could see the terrain: so the problem seems to be solved for now. But I cannot see how why osgdem transforms it correctly but the ellipsoid model fails to do it. So I still would be glad if someone could tell me what the problem is.. deniz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35197#35197 ___ 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] geographic to geocentric coordinatetransformation
A couple more questions... 1) Are your lat, lon in radians when you call convertLatLongHeightToXYZ? 2) Have you tried viewing your database (terrain.ive) with osgviewer to see what it looks like (osgviewer terrain.ive)? If you can't see your database with osgviewer, then there's a problem with your database. I use the exact same methods and my stuff works fine for viewing the terrain given a lat,lon,alt with a geocentric database. As for osgdem, the only difference is that I'm using a pagedLOD database and I'm using osgTerrain... Here's the osgdem command I use... osgdem --TERRAIN -PagedLOD --geocentric --whole-globe -t wholeearthtexture -t texturedir -d elevationdir -l 24 -o geodatabase.ive -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of deniz diktas Sent: Tuesday, December 28, 2010 2:18 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] geographic to geocentric coordinatetransformation I am using osg::EllipsoidModel::convertLatLongHeightToXYZ() method to convert the coordinates as such: osg:::EllipsoidModel em; em.convertLatLongHeightToXYZ(_lat,_long,_alt, x,y,z); when building the model I used osgdem with the following parameters: osgdem --geocentric -d dted_dir -o terrain.ive dted_dir contains dted files in a certain directory structure defined in dted-standard. I checked the validty of the dted with a commercial software, the geographic ranges are consistent with osgdem without --geocentric parameter (I looked at the contents of the height field of the first subtile: lod=0) so there is no problem with the input file, I am sure of that. -deniz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35199#35199 ___ 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] geographic to geocentric coordinatetransformation
I'm glad things are working for you... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of deniz diktas Sent: Tuesday, December 28, 2010 4:25 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] geographic to geocentric coordinatetransformation 1) oops.. you are right! I am not passing them in radians :-* ok I feel a little embarassed as of why I could not think of that :x I guess because I always tend to think in terms of opengl logic: in opengl you pass angles in degrees. 2) I have been able to see the terrain in osgviewer so no problem there.. Thank you so much Shayne, help greatly appreciated :) best wishes! deniz -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35203#35203 ___ 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] VPB vs osgEarth...
Glenn and Robert, Thanks much for the input. I'll try out osgEarth to see how it works in a small app I have... Thanks again, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Glenn Waldron Sent: Thursday, December 23, 2010 3:22 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] VPB vs osgEarth... Shayne, Whether you get a palpable performance hit depends on a lot of factors. One of osgEarth's features is the ability to pull data from web mapping services (similar to Googe Maps). That type of data is pre-tiled into raster pyramids - which is what VPB does too. So if your source data is similarly prepared, you can achieve loading speeds comparable to a pre-generated terrain model. osgEarth includes tools for that. osgEarth's caching stores multi-resolution pyramids of source data, so if you have to ingest expensive data it will only be a performance hit the first time through. If you're loading flat files - GeoTIFFs, DEMs, etc - then there is some processing overhead in pulling in the data, especially if it needs reprojecting. But otherwise, you might be surprised at how fast is actually is. It is worth mentioning that osgEarth is not just a terrain engine, but a whole toolkit. It includes an API for coordinate conversion, support for vector features, utilities for clamping, a programmable manipulator, plugins for lots of web- and file-based data sources, and shader composition support. Glenn Waldron : Pelican Mapping On Thu, Dec 23, 2010 at 2:59 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, Up to this point, we've used VPB for building our databases that our OSG app uses. However, I've contemplated taking a look at osgEarth for future consideration. My question is, is what advantages are there for using osgEarth vs. VPB? I understand that source content (DTED, GeoTiff, etc.) is loaded on the fly in osgEarth but doesn't that hurt performance when compared to a statically built database done with VPB? Thanks for any input in advance... -Shayne ... Thank you! Cheers, Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35137#35137 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How do I get the most accurate heightfield readingout of an OsgTerrain paged database
I don't know what functionality osgTDS provided, but as to the original question at hand, osgSim for osgTerrain paged databases is the answer... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David Glenn Sent: Tuesday, December 07, 2010 12:25 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How do I get the most accurate heightfield readingout of an OsgTerrain paged database zonk wrote: Hi, osgTDS is a little bit outdated, it works only with polygonal field, not with osg TERRAIN format. Thank you! Cheers, Torben Well zonk, it was brought to my attention by Bob Kuehne in his OSG class. I also heard that osgTDS might get depreciated. What I would like to know then is if this is going away what is the alternative in VPB via anyway else for that matter? In the whole osgTDS sounded like a good idea since basically appeared to work like what Terra Vista does with terrain models, but if it doesn’t work on osgTerrain, and then I assume that there is a replacement to that will! D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34589#34589 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How do I get the most accurate heightfield readingout of an OsgTerrain paged database
Agreed... The terrain is only as accurate as the original source data. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of David Glenn Sent: Friday, December 03, 2010 12:30 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How do I get the most accurate heightfield readingout of an OsgTerrain paged database Greetings! A Word of Caution: that no matter how accurate the HAT is that the reading may be only as accurate as the Terrain used. In my experience making and using terrain, I have found that even some of these high priced terrain builders have their flaws compounded by the fact that most data in the public realm has only a certain level of accuracy. So you’re only going to get a certain level of confidence in relation to the real world figures or even some other forms of map data I have used. Terrain can be such a fickle beast! ... D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34511#34511 ___ 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] Beginners Questions , about OSG from long time developer
Meir, I would suggest looking at the OSG examples to get started. Those come as part of the OSG package when you install it. Without knowing the specifics of your project, you will need to determine if the SceneGraph paradigm fits with what you're trying to accomplish. The links below should also help... https://www.movesinstitute.org/Sullivan/OSGTutorials/ http://www.vis-sim.com/osg/osg_faq_1.htm#f1 -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Meir Meiry Sent: Tuesday, November 23, 2010 1:17 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Beginners Questions , about OSG from long time developer Hi, Hello all I need to build basic 3d modeling tool , I have no experience in 3d programming But I have experience in c++ programming ( 15 years ) I do know 3d terms from previous Experience as user of 3dstudio max. My question is to build basic 3d modeling application what is the learning curve I need to do ? From where to start and what subjects to learn , also does this framework is the right tool for this job ? In terms of simplicity Thank you! Cheers, meir -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33968#33968 ___ 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] osgSim::HeightAboveTerrain not returning any hits
Just a few questions from your code... 1) I noticed that your osgdem command isn't using --geocentric in the command line. Are you building a geocentric database? 2) Are your lat lon values in degrees or radians? The convertLatLongHeightToXYZ() method requires lat, lon radians. 3) Why is your traversal mask -1 in the computeHeightAboveTerrain()? Try removing the -1 from this call... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Murray G. Gamble Sent: Wednesday, November 24, 2010 2:19 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] osgSim::HeightAboveTerrain not returning any hits Hi All, It's been a while. Good to be back. We have created a paged terrain database using VPB/OsgDem with geo-referenced GeoTIFF-based elevation data using the command: osgdem -d honolulu.tif --no-terrain-simplification -l 16 -o honolulu.ive This creates a very detailed terrain database against which we'd like to perform HAT queries. We build a simple scene graph using the following lines of code: osg::Node *wTerrainNode = osgDB::readNodeFile( honolulu.ive ); osg::Group *wRootNode = new osg::Group(); wRootNode-addChild( wTerrainNode ); osgViewer::Viewer *wViewer = new osgViewer::Viewer(); wViewer-setUpViewerInWindow( 100, 100, 800, 600 ); wViewer-setSceneData( wRootNode ); wViewer-realize(); osgSim::HeightAboveTerrain wHatTester; osg::CoordinateSystemNode *wCsn = dynamic_castosg::CoordinateSystemNode*(wTerrainNode); wCsn-setEllipsoidModel( new osg::EllipsoidModel() ); We then use the following code to query HAT (in our main loop): wCsn-getEllipsoidModel()-convertLatLongHeightToXYZ( wLat, wLon, wHeight, wX, wY, wZ ); // where wLat, wLon, wAlt are dynamic, valid values within the terrain area being populated by our flight model double wHat = wHatTester.computeHeightAboveTerrain( wTerrainNode, osg::Vec3d( wX, wY, wZ ), -1 ); In each case wHat remains a constant value consistent with height above sea level (i.e., no hits are being generated against the terrain). We are also visualizing our observer position with the same lat/lon/alt values and observe a valid, correlated position, so we know that the terrain is loading and that the lat/lon/values being used for the HAT query are reasonable. Any thoughts as to why we're not getting any hits? Thank you, Murray ___ 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] thread hangs when LineSegmentIntersector is used...
Robert, Thanks for the reply. No, our app does not override new and delete. It's using the standard operators in C++. I'm not sure on how to answer your last question. Are you referring to OpenThreads? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, November 18, 2010 8:55 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] thread hangs when LineSegmentIntersector is used... HI Shayne, Doing a new really shouldn't cause any threading problems. Does you app override new and delete? Is there something else unusual about our set that might break new and delete's thread safety? Robert. On Thu, Nov 18, 2010 at 3:07 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, After further invesigation on why my thread is hanging, I narrowed it down to when OSG creates an IntersectorGroup() object via the 'new' operator in the intersection code. Just for a sanity check, I did the following in the run() method of my thread: char *start = (char *)malloc(4) and it never returns after I issue the malloc() call. It would appear that 'new' or malloc() hangs the thread. Do I need to do use some sort of special memory management scheme in OpenThreads when it comes to dynamic memory allocation? As stated earlier, I'm new to threaded programming so I'm probably failing to do something that is needed in the case of dynamic memory allocation in a thread... Thank you! Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33831#33831 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] thread hangs when LineSegmentIntersector is used...
Just as a follow up, I'm going to write a simple program that spawns a thread using OpenThreads and allocates memory to make sure our app isn't doing something perverse when it comes to memory management. It's possible that something isn't being cleaned up correctly in the main process when we start up the thread and new an object. To muddy the waters further, it is probably worth mentioning that we don't see the aforementioned problem on earlier versions of Fedora. In those environments, the thread runs fine when we create an object dynamically. It's only when our app runs on Fedora core 13 that we start seeing the problem. I'll dig more and report my findings... -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: Thursday, November 18, 2010 9:08 AM To: OpenSceneGraph Users Subject: Re: [osg-users] thread hangs when LineSegmentIntersector is used... Robert, Thanks for the reply. No, our app does not override new and delete. It's using the standard operators in C++. I'm not sure on how to answer your last question. Are you referring to OpenThreads? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, November 18, 2010 8:55 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] thread hangs when LineSegmentIntersector is used... HI Shayne, Doing a new really shouldn't cause any threading problems. Does you app override new and delete? Is there something else unusual about our set that might break new and delete's thread safety? Robert. On Thu, Nov 18, 2010 at 3:07 PM, Shayne Tueller shayne.tuel...@hill.af.mil wrote: All, After further invesigation on why my thread is hanging, I narrowed it down to when OSG creates an IntersectorGroup() object via the 'new' operator in the intersection code. Just for a sanity check, I did the following in the run() method of my thread: char *start = (char *)malloc(4) and it never returns after I issue the malloc() call. It would appear that 'new' or malloc() hangs the thread. Do I need to do use some sort of special memory management scheme in OpenThreads when it comes to dynamic memory allocation? As stated earlier, I'm new to threaded programming so I'm probably failing to do something that is needed in the case of dynamic memory allocation in a thread... Thank you! Shayne -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33831#33831 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem/vpb OS Open Data and geocentric
Try the following gdal command on your data (infile) that is not geo-referenced... gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear infile outfile and feed the resulting outfile into osgdem... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Naylor Sent: Wednesday, November 10, 2010 11:58 AM To: 'OpenSceneGraph Users' Subject: [osg-users] osgdem/vpb OS Open Data and geocentric Hi all, I have downloaded the free Ordinance Survey data and have managed to convert the height data and raster data using gdal_translate. Everything works brilliant when the option --geocentric is omitted. Once --geocentric is included osgdem finished within about 20 seconds my planet now looks like a sphere with bobbles attached, almost like a leather football. I am sure it's something to with the data and the format it is in, here is gdalinfo of my converted data (excluding colour data). Does anyone know how I should convert it over so I can get a whole earth, I am guessing it's something to do with the format although osgdem reprojects the data when --geocentric is included? Using the latest SVN as of last Friday. The OS data is the best FREE data I have come across so far, although I am sure there must be higher resolution height data. d:\OS OPENDATA\build\ras250_gb_convertedgdalinfo HP.tif-geo.tif Driver: GTiff/GeoTIFF Files: HP.tif-geo.tif Size is 4000, 4000 Coordinate System is `' Origin = (40.000,130.000) Pixel Size = (25.000,-25.000) Metadata: TIFFTAG_IMAGEDESCRIPTION=1:250 000 TILE HP.TIF TIFFTAG_DATETIME=2010:05:04 10:31:47 TIFFTAG_COPYRIGHT=ORDNANCE SURVEY CROWN COPYRIGHT 2010 TIFFTAG_XRESOLUTION=254 TIFFTAG_YRESOLUTION=254 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: COMPRESSION=LZW INTERLEAVE=BAND Corner Coordinates: Upper Left ( 40.000, 130.000) Lower Left ( 40.000, 120.000) Upper Right ( 50.000, 130.000) Lower Right ( 50.000, 120.000) Center ( 45.000, 125.000) Band 1 Block=256x256 Type=Byte, ColorInterp=Palette Color Table (RGB with 256 entries) ___ 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 problem with large database...
Jp, Thanks for the suggestion. I'll give it a try. Thinking that it might be a video card limitation (texture memory), I tried building the same content on a more capable video card (Nvidia 9800 GTX) and I'm still having the problem of having the osgdem threads dying out. I'm suspecting that VPB is having trouble with the large tif files and the number of them. I have 10,271 tif files in a single directory where each tif file is ~30MB in size. If I pare down the number of files to just a few, it builds fine. When I throw the full gamut of tif files at it, VPB chokes. Apparently there's some sort of limitation here to what it can handle. I'll continue to investigate and post my findings... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Friday, October 22, 2010 12:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB problem with large database... Hi, you can check in the tasks folder to see exactly the osgdem command(s) that would be executed by vpb. Try execute one of these manually and see if it does not report any useful errors. jp On 21/10/10 20:31, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: All, I'm seeing some issues with VPB when attempting to build a very large database. My command is the following: vpbmaster -TERRAIN -PagedLOD -geocentric -whole-globe -t wholeearthtexture -t detailtexture -d dted -l 24 -o database.ive What I'm seeing is that vpbmaster creates the tasks and logs directories followed by the scheduling of tasks. During the scheduling of tasks, I see the threads osgdem. created on the machine and then die a few seconds later. vpbmaster then just waits for something to happen and eventually goes to sleep. I'm guessing that this is happening because the threads died for some reason and vpbmaster just sits there waiting for them to come back. I understand the VPB is able to handle the building of very large databases but it seems to be choking in our particular case. If I run the same command above on a smaller set of data, things run just fine. Our system has 16 processors with ample disk and memory space to handle what is needed. It also runs Fadora core 13. Has anyone else seen this issue? Is there a flag or setting that I need to use to build a large database? Any input would be appreciated. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB problem with large database...
Robert, Thanks for the reply. I can try the latest version of OSG/VPB to build the database but will the database still be compatible with an app that uses OSG 2.8.2 to fly through the database? I'm not really in a position to update our application software to the latest version of OSG at this time. If I can still get by with using OSG 2.8.2 in our app, then I'm more amenable to upgrading to the latest OSG/VPB for our build machine. Thanks for your input and 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, October 22, 2010 10:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB problem with large database... Hi Shayne, I don't know what might be causing problems on your system, debugging this type of thing remotely is next to impossible. The best I can do is suggest trying the svn/trunk version of the OSG VPB. With VPB is now possible build using NVidia texture tools and with this avoid the need for graphics context and associated graphics card - instead you can just compile and run with Mesa libs. For more info have a look at the recent threads on osg-users and osg-submissions about NVidia Texture Tools integration. Robert. On Fri, Oct 22, 2010 at 3:48 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Jp, Thanks for the suggestion. I'll give it a try. Thinking that it might be a video card limitation (texture memory), I tried building the same content on a more capable video card (Nvidia 9800 GTX) and I'm still having the problem of having the osgdem threads dying out. I'm suspecting that VPB is having trouble with the large tif files and the number of them. I have 10,271 tif files in a single directory where each tif file is ~30MB in size. If I pare down the number of files to just a few, it builds fine. When I throw the full gamut of tif files at it, VPB chokes. Apparently there's some sort of limitation here to what it can handle. I'll continue to investigate and post my findings... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent: Friday, October 22, 2010 12:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] VPB problem with large database... Hi, you can check in the tasks folder to see exactly the osgdem command(s) that would be executed by vpb. Try execute one of these manually and see if it does not report any useful errors. jp On 21/10/10 20:31, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: All, I'm seeing some issues with VPB when attempting to build a very large database. My command is the following: vpbmaster -TERRAIN -PagedLOD -geocentric -whole-globe -t wholeearthtexture -t detailtexture -d dted -l 24 -o database.ive What I'm seeing is that vpbmaster creates the tasks and logs directories followed by the scheduling of tasks. During the scheduling of tasks, I see the threads osgdem. created on the machine and then die a few seconds later. vpbmaster then just waits for something to happen and eventually goes to sleep. I'm guessing that this is happening because the threads died for some reason and vpbmaster just sits there waiting for them to come back. I understand the VPB is able to handle the building of very large databases but it seems to be choking in our particular case. If I run the same command above on a smaller set of data, things run just fine. Our system has 16 processors with ample disk and memory space to handle what is needed. It also runs Fadora core 13. Has anyone else seen this issue? Is there a flag or setting that I need to use to build a large database? Any input would be appreciated. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg
[osg-users] VPB problem with large database...
All, I'm seeing some issues with VPB when attempting to build a very large database. My command is the following: vpbmaster -TERRAIN -PagedLOD -geocentric -whole-globe -t wholeearthtexture -t detailtexture -d dted -l 24 -o database.ive What I'm seeing is that vpbmaster creates the tasks and logs directories followed by the scheduling of tasks. During the scheduling of tasks, I see the threads osgdem. created on the machine and then die a few seconds later. vpbmaster then just waits for something to happen and eventually goes to sleep. I'm guessing that this is happening because the threads died for some reason and vpbmaster just sits there waiting for them to come back. I understand the VPB is able to handle the building of very large databases but it seems to be choking in our particular case. If I run the same command above on a smaller set of data, things run just fine. Our system has 16 processors with ample disk and memory space to handle what is needed. It also runs Fadora core 13. Has anyone else seen this issue? Is there a flag or setting that I need to use to build a large database? Any input would be appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Animation with Cubic Bezier path
Daniele, Bezier Curves are parametric functions that are defined by their control points. The number of control points will determine the degree of the curve minus 1 so four control points will yield curve of degree three (cubic). The control points can be specified in whatever dimension you want (i.e. 2D or 3D) and whatever coordinate system you want. The resulting curve will lie within the control point polygon (the convex hull) where the curve will interpolate the first control point at t=0 and the last control point at t=1. As the parameter t varies between 0 and 1, the curve will trace out a smooth path from the first to the last control point. The animation will be controlled by the parameter t as input and the resulting point (x,y,z) on the curve will be given as output for a position. Without going into too much detail mathematically on Bezier curves and splines, may I suggest you look at the book Curves and Surfaces for Computer Aided Geometric Design by Gerald Farin to get more information if you want to learn more about Bezier curves. Hopefully this will answer your question on how the example works when using Bezier curves to generate an animation path... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of daniele argiolas Sent: Tuesday, October 19, 2010 9:04 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Animation with Cubic Bezier path Hi, I tried to understand osganimationmakepath example. I can't understand how to make an animation if I would use simple points like these: v[0] = osg::Vec3(0, 0, 0); v[1] = osg::Vec3(20, 0, 0); v[2] = osg::Vec3(40, 0, 0); v[3] = osg::Vec3(60, 0, 0); I want an animation without stops between points and with a constant speed. What keys I have to add on path? I don't understand the relationship between control points of bezier and the making of animation. Is there anybody who can me explain? Thank you! Cheers, daniele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32861#32861 ___ 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] Creating holes in a PagedLOD
VPB currently does not support this functionality. There have been other developers that have proposed or even implemented solutions to provide something like this in the future. Perhaps they can chime in... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of ra...@hush.ai Sent: Wednesday, October 06, 2010 1:10 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Creating holes in a PagedLOD Hello All, I'm using vpb to generate a terrain for a project I'm working on. And it is fantastic. I do have one question though, I have a need to 'cut' holes in the terrain so models can be placed on/into hillsides, or in a hole in the ground. e.g. a dam in the side of a hill. I've looked a bit and do not see an obvious solution? any pointers in the right direction would be much appreciated. Thanks, John ___ 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] Problem Loading .FLT
Matt, Just for giggles, have you tried loading your .FLT file in osgviewer? In other words, try osgviewer campus08-19.flt and see what happens. It should just load your openflight file for viewing... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Matt Caron Sent: Tuesday, October 05, 2010 10:57 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Problem Loading .FLT Hi, I've got an .FLT file that I need to load into OSG. I am loading it with the following code: Code: osg::Node* pLoadedModel = osgDB::readNodeFile([mypath]/campus08-19.flt); However when I compile and run the program I get the following error: Unknown record, opcode=91 size=88 I have no idea what this means and I'm hoping someone here can explain it and perhaps help me correct it. I have seen this .FLT run with other programs so it should not be corrupt or anything. Thank you! Cheers, Matt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32410#32410 ___ 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] convertLatLongHeightToXYZ
Lucie, If you're on a flat earth, you shouldn't be using the convertLatLongHeightToXYZ method. This is only used for mapping spheroid coordinates to geocentric (origin is at the center of the spheroid) coordinates. Because you were referencing this method, it was assumed that you were using this type of mapping. If you want to get X,Y from a Lat,Long pair, you need to use some other projection or mapping. You could use a Plate Carree projection or something similar http://en.wikipedia.org/wiki/Equirectangular_projection. May I also suggest that you use something like GeoTrans or GDAL to assist you in what you need to do. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie lemonnier Sent: Friday, October 01, 2010 3:06 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] convertLatLongHeightToXYZ Hi, In fact, my model is not spheroid, it is a flat terrain. That's why I need simply the position. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32257#32257 ___ 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] convertLatLongHeightToXYZ
Yes, they're both equivalent in that they return position info but the former returns a matrix for you to use in your transform node so that your model will be positioned correctly on the spheroid. I believe the up vector of the model will then match the up vector at that position on the spheroid so that things are oriented correctly (i.e. a car appears upright sitting on the ground). -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie lemonnier Sent: Thursday, September 30, 2010 10:09 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] convertLatLongHeightToXYZ Hi, The function ellipsoid-computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadia ns(lat),osg::DegreesToRadians(lon), altitude, position); give me the same values of X,Y,Z as if I use directly the function ellipsoid-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat),osg::Degrees ToRadians(lon), altitude, position); I don't understand. Can you clear up me? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32232#32232 ___ 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] convertLatLongHeightToXYZ
Lucie, This is how you would place your model... osg::Matrixd position; ellipsoid-computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadia ns(lat), osg::DegreesToRadians(lon), altitude, position); transform-setMatrix(position); where transform is an osg::MatrixTransform node that has your model as a child node. The X,Y,Z geocentric Cartesian coordinates from the lat,lon,alt can be extracted by: osg::Vec3d pos = position.getTrans(); Keep in mind that an altitude of zero will yield a point on the surface of the spheroid for a given lat,lon pair. Any altitude zero is the height above the ellipsoid/spheroid. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie lemonnier Sent: Wednesday, September 29, 2010 3:44 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] convertLatLongHeightToXYZ Hi, I understood that the XYZ are in Earth Center Earth Fixed coordinates. So is it normal that X,Y are calculated based on height? In fact, I put a latitude, longitude and height on a model, I use osg::EllipsoidModel::convertLatLongHeightToXYZ to obtain the position x,y,z and I transform my point with the MatrixTransforms applied on the terrain model and I place my model with the transformed point. Is it the step to be followed? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32170#32170 ___ 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] osgParticle restart...
All, I have a simple question regarding osgParticle effects. Is there a simple way to restart the effects once they expire? For example, I have a burning object emitting a smoke effect that I want to restart after the smoke disappears. Is there a clean way to restart the smoke effect? Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgParticle effects on a moving object...
All, I have a need to attach osgParticle effects on a moving object (i.e smoke and fire trail from a moving missile). I've looked at the osgparticleeffects.cpp example in where they attach these effects based off a hit node from the pick event to see how I might do this. Unfortunately I need to invoke the effects from the moving object's UpdateCallback event rather than from a pick event. I have tried several things to get this to work without success. As anyone else been able to something similar to what I'm trying to accomplish? I would appreciate any suggestions anyone might have on how to get this to work. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compute Terrain Intersection for .flt databases[SEC=UNCLASSIFIED]
Paul, For HAT, you only need one point. LOS requires a start and end point. Both require that the points be specified in the database coordinates (i.e. geocentric Cartesian coordinates for round earth databases). I haven't worked with .flt databases but the osgSim methods appear to work for paged databases built by VPB... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Pocock Sent: Thursday, September 02, 2010 11:06 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Compute Terrain Intersection for .flt databases[SEC=UNCLASSIFIED] Hi - Whats the best way to get the z down intersect point onto a paged database. I'm getting what looks like loss of precision errors. I am not sure if it is because I am using osgUtil::IntersectVisitor (Which I believe is deprecated?) or my lack of knowledge of osgSim::HeightAboveTerrain. Is it my proper understanding that I provide two points x,y,z (beginning and end) for HAT? Even doing this gives some very strange results... Is there a very basic example out there to achieve this? Is it a trivial problem? Regards Paul IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ 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] transform to screen function
Alex, The short answer is no. However, this question has already been addressed... http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/59941/focus= 59966 -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Pecoraro, Alexander N Sent: Tuesday, August 31, 2010 9:56 AM To: OpenSceneGraph Users Subject: [osg-users] transform to screen function Is there some easy function on the osg::Camera (or some other osg class) that I can call to compute the 2d screen position of a 3d point? I couldn't find one when looking through the documentation, but I figured I would ask just in case I am missing it. Thanks. Alex 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] LineSegmentIntersector...
All, I have a question about LineSegmentIntersector. Does it always return all intersections or does it have a feature that tells you whether or not you got a hit or not? I have a need to use something for terrain masking from a viewpoint to another location. In this case, all I want to know is if I hit terrain or not. I don't care about where the hit is or how many hits there are. It would certainly be more optimal to test for a single hit in this case rather than computing ALL intersections along a line of sight. Any feedback on this would be appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegmentIntersector...
I sort of figured that I might have to write my own. I just wanted to make sure there wasn't already something out there before I pressed forward. It probably might be a good thing to have in osgSim since terrain masking is a heavily used feature in simulation environments... Thanks for your input. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Tuesday, August 24, 2010 11:37 AM To: OpenSceneGraph Users Subject: Re: [osg-users] LineSegmentIntersector... In the past I would simply write my own 'LineSegementIntersector' to return just a hit and simply use a node mask to just test against terrain nodes, just subclass or make a copy of the current 'LineSegementIntersector' and just later what it returns and data it collects etc Gordon Tomlinson Product Manager 3d Technology Project Wyvern OverwatchR An Operating Unit of Textron Systems __ WARNING: Documents that can be viewed, printed or retrieved from this E-Mail may contain technical data whose export is restricted by the Arms Export Control Act (Title 22, U.S.C., Sec 2751, et seq,) or the Export Administration Act of 1979, as amended, Title 50, U.S.C., App. 2401 et seq. and which may not be exported, released or disclosed to non-U.S. persons (i.e. persons who are not U.S. citizens or lawful permanent residents [green card holders]) inside or outside the United States, without first obtaining an export license. Violations of these export laws are subject to severe civil, criminal and administrative penalties. 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 24, 2010 1:13 PM To: OpenSceneGraph Users Subject: [osg-users] LineSegmentIntersector... All, I have a question about LineSegmentIntersector. Does it always return all intersections or does it have a feature that tells you whether or not you got a hit or not? I have a need to use something for terrain masking from a viewpoint to another location. In this case, all I want to know is if I hit terrain or not. I don't care about where the hit is or how many hits there are. It would certainly be more optimal to test for a single hit in this case rather than computing ALL intersections along a line of sight. Any feedback on this would be appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgSim HeightAboveTerrain performance...
Robert, If I'm using this KdTree feature correctly then perhaps the next step is digging down deeper with a debugger. In my app, I'm collecting both HAT and LOS data on a per frame basis on the terrain. I've narrowed it down to where the intersections are calculated for the LOS set. It appears I get a significant performance hit when I invoke the call: los.computeIntersections(terrain.get()); where terrain is a pagedLOD VPB database and los is an osgSim:LineOfSight class. Once I comment this call out, performance is where it should be. This would seem to suggest that there's no bottleneck outside the ray/triangle intersection but that there are issues with the intersection calculations themselves for LOS... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, August 20, 2010 2:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shayne, If KdTree aren't helping performance then you either have a bottleneck outside the actual ray to triangle intersection, or perhaps the KdTree's aren't being assigned correctly. Might I suggest you walk through the code in a debugger to see what is going on. Robert. On Thu, Aug 19, 2010 at 10:41 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, Sorry it has been long giving feedback on this. I've been working other issues. I did try the KdTrees stuff you suggested without any improvement in performance. I called osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter::Option s::BUILDKDTREES); before I load my terrain database. Is this the correct way to do this? Is there anything else I need to do to enable this or get this to work? In some respects things got even slower than before when I try LOS intersection calculations via the osgSim::LineOfSight class... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, July 28, 2010 2:47 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shyane, I've not been at my desk too consistently this last few weeks due to school holidays, so not able to dig down into all threads. A couple of general comments. If intersections are slow then consider enabling the building KdTree's on your scene graph, this will greatly improve performance. In osgDB::Options and osgDB::Registry there is a setBuildKdTreesHint(..) method that you can use. Robert. On Tue, Jul 27, 2010 at 7:25 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Since I didn't receive any input or feedback on my previous inquiry, I'm assuming no one has used osgSim very much in an extensive setting.?.? At any rate, I've done some further investigation. It appears that performance is very poor when HAT inquiries are randomly called in different portions of the code via the osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) method. On the other hand, if HAT points via hat.addPoint() are collected up and then computed (intersections) in one place, performance improves. I'm assuming that this is the correct usage for OSG? If this is true, I must say that this is a major problem since HAT inquiries need to be done at different times throughout the application due to dependencies on HAT for other calculations. I would like some feedback from someone in the know on osgSim so I know what the proper usage is for maximum performance. If it is true that all HAT points in OSG need to be consolidated for intersection calculation, then I will attempt to refactor the code to support what OSG wants. Thanks, -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, July 23, 2010 10:57 AM To: OpenSceneGraph Users Subject: [osg-users] osgSim HeightAboveTerrain performance... All, I was wanting some feedback for those who have used osgSim in querying VPB database info such has HAT, LOS, etc., during runtime. I'm seeing some performance issues when using osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) to get the HAT value for a particular location in the database. At times, we need multiple HAT values per frame which seems to bog the performance down. I would surmise that LOS calculations are probably worse since multiple intersections are computed. My question is, is how efficient is the osgSim HAT function? Is the process of retrieving HAT a slow one? If so, is there a way to improve performance if one or more HAT requests are issued on a per frame basis? Thanks in advance, -Shayne
Re: [osg-users] osgSim HeightAboveTerrain performance...
Robert, That sounds like a plausible explanation for the performance hit. I'll investigate further and try the basic ones as you suggest. On a related note, I have a couple of questions... 1) Is there a quick way to obtain the closest intersection for a given LOS? I noticed that for a LOS, all intersections with the terrain are returned which can be large when my ownship gets close to the ground. Right now, I'm searching the returned intersection list and extracting the closest one. 2) Does the LOS technique check for occlusion along a given ray or does it compute every intersection regardless? Are hits with backfaces (as defined relative to the ownship) computed as well? I'm assuming that the computed intersection list is random (i.e. not sorted from closest to farthest from the start point)? 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, August 20, 2010 8:48 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shayne, The LOS and HAT techniques use the osgUtil::IntersectionVisitor and LineSegmentIntersector to the intersection work, and by default add a special callback DatabaseCacheReadCallback that enables the intersection traversal to load external tiles when tiles aren't already in memory. This load is synchronous so it may well be that this is causing the performance hit. You could you try using the basic osgUtil::IntersectionVisitor and LineSegmentIntersector, this won't automatically load higher levels of details, making do with just what is loaded into memory already, but it will at least not require an IO. Robert. On Fri, Aug 20, 2010 at 3:35 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, If I'm using this KdTree feature correctly then perhaps the next step is digging down deeper with a debugger. In my app, I'm collecting both HAT and LOS data on a per frame basis on the terrain. I've narrowed it down to where the intersections are calculated for the LOS set. It appears I get a significant performance hit when I invoke the call: los.computeIntersections(terrain.get()); where terrain is a pagedLOD VPB database and los is an osgSim:LineOfSight class. Once I comment this call out, performance is where it should be. This would seem to suggest that there's no bottleneck outside the ray/triangle intersection but that there are issues with the intersection calculations themselves for LOS... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, August 20, 2010 2:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shayne, If KdTree aren't helping performance then you either have a bottleneck outside the actual ray to triangle intersection, or perhaps the KdTree's aren't being assigned correctly. Might I suggest you walk through the code in a debugger to see what is going on. Robert. On Thu, Aug 19, 2010 at 10:41 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, Sorry it has been long giving feedback on this. I've been working other issues. I did try the KdTrees stuff you suggested without any improvement in performance. I called osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter::Option s::BUILDKDTREES); before I load my terrain database. Is this the correct way to do this? Is there anything else I need to do to enable this or get this to work? In some respects things got even slower than before when I try LOS intersection calculations via the osgSim::LineOfSight class... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, July 28, 2010 2:47 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shyane, I've not been at my desk too consistently this last few weeks due to school holidays, so not able to dig down into all threads. A couple of general comments. If intersections are slow then consider enabling the building KdTree's on your scene graph, this will greatly improve performance. In osgDB::Options and osgDB::Registry there is a setBuildKdTreesHint(..) method that you can use. Robert. On Tue, Jul 27, 2010 at 7:25 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Since I didn't receive any input or feedback on my previous inquiry, I'm assuming no one has used osgSim very much in an extensive setting.?.? At any rate, I've done some further investigation. It appears that performance is very poor when HAT inquiries are randomly called
Re: [osg-users] osgSim HeightAboveTerrain performance...
Robert, Just as a follow up on the issue at hand, I bumped up the maximum number of files to cache in the DatabaseCacheReadCallback to a higher number than the default 2000. This greatly improved performance. I'm supposing that since there were not as many external paged tiles being read in from disk, this accounted for the performance improvement. This would seem to collaborate your earlier statement that the synchronous load of external tiles was possibly the culprit for my performance degradation... 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: Friday, August 20, 2010 8:48 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shayne, The LOS and HAT techniques use the osgUtil::IntersectionVisitor and LineSegmentIntersector to the intersection work, and by default add a special callback DatabaseCacheReadCallback that enables the intersection traversal to load external tiles when tiles aren't already in memory. This load is synchronous so it may well be that this is causing the performance hit. You could you try using the basic osgUtil::IntersectionVisitor and LineSegmentIntersector, this won't automatically load higher levels of details, making do with just what is loaded into memory already, but it will at least not require an IO. Robert. On Fri, Aug 20, 2010 at 3:35 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, If I'm using this KdTree feature correctly then perhaps the next step is digging down deeper with a debugger. In my app, I'm collecting both HAT and LOS data on a per frame basis on the terrain. I've narrowed it down to where the intersections are calculated for the LOS set. It appears I get a significant performance hit when I invoke the call: los.computeIntersections(terrain.get()); where terrain is a pagedLOD VPB database and los is an osgSim:LineOfSight class. Once I comment this call out, performance is where it should be. This would seem to suggest that there's no bottleneck outside the ray/triangle intersection but that there are issues with the intersection calculations themselves for LOS... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, August 20, 2010 2:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shayne, If KdTree aren't helping performance then you either have a bottleneck outside the actual ray to triangle intersection, or perhaps the KdTree's aren't being assigned correctly. Might I suggest you walk through the code in a debugger to see what is going on. Robert. On Thu, Aug 19, 2010 at 10:41 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, Sorry it has been long giving feedback on this. I've been working other issues. I did try the KdTrees stuff you suggested without any improvement in performance. I called osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter::Option s::BUILDKDTREES); before I load my terrain database. Is this the correct way to do this? Is there anything else I need to do to enable this or get this to work? In some respects things got even slower than before when I try LOS intersection calculations via the osgSim::LineOfSight class... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, July 28, 2010 2:47 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shyane, I've not been at my desk too consistently this last few weeks due to school holidays, so not able to dig down into all threads. A couple of general comments. If intersections are slow then consider enabling the building KdTree's on your scene graph, this will greatly improve performance. In osgDB::Options and osgDB::Registry there is a setBuildKdTreesHint(..) method that you can use. Robert. On Tue, Jul 27, 2010 at 7:25 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Since I didn't receive any input or feedback on my previous inquiry, I'm assuming no one has used osgSim very much in an extensive setting.?.? At any rate, I've done some further investigation. It appears that performance is very poor when HAT inquiries are randomly called in different portions of the code via the osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) method. On the other hand, if HAT points via hat.addPoint() are collected up and then computed (intersections) in one place, performance improves. I'm assuming that this is the correct usage
Re: [osg-users] osgSim HeightAboveTerrain performance...
Robert, Sorry it has been long giving feedback on this. I've been working other issues. I did try the KdTrees stuff you suggested without any improvement in performance. I called osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter::Option s::BUILDKDTREES); before I load my terrain database. Is this the correct way to do this? Is there anything else I need to do to enable this or get this to work? In some respects things got even slower than before when I try LOS intersection calculations via the osgSim::LineOfSight class... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, July 28, 2010 2:47 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osgSim HeightAboveTerrain performance... Hi Shyane, I've not been at my desk too consistently this last few weeks due to school holidays, so not able to dig down into all threads. A couple of general comments. If intersections are slow then consider enabling the building KdTree's on your scene graph, this will greatly improve performance. In osgDB::Options and osgDB::Registry there is a setBuildKdTreesHint(..) method that you can use. Robert. On Tue, Jul 27, 2010 at 7:25 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Since I didn't receive any input or feedback on my previous inquiry, I'm assuming no one has used osgSim very much in an extensive setting.?.? At any rate, I've done some further investigation. It appears that performance is very poor when HAT inquiries are randomly called in different portions of the code via the osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) method. On the other hand, if HAT points via hat.addPoint() are collected up and then computed (intersections) in one place, performance improves. I'm assuming that this is the correct usage for OSG? If this is true, I must say that this is a major problem since HAT inquiries need to be done at different times throughout the application due to dependencies on HAT for other calculations. I would like some feedback from someone in the know on osgSim so I know what the proper usage is for maximum performance. If it is true that all HAT points in OSG need to be consolidated for intersection calculation, then I will attempt to refactor the code to support what OSG wants. Thanks, -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, July 23, 2010 10:57 AM To: OpenSceneGraph Users Subject: [osg-users] osgSim HeightAboveTerrain performance... All, I was wanting some feedback for those who have used osgSim in querying VPB database info such has HAT, LOS, etc., during runtime. I'm seeing some performance issues when using osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) to get the HAT value for a particular location in the database. At times, we need multiple HAT values per frame which seems to bog the performance down. I would surmise that LOS calculations are probably worse since multiple intersections are computed. My question is, is how efficient is the osgSim HAT function? Is the process of retrieving HAT a slow one? If so, is there a way to improve performance if one or more HAT requests are issued on a per frame basis? Thanks in advance, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgSim HeightAboveTerrain performance...
Since I didn't receive any input or feedback on my previous inquiry, I'm assuming no one has used osgSim very much in an extensive setting.?.? At any rate, I've done some further investigation. It appears that performance is very poor when HAT inquiries are randomly called in different portions of the code via the osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) method. On the other hand, if HAT points via hat.addPoint() are collected up and then computed (intersections) in one place, performance improves. I'm assuming that this is the correct usage for OSG? If this is true, I must say that this is a major problem since HAT inquiries need to be done at different times throughout the application due to dependencies on HAT for other calculations. I would like some feedback from someone in the know on osgSim so I know what the proper usage is for maximum performance. If it is true that all HAT points in OSG need to be consolidated for intersection calculation, then I will attempt to refactor the code to support what OSG wants. Thanks, -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, July 23, 2010 10:57 AM To: OpenSceneGraph Users Subject: [osg-users] osgSim HeightAboveTerrain performance... All, I was wanting some feedback for those who have used osgSim in querying VPB database info such has HAT, LOS, etc., during runtime. I'm seeing some performance issues when using osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) to get the HAT value for a particular location in the database. At times, we need multiple HAT values per frame which seems to bog the performance down. I would surmise that LOS calculations are probably worse since multiple intersections are computed. My question is, is how efficient is the osgSim HAT function? Is the process of retrieving HAT a slow one? If so, is there a way to improve performance if one or more HAT requests are issued on a per frame basis? Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgSim HeightAboveTerrain performance...
All, I was wanting some feedback for those who have used osgSim in querying VPB database info such has HAT, LOS, etc., during runtime. I'm seeing some performance issues when using osgSim::HeightAboveTerrain::computeHeightAboveTerrain(.) to get the HAT value for a particular location in the database. At times, we need multiple HAT values per frame which seems to bog the performance down. I would surmise that LOS calculations are probably worse since multiple intersections are computed. My question is, is how efficient is the osgSim HAT function? Is the process of retrieving HAT a slow one? If so, is there a way to improve performance if one or more HAT requests are issued on a per frame basis? Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 3D software for OSG objects and general licensingquestion
Peter, I'm not a modeler per se, but using either 3D Studio Max (3ds file format) or the Multigen-Paradigm (flt file format) tools would work well. OSG will allow you to import these popular file formats into OSG for rendering. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Peter Sonnek Sent: Friday, July 23, 2010 12:30 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] 3D software for OSG objects and general licensingquestion Hello OSG and user community, I am new to OSG and would like to ask for advice on additional 3D software for creating OSG objects and licensing issues. I was asked to look into the possibility to create a 3D first person walk through of a large research facility by my colleges at University. I have made my self a little familiar with OSG through some of the examples posted and believe it may be a viable tool to achieve this goal. For this I will have to create several realistic looking buildings and scientific apparatus and I would like to do so using a 3rd party 3D studio (to avoid having to do it all with programing it from GL primitives). I have not worked with these studios before but the OSG website mentions several which are compatible with OSG. Could anyone make a suggestion on which will be useful for my purposes so I can make an informed purchase? Also, when finished, the software will be offered for public download as part of the outreach program for this facility. The facility is non-profit and government funded and the release will be free of charge through its collaboration. From what I have read the OSG license supports this without royalty fees or restrictions, but I wanted to ask in case I have misinterpreted this. This is my first post to this mailing list and I want to apologize if it is not in conformation with posting standards or rules. Thank you for your help and suggestions. I am looking forward to productive work with the OSG software. bye Peter -- Open WebMail Project (http://openwebmail.org) Debian Project (http://www.debian.org) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: Re: floating point exeption in VPB...
JP, Thanks for the info. So I guess we can conclude that this is an esoteric problem.?.? Have you tried VPB 0.9.10 with different versions of GDAL? I may try that and see what happens (I'm using GDAL 1.7.2). I know it fails on both Linux 64 bit and 32 bit i386 (Fedora 10). I haven't tried it with Windows but it sounds like you have. I'm glad you guys came up with a fix...:) -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, July 14, 2010 12:40 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Hi Shayne, On 13/07/10 23:34, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: Just a follow up email...the fix that Bernardt proposed in SourceData.cpp of the VPB code, seems to have fixed the problem. I don't have any issues building my database with VPB 0.9.10 now. This seems like a pretty blatant problem so I'm somewhat surprised that this problem hasn't come on the radar screen of the OSG community in general... Bernardt I have speculated that it might be some floating point representation issue with various gdal libs or maybe the intersection code. We've built many databases using the same dataset on a Linux cluster, with a range of vpb versions, and have never encountered this problem. In the last week Bernardt tried to build on a Windows machine to enable a client to build some terrains for themselves and encountered this problem. rgds jp -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, July 13, 2010 10:01 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Bernardt, Thanks much for that input. I definitely ruled out that my problem was due to the 64-bit architecture because I was able to reproduce it on 32-bit Linux using VPB 0.9.10. Using the same tif file, I did not see this problem using VPB 0.9.7. I will try your fix to see if that works for my situation. I will report the results. Your contribution is most appreciated... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bernardt Duvenhage Sent: Tuesday, July 13, 2010 7:07 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Hi Shayne I'm experiencing a similar problem. The SourceData::readImage(...) method in \src\vpb\SourceData.cpp gives a destWidth and readWidth of zero which results in a tempImage of zero size (tempImage = new unsigned char[readWidth*readHeight*pixelSpace]). This is due to (I think) a failure of the two pass 360-degree shift test for intersection of the destination and source bounding boxes. The intersection is tested for 'valid()', but might still be of zero size. I adapted the 'if (!intersect_bb.valid())' test as shown below and it seems to work now. if ((!intersect_bb.valid()) || (intersect_bb.xMin()==intersect_bb.xMax()) ) { log(osg::INFO,Reading image but it does not intersect destination - ignoring); continue; } I'm building a simple terrain with BMNG data only. The destination bb is therefore (-180,180]. The intersection test however generates a valid intersection for the B1 tiff which is at (-270,-180] at some stage in the two pass test. The generated intersection is valid, but of zero size and hence the added condition in the above if. I attach my SourceData.cpp as reference. Regards, Bernardt J.P. Delportjpdelp...@csir.co.za 07/13/10 2:37 PM = Bernardt Duvenhage Senior Researcher: Optronic Sensor Systems South African Council for Scientific and Industrial Research (CSIR) Tel: +27 12 841 2414 Original Message Subject: Re: [osg-users] floating point exeption in VPB... Date: Mon, 12 Jul 2010 11:05:19 -0600 From: Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil Reply-To: OpenSceneGraph Usersosg-users@lists.openscenegraph.org To: OpenSceneGraph Usersosg-users@lists.openscenegraph.org Robert, After running osgdem in the debugger, it is crashing in gdalrasterband.cpp where an integer divide by zero is happening. Tracing up further, it appears that in the method SourceData::readImage(...) in SourceData.cpp, the variable destWidth is coming in as zero. Interestingly, the first pass through the loop in that method yields a destWidth of 256. On the next time around, it is zero which is causing the crash in GDAL. The .tif file is a file that I have used before with osgdem on another machined with no problems so I know the image file is good. I will try to dig further to get more on what's happening
Re: [osg-users] Fwd: Re: floating point exeption in VPB...
Bernardt, Thanks much for that input. I definitely ruled out that my problem was due to the 64-bit architecture because I was able to reproduce it on 32-bit Linux using VPB 0.9.10. Using the same tif file, I did not see this problem using VPB 0.9.7. I will try your fix to see if that works for my situation. I will report the results. Your contribution is most appreciated... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bernardt Duvenhage Sent: Tuesday, July 13, 2010 7:07 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Hi Shayne I'm experiencing a similar problem. The SourceData::readImage(...) method in \src\vpb\SourceData.cpp gives a destWidth and readWidth of zero which results in a tempImage of zero size (tempImage = new unsigned char[readWidth*readHeight*pixelSpace]). This is due to (I think) a failure of the two pass 360-degree shift test for intersection of the destination and source bounding boxes. The intersection is tested for 'valid()', but might still be of zero size. I adapted the 'if (!intersect_bb.valid())' test as shown below and it seems to work now. if ((!intersect_bb.valid()) || (intersect_bb.xMin()==intersect_bb.xMax()) ) { log(osg::INFO,Reading image but it does not intersect destination - ignoring); continue; } I'm building a simple terrain with BMNG data only. The destination bb is therefore (-180,180]. The intersection test however generates a valid intersection for the B1 tiff which is at (-270,-180] at some stage in the two pass test. The generated intersection is valid, but of zero size and hence the added condition in the above if. I attach my SourceData.cpp as reference. Regards, Bernardt J.P. Delport jpdelp...@csir.co.za 07/13/10 2:37 PM = Bernardt Duvenhage Senior Researcher: Optronic Sensor Systems South African Council for Scientific and Industrial Research (CSIR) Tel: +27 12 841 2414 Original Message Subject: Re: [osg-users] floating point exeption in VPB... Date: Mon, 12 Jul 2010 11:05:19 -0600 From: Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil Reply-To: OpenSceneGraph Users osg-users@lists.openscenegraph.org To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Robert, After running osgdem in the debugger, it is crashing in gdalrasterband.cpp where an integer divide by zero is happening. Tracing up further, it appears that in the method SourceData::readImage(...) in SourceData.cpp, the variable destWidth is coming in as zero. Interestingly, the first pass through the loop in that method yields a destWidth of 256. On the next time around, it is zero which is causing the crash in GDAL. The .tif file is a file that I have used before with osgdem on another machined with no problems so I know the image file is good. I will try to dig further to get more on what's happening... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Saturday, July 10, 2010 3:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] floating point exeption in VPB... Hi Shayne, I develop under 64bit system and haven't encountered any floating point exceptions issues with 64bit build of VPB. Could you please run osgdem in a debugger and see what happens. Could you also update to svn/trunk for OSG and VPB to see if the problem persists. Robert. On Thu, Jul 8, 2010 at 11:01 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm using VPB 0.9.10 along with OSG 2.8.2 on a system that is using 64-bit Linux (Fadora core 10) i386. Both packages were built from source. No matter what database I try to build, I get a floating point exception when running osgdem. I know the DTED and imagery are good since I've built VPB databases with this content on a windows 32-bit system. Here is a sample command that fails: osgdem -TERRAIN -geocentric -PagedLOD -whole-globe -t wholeearthtexture.tif -l 10 -o output.ive My question is, has anyone else seen problems with VPB in a similar environment. Are there some 64-bit issues going on here? I'm at a loss as to why I'm getting this floating point exception. If I use any other content (i.e. dted or imagery), I get the same results. Any help or input would be most appreciated. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject
Re: [osg-users] Fwd: Re: floating point exeption in VPB...
Just a follow up email...the fix that Bernardt proposed in SourceData.cpp of the VPB code, seems to have fixed the problem. I don't have any issues building my database with VPB 0.9.10 now. This seems like a pretty blatant problem so I'm somewhat surprised that this problem hasn't come on the radar screen of the OSG community in general... -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, July 13, 2010 10:01 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Bernardt, Thanks much for that input. I definitely ruled out that my problem was due to the 64-bit architecture because I was able to reproduce it on 32-bit Linux using VPB 0.9.10. Using the same tif file, I did not see this problem using VPB 0.9.7. I will try your fix to see if that works for my situation. I will report the results. Your contribution is most appreciated... Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bernardt Duvenhage Sent: Tuesday, July 13, 2010 7:07 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... Hi Shayne I'm experiencing a similar problem. The SourceData::readImage(...) method in \src\vpb\SourceData.cpp gives a destWidth and readWidth of zero which results in a tempImage of zero size (tempImage = new unsigned char[readWidth*readHeight*pixelSpace]). This is due to (I think) a failure of the two pass 360-degree shift test for intersection of the destination and source bounding boxes. The intersection is tested for 'valid()', but might still be of zero size. I adapted the 'if (!intersect_bb.valid())' test as shown below and it seems to work now. if ((!intersect_bb.valid()) || (intersect_bb.xMin()==intersect_bb.xMax()) ) { log(osg::INFO,Reading image but it does not intersect destination - ignoring); continue; } I'm building a simple terrain with BMNG data only. The destination bb is therefore (-180,180]. The intersection test however generates a valid intersection for the B1 tiff which is at (-270,-180] at some stage in the two pass test. The generated intersection is valid, but of zero size and hence the added condition in the above if. I attach my SourceData.cpp as reference. Regards, Bernardt J.P. Delport jpdelp...@csir.co.za 07/13/10 2:37 PM = Bernardt Duvenhage Senior Researcher: Optronic Sensor Systems South African Council for Scientific and Industrial Research (CSIR) Tel: +27 12 841 2414 Original Message Subject: Re: [osg-users] floating point exeption in VPB... Date: Mon, 12 Jul 2010 11:05:19 -0600 From: Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil Reply-To: OpenSceneGraph Users osg-users@lists.openscenegraph.org To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Robert, After running osgdem in the debugger, it is crashing in gdalrasterband.cpp where an integer divide by zero is happening. Tracing up further, it appears that in the method SourceData::readImage(...) in SourceData.cpp, the variable destWidth is coming in as zero. Interestingly, the first pass through the loop in that method yields a destWidth of 256. On the next time around, it is zero which is causing the crash in GDAL. The .tif file is a file that I have used before with osgdem on another machined with no problems so I know the image file is good. I will try to dig further to get more on what's happening... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Saturday, July 10, 2010 3:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] floating point exeption in VPB... Hi Shayne, I develop under 64bit system and haven't encountered any floating point exceptions issues with 64bit build of VPB. Could you please run osgdem in a debugger and see what happens. Could you also update to svn/trunk for OSG and VPB to see if the problem persists. Robert. On Thu, Jul 8, 2010 at 11:01 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm using VPB 0.9.10 along with OSG 2.8.2 on a system that is using 64-bit Linux (Fadora core 10) i386. Both packages were built from source. No matter what database I try to build, I get a floating point exception when running osgdem. I know the DTED and imagery are good since I've built VPB databases with this content on a windows 32-bit system. Here is a sample command that fails: osgdem -TERRAIN -geocentric -PagedLOD -whole-globe -t wholeearthtexture.tif -l 10 -o output.ive My question is, has anyone else seen problems with VPB in a similar environment
Re: [osg-users] floating point exeption in VPB...
Robert, After running osgdem in the debugger, it is crashing in gdalrasterband.cpp where an integer divide by zero is happening. Tracing up further, it appears that in the method SourceData::readImage(...) in SourceData.cpp, the variable destWidth is coming in as zero. Interestingly, the first pass through the loop in that method yields a destWidth of 256. On the next time around, it is zero which is causing the crash in GDAL. The .tif file is a file that I have used before with osgdem on another machined with no problems so I know the image file is good. I will try to dig further to get more on what's happening... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Saturday, July 10, 2010 3:30 AM To: OpenSceneGraph Users Subject: Re: [osg-users] floating point exeption in VPB... Hi Shayne, I develop under 64bit system and haven't encountered any floating point exceptions issues with 64bit build of VPB. Could you please run osgdem in a debugger and see what happens. Could you also update to svn/trunk for OSG and VPB to see if the problem persists. Robert. On Thu, Jul 8, 2010 at 11:01 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm using VPB 0.9.10 along with OSG 2.8.2 on a system that is using 64-bit Linux (Fadora core 10) i386. Both packages were built from source. No matter what database I try to build, I get a floating point exception when running osgdem. I know the DTED and imagery are good since I've built VPB databases with this content on a windows 32-bit system. Here is a sample command that fails: osgdem -TERRAIN -geocentric -PagedLOD -whole-globe -t wholeearthtexture.tif -l 10 -o output.ive My question is, has anyone else seen problems with VPB in a similar environment. Are there some 64-bit issues going on here? I'm at a loss as to why I'm getting this floating point exception. If I use any other content (i.e. dted or imagery), I get the same results. Any help or input would be most appreciated. -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hi Lucie, Did you attempt to reproject the tif file using gdalwarp? Try that and then use osgdem with the new reprojected file to see if that works. I didn't receive your attachment. Please resend to shayne.tuel...@comcast.net and I'll take a look at it. If you can, send me the actual tif and dt1 files... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie lemonnier Sent: Thursday, July 08, 2010 9:45 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] [vpb] .tif and .tfw Hi, I also tried with dem and orthoimage downloaded at: http://www.geobase.ca/geobase/en/index.html I get the same problem, the projection doesn't work. With gdal_info data.dem, I get : Driver: USGSDEM/USGS Optional ASCII DEM (and CDED) Files: 013c07_0100_deme.dem Size is 1201, 1201 Coordinate System is: GEOGCS[NAD83, DATUM[North_American_Datum_1983, SPHEROID[GRS 1980,6378137,298.257222101, AUTHORITY[EPSG,7019]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[EPSG,6269]], PRIMEM[Greenwich,0, AUTHORITY[EPSG,8901]], UNIT[degree,0.0174532925199433, AUTHORITY[EPSG,9108]], AXIS[Lat,NORTH], AXIS[Long,EAST], AUTHORITY[EPSG,4269]] Origin = (-60.75010416667,52.50010416667) Pixel Size = (0.0002083,-0.0002083) Metadata: AREA_OR_POINT=Point Corner Coordinates: Upper Left ( -60.7501042, 52.5001042) ( 60d45'0.38W, 52d30'0.38N) Lower Left ( -60.7501042, 52.2498958) ( 60d45'0.38W, 52d14'59.63N) Upper Right ( -60.4998958, 52.5001042) ( 60d29'59.63W, 52d30'0.38N) Lower Right ( -60.4998958, 52.2498958) ( 60d29'59.63W, 52d14'59.63N) Center ( -60.625, 52.375) ( 60d37'30.00W, 52d22'30.00N) Band 1 Block=1201x1201 Type=Int16, ColorInterp=Undefined NoData Value=-32767 Unit Type: m and with gdal_info data.tif, I get : Driver: GTiff/GeoTIFF Files: S4_06032_5215_20061018_m20_1_utm20.tif Size is 3826, 3622 Coordinate System is: PROJCS[unnamed, GEOGCS[NAD83, DATUM[North_American_Datum_1983, SPHEROID[GRS 1980,6378137,298.2572221010002, AUTHORITY[EPSG,7019]], AUTHORITY[EPSG,6269]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4269]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,-63], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,50], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,26920]] Origin = (630040.000,5828260.000) Pixel Size = (20.000,-20.000) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 630040.000, 5828260.000) ( 61d 4'49.40W, 52d35'19.68N) Lower Left ( 630040.000, 5755820.000) ( 61d 6'29.89W, 51d56'16.38N) Upper Right ( 706560.000, 5828260.000) ( 59d57'8.07W, 52d33'54.44N) Lower Right ( 706560.000, 5755820.000) ( 59d59'47.44W, 51d54'53.11N) Center ( 668300.000, 5792040.000) ( 60d32'3.63W, 52d15'10.72N) Band 1 Block=3826x2 Type=Byte, ColorInterp=Gray I don't understand why it doesn't work. I tried with --geocentric and without. I'm sending you what I obtain with osgdem --geocentric -d data.dem -t data.tif -l 3 -o data.osg in attachment. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29838#29838 Attachments: http://forum.openscenegraph.org//files/terrain_328.jpg ___ 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] floating point exeption in VPB...
All, I'm using VPB 0.9.10 along with OSG 2.8.2 on a system that is using 64-bit Linux (Fadora core 10) i386. Both packages were built from source. No matter what database I try to build, I get a floating point exception when running osgdem. I know the DTED and imagery are good since I've built VPB databases with this content on a windows 32-bit system. Here is a sample command that fails: osgdem -TERRAIN -geocentric -PagedLOD -whole-globe -t wholeearthtexture.tif -l 10 -o output.ive My question is, has anyone else seen problems with VPB in a similar environment. Are there some 64-bit issues going on here? I'm at a loss as to why I'm getting this floating point exception. If I use any other content (i.e. dted or imagery), I get the same results. Any help or input would be most appreciated. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Have you tried using the --geocentric flag? I've used .tif files before just fine but they were georeferenced. Try running gdalinfo data.tif to see what projection the file is using. If it's not geocentric, you can reproject the data by gdalwarp -t_srs +proj=latlong +datum=WGS84 -r bilinear data.tif data2.tif then try using osgdem --geocentric -d data.dt1 -t data2.tif -l 3 -o data.ive -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of lucie lemonnier Sent: Wednesday, July 07, 2010 9:29 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] .tif and .tfw Hi, I have a file of elevation data DTED and an orthoimage .tif with a .tfw file. A .tfw file is used to georeference a .tif file. When I use osgdem -d data.dt1 -l 3 -o data.osg, I get a terrain model without texture and when I use osgdem -d data.dt1 -t data.tif -l 3 -o data.osg, the projection of the orthoimage isn't correct. Does anyone know how to use .tif with .tfw with VPB? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29792#29792 ___ 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] looking for a terrain database building
Chris, I'd definitely be interested in your terrain tools when you release them... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: Friday, April 02, 2010 7:30 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] looking for a terrain database building On 4/2/2010 7:20 AM, Torben Dannhauer wrote: Hi, modifying source data is the approach I plan. For elevation data I'm in discussion with some colleagues for an algorithy which outputs elevation per vertice wich results, if applied to the ellipsoid of the geocentric database, a flat area. Maybe this approach could be extendet to provide arbitrariy elevation modification. The other aspect I'd like to understand is the modification during runtime. except the modified database dynamic modification would be great for placing dynamic objects. I've done modification of terrain elevation data at build time (both to the source GIS data, as well as within VPB), at post-build convert-time, and at run-time (during load and post-load). I'm working on packaging up some terrain tools that provide the framework for doing (some of) the above. It hasn't been published yet because it relied on some changes that Robert didn't accept into OSG, so I have to rework the structure to operate in a more supported fashion. But, I anticipate getting it out there this month. Cheers, Torben -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Off Topic: EPX-50 Anyone know anything about these?
Brian, What info are you looking for in particular? I had some exposure to the EPX product a while back while working at Evans Sutherland (now bought out by Rockwell-Collins). That was about 6 years ago so I'm sure things have evolved since that time. At that time, it was an IG that used COTS graphics hardware. I believe that is still the case. It's their lower end IG product which is competitive with most other products out there that employ a similar strategy. I personally like the EPX stuff but then I'm a little biased...:) http://www.rockwellcollins.com/service/simulation/visual-products/image-gene rators/epx-50/index.html -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brian ... Sent: Friday, March 12, 2010 1:33 PM To: OpenSceneGraph Users Subject: [osg-users] Off Topic: EPX-50 Anyone know anything about these? Folks, I'm looking for any info I can find on the Rockwell Collins EPX-50. One of our marketing guys wants to move our visual applications to these. We currently run osg on commodity hardware. Brian Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. Learn More. http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON: WL:en-US:WM_HMP:032010_1 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] managing views in composite viewer...
All, I have a need to turn certain views on and off in a composite viewer during runtime. I know that the composite viewer has the capability of adding and removing views but I'm not sure this is the proper mechanism to use for what I want to do. The views I want to manage sit on top of a background view so when I want to turn them off, they need to behave as though they aren't even there (i.e. no blank regions). My question is, is adding and removing the views during runtime the way to go or is there a more efficient/elegant way of turning my views on and off? Is there an equivalent of a switch node for managing views in a composite viewer? Hopefully the description of my dilemma above is clear. Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] managing views in composite viewer...
J-S, Thanks for the input. Controlling the node mask does the trick...:) Thank you! -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, March 11, 2010 11:28 AM To: OpenSceneGraph Users Subject: Re: [osg-users] managing views in composite viewer... Hi Shayne, My question is, is adding and removing the views during runtime the way to go or is there a more efficient/elegant way of turning my views on and off? Is there an equivalent of a switch node for managing views in a composite viewer? To add/remove views at runtime you have to stop threading in the viewer, which is a pretty major disruption. Instead, you can just set the view's camera's node mask to 0. view-getCamera()-setNodeMask(0) This means the camera won't be traversed and thus it won't draw anything, which is what you want. When you want to re-enable the view, set its node mask to 0x. view-getCamera()-setNodeMask(0x) Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 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] no osgTerrain showing up on Linux...
All, I'm seeing a problem that I'm hoping someone can shed some light on. I have an application that uses an OSG viewer (OSG version 2.8.2) embedded in a GLUT window. This application runs on both Windows XP and Linux (currently using RHEL 5.4). The machine is dual boot so the hardware is the same in both cases. The embedded OSG viewer is rendering a database which includes a VPB terrain using osgTerrain. When I run this application on Windows, everything (terrain, models, sky, etc.) renders fine. However, when I run the same application on Linux, using the same database, the terrain does not show up at all. I've verified that the terrain is being read in and added to the scenegraph as usual, but it is not being rendered for some strange reason on Linux when viewer-frame() is called. Everything else renders just fine in the rendering loop. Is there something special I need to do for Linux in the application to get the terrain to render? At this point, I'm at a loss as to what is causing this problem. For a sanity check, I've looked at the terrain database using osgViewer on the Linux box and everything renders fine. Is GLUT causing problems on Linux that aren't seen on Windows for rendering the terrain? Is there something else I can do to debug this problem on Linux? Any help or input would most appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] no osgTerrain showing up on Linux...
Robert, I appreciate the reply. Like you, I'm perplexed as to what is going on with this app on Linux when it comes to rendering the terrain. I understand the issues and shortcomings with using GLUT. We eventually plan on porting our whole application to using osgViewer and getting rid of GLUT altogether. Unfortunately, for the time being (due to scheduling constraints), we're having to use the viewer embedded in the GLUT window for our 3D view. At the moment, this is our interim solution for using OSG in our application for the 3D rendering. Do you have any suggestions on how I can further debug this problem? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, March 05, 2010 10:01 AM To: OpenSceneGraph Users Subject: Re: [osg-users] no osgTerrain showing up on Linux... Hi Shayne, There isn't nothing platform specific about osgTerrain, and I do all my dev and testing of osgTerrain under Linux. There shouldn't be any correlation between GLUT and osgTerrain either. I'm afraid I no explanation for your findings. What I can say is that GLUT is a truely awful API and shouldn't be used anywhere any modern graphics application. It was written for tiny OpenGL demos, and long exceeded it's intended life a decade ago, let alone now, it's survived not because it's actually any good, but because well... lots of people copied those early demos. osgViewer itself is a far better tool for a modern graphics application. Might I suggest you use it rather than GLUT. Robert. On Fri, Mar 5, 2010 at 4:55 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm seeing a problem that I'm hoping someone can shed some light on. I have an application that uses an OSG viewer (OSG version 2.8.2) embedded in a GLUT window. This application runs on both Windows XP and Linux (currently using RHEL 5.4). The machine is dual boot so the hardware is the same in both cases. The embedded OSG viewer is rendering a database which includes a VPB terrain using osgTerrain. When I run this application on Windows, everything (terrain, models, sky, etc.) renders fine. However, when I run the same application on Linux, using the same database, the terrain does not show up at all. I've verified that the terrain is being read in and added to the scenegraph as usual, but it is not being rendered for some strange reason on Linux when viewer-frame() is called. Everything else renders just fine in the rendering loop. Is there something special I need to do for Linux in the application to get the terrain to render? At this point, I'm at a loss as to what is causing this problem. For a sanity check, I've looked at the terrain database using osgViewer on the Linux box and everything renders fine. Is GLUT causing problems on Linux that aren't seen on Windows for rendering the terrain? Is there something else I can do to debug this problem on Linux? Any help or input would most appreciated. Thanks, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] freetype fonts on Windows...
All, Thanks for all your help. Given the suggestions, we were able to track down the problem. It was a mix up between using the Release version vs. the Debug version of the freetype lib. The suggestion of using OSG Notify was very helpful for tracking the problem down. Thanks again. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomlinson, Gordon Sent: Tuesday, February 23, 2010 4:59 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... HI Has the freetype library and its dependancies been build with the same compiler, patches and re-distributables as your application and no mixing of release or debug libs? As in the past this has been the problem for many Also a goolgle or archive search should throw similar responses that others have had with freetype Gordon Tomlinson Product Manager 3d Technology Future Products Overwatch(r) An Operating Unit of Textron Systems -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, February 23, 2010 6:34 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... Thanks guys. We'll investigate it more given the suggestions. It's probably something silly we're failing to do... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Simon Hammett Sent: Tuesday, February 23, 2010 4:25 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... On 23 February 2010 23:17, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Mourad, Yes. We know the path setting is correct because we can use the other plugin dlls that reside in the folder without any problems. Thanks for the input. -Shayne FYI, my build of freetype-2.3.9 is just static libs, no dlls. So my osg plugin is obv. using just those libs. Been ages since I built it, so I forget the details: but if you get desperate I can send you the solutions and vcproj files for freetype the osg freetype plugin. Then again, I'm pretty sure I didn't do anything special to get it to work. So you must be a muppet! ;) -- http://www.ssTk.co.uk ___ 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] Changing scenes on the fly
I haven't done what you're wanting to do. I only support the case where I have multiple scenes that I add before I enter the rendering loop. I then switch to whatever one I want during the rendering. Obviously this is trivial. Rendering more than one at the same time with the effect you want is more problematic. Perhaps someone else could offer some input here. Whatever you attach before the rendering traversal will get rendered. I suppose you could load up all your osg files into nodes and then attach the nodes you want to render on the fly, per your suggestion, and see what happens. I don't know how you would fade between two scenes. Maybe use RTT with FBOs and do linear interpolation between them or employ some sort of a shader.?.? Just some rambling thoughts... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce Wheaton Sent: Monday, February 22, 2010 6:20 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Changing scenes on the fly Thanks, I have seen Switch nodes. Some wrinkles though - I need a dynamic system, and there may be multiples active at a time, for instance in between a cross-fade. But my main question still applies - should I load the .osg file and attach the whole graph downstream of the switch on the fly? Bruce On Feb 22, 2010, at 4:02 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/ MXDEC wrote: Bruce, I would recommend using the switch node osg::Switch to change between scenegraphs. You can add the scenegraphs that the switch node can render at any one time during setup and then select which one you want rendered using the method setSingleChildOn. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce Wheaton Sent: Monday, February 22, 2010 11:33 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Changing scenes on the fly What's the recommended way to change scenes? I'll have a static setup of multiple cameras, then need to change what scene is being viewed. I feel that one big issue is the scale of the scene I want to load, so I guess I need a master PAT, which I may have to add, since I need to keep the setup up on a few different cameras. Is it best to switch the whole scene, or add the scene's top node as a child of my existing graph? I should add that I'll have multiple scenes, if for nothing else than to cross-fade between the two scenes. Am I answering my own question then? I need a master node, maybe a switch, a PAT for each scene, then load the scene and place it as a child of the PAT node? Let me guess - there's an example that shows this exact thing? Thanks, Bruce Wheaton ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] freetype fonts on Windows...
All, We're having some issues with the OSG freetype font plugin? We're using VC++ 2008 on Windows and we're having trouble reading ttf files. We get the message could not find plugin to read objects from file arial.ttf. The plugin is in the OSG solution but it doesn't seem to be getting registered. The plugin appears to build fine and the dll resides in the plugins directory. Can someone enlighten us on what we need to do to get the true type font plugin to work? Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] freetype fonts on Windows...
It's in the same place as the other plugins. The other plugins appear to work fine. It's only with this one that things don't work. We'll look at the module load messages to see if that will clue us into what's going on... Thanks for the help, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Simon Hammett Sent: Tuesday, February 23, 2010 3:43 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... On 23 February 2010 22:23, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, We're having some issues with the OSG freetype font plugin? We're using VC++ 2008 on Windows and we're having trouble reading ttf files. We get the message could not find plugin to read objects from file arial.ttf. The plugin is in the OSG solution but it doesn't seem to be getting registered. The plugin appears to build fine and the dll resides in the plugins directory. Can someone enlighten us on what we need to do to get the true type font plugin to work? Works fine for me. I don't think that osg does any magic about looking up a plugin directory. Is the plugin in an accessible place? It needs to be in any one of: The .exe directory, a directory in the PATH environment var, or the current directory Just look at the module load messages in the debug output window of VS to see of the plugin is being loaded. If it is then either the font file is buggered or your build of freetype is screwed up. -- http://www.ssTk.co.uk 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] freetype fonts on Windows...
Mourad, Yes. We know the path setting is correct because we can use the other plugin dlls that reside in the folder without any problems. Thanks for the input. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mourad Boufarguine Sent: Tuesday, February 23, 2010 4:05 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... Hi, did you add the folder containing the 3rdparty freetype dll to your path? Mourad On Tue, Feb 23, 2010 at 11:59 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: It's in the same place as the other plugins. The other plugins appear to work fine. It's only with this one that things don't work. We'll look at the module load messages to see if that will clue us into what's going on... Thanks for the help, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Simon Hammett Sent: Tuesday, February 23, 2010 3:43 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... On 23 February 2010 22:23, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, We're having some issues with the OSG freetype font plugin? We're using VC++ 2008 on Windows and we're having trouble reading ttf files. We get the message could not find plugin to read objects from file arial.ttf. The plugin is in the OSG solution but it doesn't seem to be getting registered. The plugin appears to build fine and the dll resides in the plugins directory. Can someone enlighten us on what we need to do to get the true type font plugin to work? Works fine for me. I don't think that osg does any magic about looking up a plugin directory. Is the plugin in an accessible place? It needs to be in any one of: The .exe directory, a directory in the PATH environment var, or the current directory Just look at the module load messages in the debug output window of VS to see of the plugin is being loaded. If it is then either the font file is buggered or your build of freetype is screwed up. -- http://www.ssTk.co.uk ___ 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] freetype fonts on Windows...
Thanks guys. We'll investigate it more given the suggestions. It's probably something silly we're failing to do... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Simon Hammett Sent: Tuesday, February 23, 2010 4:25 PM To: OpenSceneGraph Users Subject: Re: [osg-users] freetype fonts on Windows... On 23 February 2010 23:17, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Mourad, Yes. We know the path setting is correct because we can use the other plugin dlls that reside in the folder without any problems. Thanks for the input. -Shayne FYI, my build of freetype-2.3.9 is just static libs, no dlls. So my osg plugin is obv. using just those libs. Been ages since I built it, so I forget the details: but if you get desperate I can send you the solutions and vcproj files for freetype the osg freetype plugin. Then again, I'm pretty sure I didn't do anything special to get it to work. So you must be a muppet! ;) -- http://www.ssTk.co.uk 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] Changing scenes on the fly
Bruce, I would recommend using the switch node osg::Switch to change between scenegraphs. You can add the scenegraphs that the switch node can render at any one time during setup and then select which one you want rendered using the method setSingleChildOn. Hope this helps... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce Wheaton Sent: Monday, February 22, 2010 11:33 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Changing scenes on the fly What's the recommended way to change scenes? I'll have a static setup of multiple cameras, then need to change what scene is being viewed. I feel that one big issue is the scale of the scene I want to load, so I guess I need a master PAT, which I may have to add, since I need to keep the setup up on a few different cameras. Is it best to switch the whole scene, or add the scene's top node as a child of my existing graph? I should add that I'll have multiple scenes, if for nothing else than to cross-fade between the two scenes. Am I answering my own question then? I need a master node, maybe a switch, a PAT for each scene, then load the scene and place it as a child of the PAT node? Let me guess - there's an example that shows this exact thing? Thanks, Bruce Wheaton ___ 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] Survey: Is there interest for an OSG Users Group atITEC or I/ITSEC?
1) I/ITSEC 2) Yes -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brett Wiesner Sent: Tuesday, February 16, 2010 6:56 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Survey: Is there interest for an OSG Users Group atITEC or I/ITSEC? Hey everyone, I know a lot of OSG users are building things in the ModSim space and I know that two of the bigger industry conferences are ITEC (Europe) and I/ITSEC (USA). I was wondering how many people from this list go to either of those and if there is any interest in a OSG Users Group meeting? I was thinking it would be a great opportunity to meet other OSG users. Perhaps everyone can speak a little about what they are building with OSG and share some of their experiences. So, the questions are: 1) Do you go to ITEC and/ or I/ITSEC? (Please specify which one) 2) Would you go to a OSG Users Group Meeting? Thanks, Brett Wiesner -- Product Manager, VR-Vantage OSG Based Battlefield Information Station, Desktop IG and SDK http://www.VR-Vantage.com ___ 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] 2D rendering priority...
Brad, I'll look over your implementation. Thanks for sharing this...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Thursday, February 11, 2010 2:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, We used this approach for rendering a 2D scene using the painters algorithm (i.e. render back to front according to our own order definition). I have included the most relevent code snippets. No comments on their quality please ; ). 1) Added a 'user data' object (which contains the rendering priority) to each of our leaves. 2) As required, we run a 'RenderPriorityVisitor' over the scene to set the correct priorities into our user data objects. 3) Create a custom render bin and setup your 2D graph to use it: e.g. root2DstateSet-setRenderBinDetails(0, RenderBin2D::BIN_NAME, osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); We use OVERRIDE_RENDERBIN_DETAILS as some of the objects bellow the root of our 2D scene are also rendered in 3D, in which case they may already have different bin details set (e.g transparent bin). The key bit of the custom bin is setting the sort callback. This callback sorts the leaves based on the priority set in the 'user data' object. Hopefully this all makes sence. I implemented this code ~7 years ago so there may be a neater way to do this now, but it is still working well against the latest OSG releases. Cheers, Brad Code snippets: Custom Render Bin /** Automatically registers the bin prototype. */ static osgUtil::RegisterRenderBinProxy s_registerBin(RenderBin2D::BIN_NAME,new RenderBin2D()); RenderBin2D() { //extends RenderBin setSortCallback(new SortCallback2D()); } SortCallback2D void SortCallback2D::sortImplementation(osgUtil::RenderBin* renderBin) { renderBin-copyLeavesFromStateGraphListToRenderLeafList(); std::sort(renderBin-getRenderLeafList().begin(),renderBin-getRenderLea fList().end(),RenderPrioritySortFunctor()); } --- RenderPrioritySortFunctor int RenderPrioritySortFunctor::getRenderOrder(const osgUtil::RenderLeaf* leaf) const { const osg::Referenced* ud = leaf-getDrawable()-getUserData(); if(ud) { const DrawableData* data = dynamic_castconst DrawableData*(ud); return data-getRenderOrder(); } return 0; } bool RenderPrioritySortFunctor::operator() (const osg::Node* lhs,const osg::Node* rhs) const { int leftOrder = getRenderOrder(lhs); int rightOrder = getRenderOrder(rhs); if(m_sortMode == SORT_ASCENDING) { return leftOrder rightOrder; } else { //sort descending return leftOrder rightOrder; } } -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, 10 February 2010 11:49 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Brad, Please elaborate...:) I have not played with RenderBin so any code snippets/examples would be appreciated. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Wednesday, February 10, 2010 12:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, I use a RenderBin / NodeMask combination to exactly this and it works well. I can elaborate more if you wish. 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: Wednesday, 10 February 2010 8:18 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Paul, Thanks for the reply. We can have up to 57 levels of priority where each level could have 100-200 simple geometries (i.e. circles, squares, simple line primitives, etc.). It's very rare that all levels are on simultaneously but those that are on, need to stack in priority relative to every other level/group that is on. Realistically, we'll have around 10-15 levels being rendered at the same time. Hopefully this quantity/complexity won't present a problem. I really didn't have any reservations per se about using the RenderBin and NodeMask mechanisms. I suspected that I needed to use them but I wanted to ping the group just to make sure I was on the right track. When using OSG, it's always good to have a reality check before proceeding...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, February 09, 2010 4:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote
Re: [osg-users] 2D rendering priority...
Brad, Please elaborate...:) I have not played with RenderBin so any code snippets/examples would be appreciated. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Wednesday, February 10, 2010 12:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, I use a RenderBin / NodeMask combination to exactly this and it works well. I can elaborate more if you wish. 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: Wednesday, 10 February 2010 8:18 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Paul, Thanks for the reply. We can have up to 57 levels of priority where each level could have 100-200 simple geometries (i.e. circles, squares, simple line primitives, etc.). It's very rare that all levels are on simultaneously but those that are on, need to stack in priority relative to every other level/group that is on. Realistically, we'll have around 10-15 levels being rendered at the same time. Hopefully this quantity/complexity won't present a problem. I really didn't have any reservations per se about using the RenderBin and NodeMask mechanisms. I suspected that I needed to use them but I wanted to ping the group just to make sure I was on the right track. When using OSG, it's always good to have a reality check before proceeding...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, February 09, 2010 4:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: I have a need to render a bunch of 2D geometry groups that have different priorities for display (one group rendered on top of the other according to their priority). I also need to have the ability to turn the rendering off and on for some of the groups while maintaining rendering priority. How many different groups do you have, and what is the total data size of all the groups? I wanted some input or ideas on what might be the best way to handle this in OSG. So far I've looked at the RenderBin mechanism for possible priority rendering and the setNodeMask for turning rendering on and off. I'm not sure this is the most elegant way to accomplish what I need to do. In addition to setting the RenderBin, you'd need to disable depth test to get the painter's algorithm to work properly, of course. The RenderBin and NodeMask mechanisms seem like they're designed for just the tasks you describe. Can you elaborate on why you have reservations about their suitability? -Paul ___ 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 the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. -- ___ 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] 2D rendering priority...
All, I have a need to render a bunch of 2D geometry groups that have different priorities for display (one group rendered on top of the other according to their priority). I also need to have the ability to turn the rendering off and on for some of the groups while maintaining rendering priority. I wanted some input or ideas on what might be the best way to handle this in OSG. So far I've looked at the RenderBin mechanism for possible priority rendering and the setNodeMask for turning rendering on and off. I'm not sure this is the most elegant way to accomplish what I need to do. Any input or suggestions would be appreciated. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2D rendering priority...
Paul, Thanks for the reply. We can have up to 57 levels of priority where each level could have 100-200 simple geometries (i.e. circles, squares, simple line primitives, etc.). It's very rare that all levels are on simultaneously but those that are on, need to stack in priority relative to every other level/group that is on. Realistically, we'll have around 10-15 levels being rendered at the same time. Hopefully this quantity/complexity won't present a problem. I really didn't have any reservations per se about using the RenderBin and NodeMask mechanisms. I suspected that I needed to use them but I wanted to ping the group just to make sure I was on the right track. When using OSG, it's always good to have a reality check before proceeding...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, February 09, 2010 4:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: I have a need to render a bunch of 2D geometry groups that have different priorities for display (one group rendered on top of the other according to their priority). I also need to have the ability to turn the rendering off and on for some of the groups while maintaining rendering priority. How many different groups do you have, and what is the total data size of all the groups? I wanted some input or ideas on what might be the best way to handle this in OSG. So far I've looked at the RenderBin mechanism for possible priority rendering and the setNodeMask for turning rendering on and off. I'm not sure this is the most elegant way to accomplish what I need to do. In addition to setting the RenderBin, you'd need to disable depth test to get the painter's algorithm to work properly, of course. The RenderBin and NodeMask mechanisms seem like they're designed for just the tasks you describe. Can you elaborate on why you have reservations about their suitability? -Paul ___ 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] dynamic_cast of referenced objects
Kevin, Thanks for sharing. I'm sure it will come in handy...:) Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Kevin Wilder Sent: Tuesday, February 09, 2010 4:57 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] dynamic_cast of referenced objects Hi, For anyone who is still following this thread (or for anyone who stumbles upon it while trying to solve a similar problem in the future), I figured I'd post my findings: The bit about the object reference pointers vs. standard C++ pointers turned out to be a red herring. Seems the crashes resulted from my method of updating 2D text in the scene. I was just calling -settext(blah) from the main loop whenever I wanted to change the displayed characters. The crashes went away when I implemented a callback function to update the text. Here's an example of my text update callback function: Code: struct TextUpdateCallback : public osg::Drawable::UpdateCallback { virtual void update(osg::NodeVisitor* nv, osg::Drawable* drawable) { osgText::Text * TextPointer = dynamic_castosgText::Text*(drawable) ; if ( TextPointer ) { TextPointer-setText(NewText) ; TextPointer-setColor(NewColour) ; } } } I hope this helps. Cheers, Kevin[/quote] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23879#23879 ___ 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] Displaying elevation values while navigatingterrain elevation files
Phanindra, Look at the osghud example. It will show you how to set up a 2D camera with a view that you can use as an overlay on top of your 3D scene. You can use osgText to print out the values on screen... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Phanindra Talabathula Sent: Saturday, February 06, 2010 11:33 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Displaying elevation values while navigatingterrain elevation files Hi Chris, Is it also possible to display latitude, longitude along with elevation values as the user tries to navigate/fly thro' the terrain elevation file in osgviewer? Regards, Phanindra -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23780#23780 ___ 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] Example of geographical position
Tony, In answer to your question, you want to do the former. Assuming you have a geocentric database, you must convert your lat,lon,elev to a geocentric X,Y,Z (i.e. origin is the center of the earth) and then use these coordinates to set the position accordingly... Osg::Matrix position; earth-computeLocalToWorldTransformFromLatLongHeight(osg::DegreesToRadians(l at), Osg::DegreesToRadians(lon), elev, position); transform-setMatrix(position); transform is the node that is part of the entity class I discussed earlier. If you want your entity to move along, you'll need to update the code above in an update callback... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tony Vasile Sent: Sunday, February 07, 2010 8:01 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Example of geographical position Hi Shayne, Excuse my newbie status so how do I set up the MatrixTransform do I just use the latitude, longitude and altitude as a translation or do I just set the position of my vehicle using the latitude, longitude to set the position of the vehicle some how. 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] Example of geographical position
Tony, Entity is just my own class that can represent an airplane, tank, or whatever. The member Entity-transform is an osg::MatrixTransform which you'll need for moving models. entityGrp is an osg::Group*. -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tony Vasile Sent: Thursday, February 04, 2010 11:25 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Example of geographical position Shayne, What is the type of Entity and entityGrp in the following code snippet? Along with Robert's suggestion, you can use the following code snippet to place a vehicle on a spheroid that has VPB terrain, into the scenegraph. You'll need osgSim and osg::EllipsoidModel to do this. Entity-lat = 36.4; Entity-lon = -115.015; Entity-alt = GetHeightOnTerrain(Entity- lat, Entity-lon); entityGrp-addChild(Entity-transform); double GetHeightOnTerrain(double lat, double lon) { double X,Y,Z; double maxElevation = 13000 / 3.281; earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat), osg::DegreesToRadians(lon),maxElevation, X,Y,Z); double hat = osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(), osg::Vec3(X,Y,Z), -1); return (maxElevation - hat); } The earth is an osg::EllipsoidModel object and the terrain is a node loaded in from the ive file build by VPB. The entity group node is simply added to your scenegraph and you're ready to go. Hopefully this will get you started...:) -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and GL studio...
Brett and Paul, Thanks for your responses. My initial inquiry was to ping the OSG group to see if anyone had any experience regarding OSG and GL studio. Specific questions will be forthcoming as we embark on this. In answer to Paul's question, we are essentially using a Drawable callback that calls into the GL Studio DLL live component. One of the problems we're having is getting the buttons to work properly when we have our GL studio instrument embedded in the OSG viewer. The GL studio button graphic doesn't reflect the OSG mouse action we're expecting when we depress and release the mouse button. The behavior is suggestive of some sort of mismatch in handling the events. Again, thanks for the replies... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brett Wiesner Sent: Thursday, February 04, 2010 6:45 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] OSG and GL studio... Shayne, We've integrated GL Studio with our OSG application (VR-Vantage). It works really well! I'm not sure I can help you with your issues but I'll try. What's the problem? Thanks, Brett Wiesner Product Manager, VR-Vantage VR-Vantage: OSG Based Battlefield Information Station, Desktop Image Generator and SDK!!! Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: All, Does anyone have any experience using OSG with GL studio? We are having some issues that we would like some input on. I wanted to place a general inquiry before getting specific on the problem at hand. Thanks, -Shayne -- -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Example of geographical position
Tony, Along with Robert's suggestion, you can use the following code snippet to place a vehicle on a spheroid that has VPB terrain, into the scenegraph. You'll need osgSim and osg::EllipsoidModel to do this. Entity-lat = 36.4; Entity-lon = -115.015; Entity-alt = GetHeightOnTerrain(Entity-lat, Entity-lon); entityGrp-addChild(Entity-transform); double GetHeightOnTerrain(double lat, double lon) { double X,Y,Z; double maxElevation = 13000 / 3.281; earth-convertLatLongHeightToXYZ(osg::DegreesToRadians(lat), osg::DegreesToRadians(lon),maxElevation, X,Y,Z); double hat = osgSim::HeightAboveTerrain::computeHeightAboveTerrain(terrain.get(), osg::Vec3(X,Y,Z), -1); return (maxElevation - hat); } The earth is an osg::EllipsoidModel object and the terrain is a node loaded in from the ive file build by VPB. The entity group node is simply added to your scenegraph and you're ready to go. Hopefully this will get you started...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tony Vasile Sent: Wednesday, February 03, 2010 5:13 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Example of geographical position Hi, I'm a newbie and trying to find as many examples as I can. What I am looking for is an example of using a vehicle in latitude, longitude and altitude and placing it in the scene graph. Unfortunately most of the applications I have found programs such as Flightgear and Simgear and they just have far too much code to understand the general ideas quickly. Any help would be most appreciated. Another problem I have is with VPB. I have some level 1 DTED data that I wish to use in my scene graph for collision and occlusion events. Do I need to have an image overlayed on the DTED data before I can see anything with osgviewer? Tony Vasile CSC Australia 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] OSG and GL studio...
All, Does anyone have any experience using OSG with GL studio? We are having some issues that we would like some input on. I wanted to place a general inquiry before getting specific on the problem at hand. Thanks, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altering terrain texture...
Robert, I think your proposal would be a great benefit and would make things more flexible. For the record, the cards we're using are Nvidia GeForce 295s so they're fairly good cards. I would assume the drivers are as good but I don't know what algorithms they're resorting to for filtering on the texture... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, January 27, 2010 2:09 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altering terrain texture... Hi Shayne, On Tue, Jan 26, 2010 at 6:42 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: Robert, In answer to your inquiry, I'm using a database based on osgTerrain::TerrainTile so the texture settings are embedded in the tiles as you asserted earlier. I wasn't planning on using linear filtering. I was just giving it as an example on how I wanted to issue a particular call programmatically. Rather than attempt to tweak the texture settings per your suggestions, I was able to change the settings on the graphics card to get what I wanted thereby overriding the settings in the database. With anisotropic filtering in the database set at 16x, it was actually adding to the problem of texture crawling at far distances when flying low. Setting the anisotropic filtering down to 2x blurred the texture a bit more out far but it got rid of the crawling artifacts. We are using high resolution texture imagery (.25m texture) in the database which exacerbates the problem. In this case, the devil is truly in the details. Thanks again for your help... Interesting results, makes me wonder if the mipmap quality of filtering quality of the driver isn't that great. I have generally got best results with a high value of max anisotropy. As for the OSG, perhaps it's time to make the max anisotropy a variable in osgTerrain::Layer so that you can set in your application. The DatabasePager variable for setting could also be then used to set the value automatically. 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] altering terrain texture...
Robert, I'll take a look and see what I can do... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Wednesday, January 27, 2010 8:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altering terrain texture... Hi Shayne, On Wed, Jan 27, 2010 at 3:11 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: I think your proposal would be a great benefit and would make things more flexible. I'm rather busy working on submissions, so if you can dive in and implement it would sure shorted the features time to market :-) 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] altering terrain texture...
Robert, In answer to your inquiry, I'm using a database based on osgTerrain::TerrainTile so the texture settings are embedded in the tiles as you asserted earlier. I wasn't planning on using linear filtering. I was just giving it as an example on how I wanted to issue a particular call programmatically. Rather than attempt to tweak the texture settings per your suggestions, I was able to change the settings on the graphics card to get what I wanted thereby overriding the settings in the database. With anisotropic filtering in the database set at 16x, it was actually adding to the problem of texture crawling at far distances when flying low. Setting the anisotropic filtering down to 2x blurred the texture a bit more out far but it got rid of the crawling artifacts. We are using high resolution texture imagery (.25m texture) in the database which exacerbates the problem. In this case, the devil is truly in the details. Thanks again 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: Tuesday, January 26, 2010 2:44 AM To: OpenSceneGraph Users Subject: Re: [osg-users] altering terrain texture... Hi Shayne, On Mon, Jan 25, 2010 at 9:28 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: What I'm trying to do is minimize the texture crawling artifact I see when I fly at a low azimuth view looking out along the terrain skin to the horizon. I thought that playing with the texture filter setting on the terrain texture might cure the problem. When I pipe the video out to a projector, the crawling is even more pronounced. Changing the filtering to linear will likely make the texture aliasing far worse. You'll need to use anisotropic filtering to improve the quality of textures at low viewing levels. osgTerrain::GeometryTechnique set the value to 16.0 which is the highest value so you won't be able to improve on it. You haven't said what type of database you have - an osg::Geometry based one or an osgTerrain::TerrainTile based one. Current svn/trunk version of VPB builds osgTerrain databases by default, while older versions built osg::Geometry polygonal based models. For the later you could set the max anisotropy filtering via an option, and also set it in the DatabasePager. 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] Navigating terrain elevation files using OSG
Phanindra, You'll need to build an OSG database from your .tif and dted content using Virtual Planet Builder (VPB). Documentation is available on how to do this. Once the database is built, you can either using osgViewer to browse the database or you can write your own OSG app to fly through it. The OSG flight manipulator is a good choice. It allows you to fly around the database with your mouse. Regards, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Phanindra Talabathula Sent: Sunday, January 24, 2010 6:02 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Navigating terrain elevation files using OSG Hi, I am relatively new to OSG. Not sure if the camera, flight manipulator classes available could be used to navigate through the .tif or .dt0 files. I would like to add navigation support (i.e. the user should be able to fly through the terrain elevation files using mouse/keyboard) to the dted files or tif files. Is this achievable? Thank you! Regards, Phanindra -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23107#23107 ___ 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] altering terrain texture...
All, Is there a way of programmatically altering texture state such as filtering on a chunk of terrain built with VPB? Everything I've tried thus far has not worked. Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altering terrain texture...
Chris, thanks for the reply. I'm reading into a terrain node from an ive file as usual in my application. The ive file/tiles were built by VPB from 1 meter imagery and level 1 DTED. After I've loaded in my terrain into the scenegraph, I want to change the texture filtering by using something like texture-setFilter(osg::Texture2D::MIN_FILTER, osg::TEXTURE2D::LINEAR); which then would apply to the whole terrain database. I thought that setting the stateset in the terrain node would do the trick but this has no effect on the terrain texture. What I'm trying to do is minimize the texture crawling artifact I see when I fly at a low azimuth view looking out along the terrain skin to the horizon. I thought that playing with the texture filter setting on the terrain texture might cure the problem. When I pipe the video out to a projector, the crawling is even more pronounced. Any ideas on how I can tweak the texture settings on the terrain would be most appreciated. Obviously what I'm currently doing isn't correct. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris 'Xenon' Hanson Sent: Monday, January 25, 2010 12:35 PM To: OpenSceneGraph Users Subject: Re: [osg-users] altering terrain texture... On 1/25/2010 12:23 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: Is there a way of programmatically altering texture state such as filtering on a chunk of terrain built with VPB? Everything I've tried thus far has not worked. Should be -- there's nothing magic about VPB databases. What are you trying to do and how are you doing it? -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] altering terrain texture...
Robert, I just read your reply after I had sent my email response to Chris. This helps me understand why my approach wasn't working in the first place. I will take your advice and explore this further. I will probably have more questions as I proceed to find a solution to meet my needs... Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Monday, January 25, 2010 12:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] altering terrain texture... Hi Shane, There are a couple of texture policy settings in the osgDB::DatabasePager that can tweak things a bit, but not generally: /** Set whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/ void setUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef, bool valueAutoUnRef) { _changeAutoUnRef = changeAutoUnRef; _valueAutoUnRef = valueAutoUnRef; } /** Get whether newly loaded textures should have their UnrefImageDataAfterApply set to a specified value.*/ void getUnrefImageDataAfterApplyPolicy(bool changeAutoUnRef, bool valueAutoUnRef) const { changeAutoUnRef = _changeAutoUnRef; valueAutoUnRef = _valueAutoUnRef; } /** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/ void setMaxAnisotropyPolicy(bool changeAnisotropy, float valueAnisotropy) { _changeAnisotropy = changeAnisotropy; _valueAnisotropy = valueAnisotropy; } /** Set whether newly loaded textures should have their MaxAnisotopy set to a specified value.*/ void getMaxAnisotropyPolicy(bool changeAnisotropy, float valueAnisotropy) const { changeAnisotropy = _changeAnisotropy; valueAnisotropy = _valueAnisotropy; } In the case osgTerrain::TerrainTile based paged database the above settings won't work as it's osgTerrain that creates the osg::Texture objects, so instead you'd need to modify the osgTerrain::ImageLayer settings on the TerrainTiles. A custom Registry::ReadFileCallback could probably be implemented to do this for you. Beyond this you could write a pre-processing tool to modify the .ive files on disk. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg window on top...
All, Is there a way to force an OSG window (osgViewer) to always be on top of all the other windows being displayed? Thanks in advance. -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] general questions from a newbie
Just a follow up question on this, does QT allow a multi-threaded embedded osgViewer or is it knocked down to single threaded like what happens to osgViewer embedded in GLUT? -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Beckett Sent: Thursday, January 14, 2010 1:28 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] general questions from a newbie jterpstra wrote: 1) Is this type of integration even possible with QT? Yes, you can embed a OSG view into a Qt frame, dock window etc. There are two ways to do this shown in the osgViewerQt example. Adapterwindow is easiest, the oosgwidget needs a little fix on windows to stop a redrawing bug. (see http://forum.openscenegraph.org/viewtopic.php?t=4432) 2) I am lost when they talk about Views, Viewports, Cameras, etc. Where is a good source to learn about this stuff? These are roughly the same as in Opengl. The more important thing to learn is how osg:: Nodes, Geoeds, Geometries and Drawables go together The best place to start is Paul Marz's book http://www.osgbooks.com/books/osg_qs.html All this migth be overkill for a 2d map. The new Qt drawing canvas is very good, have you looked at the quartely newslatter on Qt's site? It's free as a download or you can buy a paper copy. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22651#22651 ___ 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] resizing embedded windows...
Robert, Thanks for the advice. As a follow up question that may be obvious (forgive me), how do I enable the clear on the graphics context? I've poked around and I can't find where this is done. Per your suggestion, I tried my own brute force clear which appears to solve the problem but I would rather use the context's clear if possible. It seems more elegant for what I'm trying to accomplish. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Monday, January 11, 2010 3:39 AM To: OpenSceneGraph Users Subject: Re: [osg-users] resizing embedded windows... Hi Shayne, I haven't personally tried doing exactly what you are doing, but try changing the GraphicsWindowEmbedded context's size, and also try enable it's clear as the graphics context by default leaves it's own clear disabled leaving it to the clear done during the rendering of the Camera's scene graph that is clamped to the Camera's viewport. Another thing you could try is doing your own clear before the call to viewer.frame(). Robert. On Fri, Jan 8, 2010 at 11:05 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC shayne.tuel...@hill.af.mil wrote: All, I'm in the process of porting an OGL app using GLUT to OSG using osgViewer. Currently this app has multiple viewports embedded in a single GLUT window where one of the viewports is rendering a 3D view into a scene. Due to time constraints, I want to replace the 3D viewport with an embedded OSG viewer into the GLUT window as an interim solution. It should be noted, that the embedded window is a small subset of the larger GLUT window (GLUT is using game mode). Using the osgviewerGLUT example as a guide, I've been able to get things working but I've run into a snag. I have a need to resize the embedded window on occasion and I can't get it to work properly. When I resize the embedded window by setting viewer-getCamera()-setViewport(x, y, width, height), the new embedded window appears just fine but I still have portions of the old embedded window left over as if the clear didn't happen. I've tried several ways of getting the old embedded window to clear out without success. It's as if I can't override the original settings when I created the embedded window using viewer-setUpViewerAsEmbeddedInWindow(.). Has anyone run into this problem or know of a good/correct way of resizing or moving embedded OSG windows in a larger GLUT window? If it can't be done, it would be nice to know so that I don't spend an exorbitant amount of time trying to get it to work. For the record, I'm aware of the shortcomings and drawbacks about using GLUT with OSG. Again, my attempt here is to come up with a stopgap measure until I can get the entire port to osgViewer completed. Thanks in advance, -Shayne ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] resizing embedded windows...
All, I'm in the process of porting an OGL app using GLUT to OSG using osgViewer. Currently this app has multiple viewports embedded in a single GLUT window where one of the viewports is rendering a 3D view into a scene. Due to time constraints, I want to replace the 3D viewport with an embedded OSG viewer into the GLUT window as an interim solution. It should be noted, that the embedded window is a small subset of the larger GLUT window (GLUT is using game mode). Using the osgviewerGLUT example as a guide, I've been able to get things working but I've run into a snag. I have a need to resize the embedded window on occasion and I can't get it to work properly. When I resize the embedded window by setting viewer-getCamera()-setViewport(x, y, width, height), the new embedded window appears just fine but I still have portions of the old embedded window left over as if the clear didn't happen. I've tried several ways of getting the old embedded window to clear out without success. It's as if I can't override the original settings when I created the embedded window using viewer-setUpViewerAsEmbeddedInWindow(.). Has anyone run into this problem or know of a good/correct way of resizing or moving embedded OSG windows in a larger GLUT window? If it can't be done, it would be nice to know so that I don't spend an exorbitant amount of time trying to get it to work. For the record, I'm aware of the shortcomings and drawbacks about using GLUT with OSG. Again, my attempt here is to come up with a stopgap measure until I can get the entire port to osgViewer completed. Thanks in advance, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org