[osg-users] Terrain splats
I've been looking to add dynamic terrain splat quads to my textured terrain (such as tire marks), and see a number of potential ways to do it: decal, shader, maybe even osgSim::OverlayNode, and was curious as to what would be the most optimum approach in OSG without reinventing the wheel? Thanks. Bob. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Getting current eyepoint
I have an update callback that needs the current frames (i.e. the one that's about to be rendered with the cull/draw traversals to follow) eyepoint. When I used the camera's view matrix, I seemed to be getting last frame's eyepoint - it hadn't been updated yet? When I changed my update callback to use the current matrix manipulator (fly,drive,etc) eyepoint, which had already been updated in the event traversal, I now got this frame's current eyepoint. Making my update callback a cull callback using the camera view matrix also worked. Is there a good way to get the current, updated eyepoint in an update callback? When does the camera view matrix become current? Thanks. Bob. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to Monitor VideoMemory usage
I've used RivaTuner to monitor video memory usage on WinXP, but it doesn't do it on Vista (it says due to Vista's virtualization of video memory?). Does anyone know of a way to monitor video memory usage on WinVista? I have a very choppy scene (using quad-core HP, 2 Nvidia GTX8800, Vista, multi-thread OSG2.4-based app), and I suspect its due to texture overload. Whatever Vista is virtualizing didn't seem to help! Thanks. Bob. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Terrain model not LOD-ing with Slave Cameras
Thanks Robert. The LODScaleHandler has been helpful to determine better terrain LOD ranges to avoid texture overload. Bob. Robert Osfield wrote: On Wed, Aug 20, 2008 at 2:41 AM, Bob Balfour [EMAIL PROTECTED] wrote: What could cause what appears to be a perfectly good LOD terrain model to no longer function properly when using slave cameras? Using slave Cameras has no effect on LOD management. Your later email suggests that pixel aliasing is an issue, but I don't really know what you mean here, aliasing is a rasterisation issue and unrelated to geometry issues. My only guess is that you are somehow referring to lack anisotropic filtering causing texture artifacts, but even this I can't tie in. As for the view frustum effecting things, again it doesn't, the LOD ranges will be selected purely on distance from eye point. It could be that there is an apparent effect such as the view frustum being narrower so that distance objects take up more screen space, if this is an issue then simple use the LODScale to select high res LOD levels. See the osgmuiltitexturecontrol example as it has some code for adjusting the LODScale. Robert. ___ 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] Terrain model not LOD-ing with Slave Cameras
I'm using an LOD (not Paged) textured terrain model built with osgdem. In my app (OSG 2.4-based), configured with just the main default camera, the LOD terrain levels are clearly visible as they change from one to another. In my same app, configured with two slave cameras (looking 45 left right), there is NO visible evidence that the LOD levels are changing! It appears that the highest resolution (6) imagery is staying in at all times (causing lots of aliasing and stressful graphics pipe texture paging as a result). [Other LOD building models in the scene do seem to LOD properly.] What could cause what appears to be a perfectly good LOD terrain model to no longer function properly when using slave cameras? Thanks. Bob. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Terrain model not LOD-ing with Slave Cameras
On closer inspection, i think I do see some LOD changes on the slave cameras, but the pixel aliasing is masking it. I think the bad aliasing may be due to larger view frustums on the slave cameras, causing less available screen pixels per geo-inch, which means I should consider tightening the LOD ranges to be closer in? Does this make sense? Thanks Bob. - Bob wrote: I'm using an LOD (not Paged) textured terrain model built with osgdem. In my app (OSG 2.4-based), configured with just the main default camera, the LOD terrain levels are clearly visible as they change from one to another. In my same app, configured with two slave cameras (looking 45 left right), there is NO visible evidence that the LOD levels are changing! It appears that the highest resolution (6) imagery is staying in at all times (causing lots of aliasing and stressful graphics pipe texture paging as a result). [Other LOD building models in the scene do seem to LOD properly.] What could cause what appears to be a perfectly good LOD terrain model to no longer function properly when using slave cameras? Bob. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mouse motion models across multiple viewports
I'm using OSG 2.4 in a 4-camera/projector viewport configuration (on a dome), and I'm finding (not necessarily unexpectedly) that fly, drive motion models are having difficulty operating properly, probably because the mouse is moving across viewports. Should it work OK, and I just have a configuration issue?, or suggestions on how to make them work across multiple viewports, or use a joystick instead of a mouse?? Thanks for your suggestions... Bob. -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] /Solutions in four dimensions with *fourDscape*®/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering to multiple graphics cards
Joakim Simonsson wrote: On Tue, 01 Jul 2008 00:34:09 +0200, Bob Balfour [EMAIL PROTECTED] wrote: The scene achieves 60Hz at times, but feels choppy, and I notice the middle two GPUs at times show long orange bars, which are killing the 60Hz rate. This is probably obvious for you, but the fancy aero rendering is turned off, right? I set the theme to windows classic, which I assumed would do away with the aero stuff (with no discernible difference), but is there something else to specifically turn off? or 2 double-wide screens (screen 0 2, each set to 2880x900). Note that in the Vista display settings all 4 screens are set up as 1 big extended desktop. How do you configure extended desktop in Vista? I mean, microsoft (or nvidia) has removed the horizontal/vertical span possibility. But if I understand you correctly, there is a possibility to fool vista, so it believes your multiple monitors is only one monitor with a very large resolution? rt.click desktop-Personalize-Display Settings (Monitor tab) shows 4 monitors that you can select, then check the Extend the desktop onto this monitor box. I can also seem to stop the dwm.exe from executing (Vista desktop window manager) by checking disable desktop composition (rt.click on the .exe-properties(compatibility tab)). With the dwm off I can only get to 47Hz max, but pretty steady. With dwm.exe on (taking about 20% of the CPU) I can get to 60Hz, but not consistently, and my rendered cube rotates with a discernible choppiness. Is Microsoft punishing me for disabling dwm? Bob. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] mouse/viewport issues with CompositeViewer
I am wondering about the status of this bug/fix (below) that I originally saw discussed back in late Feb. by Paul M., Jean-Sebastien and Robert, and again in late May, with no firm resolution. I am using OSG 2.4 and appear to be experiencing this same problem using CompositeViewer and slave cameras. Is the only current option to drop down to osgViewer::Viewer, or will doing a current SVN checkout resolve it? -(from J-S G., 28feb08) Look closely - the scene moves, just *very very* little. It's a bug in osgViewer/CompositeViewer.cpp which I submitted a fix for about a week ago. When a single view is on multiple displays (so the slave camera mechanism in osgViewer::View is used) the viewport extents are not set correctly in the eventTraversal, so when the mouse events are translated they have wrong values and the mouse movement has very little effect. -- Bob. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering to multiple graphics cards
I can draw successfully with slave cameras to all 4 screens in various configs in Vista, either the osgviewer across all screens, 4 independent screens (i.e. screens 0-3, each set @ 1440x900), or 2 double-wide screens (screen 0 2, each set to 2880x900). Note that in the Vista display settings all 4 screens are set up as 1 big extended desktop. But I'm having TROUBLE MAINTAINING 60HZ, even though my rendered scene consists solely of a textured cube. For example, with osgviewer.exe (ver 2.4) spread across all 4 screens (4 graphics contexts): Threading model: CullDrawThreadperContext Event, Update, all 4 Cull,Draw,GPU vals are small (0.xx) The scene achieves 60Hz at times, but feels choppy, and I notice the middle two GPUs at times show long orange bars, which are killing the 60Hz rate. All 4 CPUs are running @ approx 52% (osgviewer.exe @ 30% and dwm.exe @ 20%) So I also disabled desktop composition on the osgviewer.exe task, which sent the dwm.exe (desktop window manager) down to 0% (disabled), which made the rotating cube less choppy, but now can only achieve 45Hz??? I am experiencing similar results with my own osg2.4-based fourDscape task, with 4 cameras rendered to screen 0-3 (each @ 1440x900), with the same very small Cull/Draw/GPU numbers (all 4 CPUS @ 22%), but can only achieve 47Hz. Any suggestions as to where to look for who/what in Vista is stealing resources and how to make it stop? With a single screen, 60Hz is no problem. thanks. Bob. - Robert Osfield wrote: Hi Wojteck, As a hardware sanity check you could just dual boot the machine with Linux, this itself will bring its own learning curve, but at least you'll have a setup that others have known work just fine. Robert. On Mon, Jun 30, 2008 at 3:24 PM, Wojciech Lewandowski [EMAIL PROTECTED] wrote: Hi Everyone, I have done some OSG testing with Vista 64 bit + 2 x GeForce 8800 GTS 320 MB + 3 monitors. I have attached only 3 monitors but I am sure 4 would work either. Unfortunately results are mixed. I was able to start osgviewer and our demo app on 3 monitors. I was able to get some visual but after few frames driver was dying and after few moments Vista popped up with msgbox that graphics driver failed but now it is ok (or something like this). I may not have the power supply decent enough to provide the stable current so this crash could be power related. I will try to arrange some heavy duty power supply and redo the tests again later this week. Anyway it looks like at this stage results are more promising than with XP and two different GeForces. Cheers, Wojtek - Original Message - From: Wojciech Lewandowski To: OpenSceneGraph Users Sent: Monday, June 30, 2008 10:34 AM Subject: Re: [osg-users] Rendering to multiple graphics cards Thanks, Bob. This is a relief ;-). I don't have the acces to similar Vista setup yet. Will try to grab two boards and do the checks this week.Will post a meesage with results when I am done. Thanks again. Wojtek - Original Message - From: Bob Balfour To: OpenSceneGraph Users Sent: Sunday, June 29, 2008 2:32 AM Subject: Re: [osg-users] Rendering to multiple graphics cards I have two Nvidia 8800 cards on a Windows Vista platform (HP), and setting traits-screenNum to 0 or 1 as Robert indicated does send the rendering to the appropriate graphics cards. I used code very similar to the osgcamera example, multipleWindowMultipleCameras method. Does anyone have experience setting up a 4-monitor (each 1440x900) system on Windows Vista? I have 2 osgcameras/contexts rendering left-half/right-half of the scene. With 2 Nvidia graphics cards both in dual-head mode, if I render each camera to a viewport 2880x900 I'm hoping that the scene will be spread properly over the 4 monitors (will try it shortly once I round up four HD monitors), without configuring the extending the desktop option in Windows, which seems to take considerable resources in the dwm.exe task (dynamic window manager), which appears to have an OSG rendering performance impact. Anyone have similar experience here, or other configuration suggestions? Thanks. Bob. -- Wojciech Lewandowski wrote: Hi Bob, Seems like you asked related question to mine. I would be very interested in your results. I tried to run osgviewer on two graphics boards withour success. But I was on XP and boards were different. I have not given up completely, hoping that Vista or identical cards may work. Then I have read your post and I see that you have exactly such setup. Does osgviewer outputs to monitors cards attached to both cards ? Cheers, Wojtek Hi Bob, Using the screenNum set to 0 or 1 should select the appropriate card. When you run osgviewer on your system it should open up two windows/two slave cameras automatically, press 'f' to toggle
Re: [osg-users] Rendering to multiple graphics cards
I have two Nvidia 8800 cards on a Windows Vista platform (HP), and setting traits-screenNum to 0 or 1 as Robert indicated does send the rendering to the appropriate graphics cards. I used code very similar to the osgcamera example, multipleWindowMultipleCameras method. Does anyone have experience setting up a 4-monitor (each 1440x900) system on Windows Vista? I have 2 osgcameras/contexts rendering left-half/right-half of the scene. With 2 Nvidia graphics cards both in dual-head mode, if I render each camera to a viewport 2880x900 I'm hoping that the scene will be spread properly over the 4 monitors (will try it shortly once I round up four HD monitors), without configuring the extending the desktop option in Windows, which seems to take considerable resources in the dwm.exe task (dynamic window manager), which appears to have an OSG rendering performance impact. Anyone have similar experience here, or other configuration suggestions? Thanks. Bob. -- Wojciech Lewandowski wrote: Hi Bob, Seems like you asked related question to mine. I would be very interested in your results. I tried to run osgviewer on two graphics boards withour success. But I was on XP and boards were different. I have not given up completely, hoping that Vista or identical cards may work. Then I have read your post and I see that you have exactly such setup. Does osgviewer outputs to monitors cards attached to both cards ? Cheers, Wojtek Hi Bob, Using the screenNum set to 0 or 1 should select the appropriate card. When you run osgviewer on your system it should open up two windows/two slave cameras automatically, press 'f' to toggle off full screen to see the actual windows. Robert. On Tue, Jun 24, 2008 at 8:56 PM, Bob Balfour [EMAIL PROTECTED] wrote: I also have an HP Windows (Vista) box with 2 Nvidia graphics cards (independent, not SLI-configured). In order to configure two osg::cameras, each one rendering to its own specific Nvidia card, how do you specify a camera graphics context for a specific graphics card. Is it simply specifying the appropriate traits-screenNum, or does it take more than that? Has anyone done this in Windows Vista? Thanks. Bob. -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] Solutions in four dimensions with fourDscape(R) ___ 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 -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] /Solutions in four dimensions with *fourDscape*®/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering to multiple graphics cards
I also have an HP Windows (Vista) box with 2 Nvidia graphics cards (independent, not SLI-configured). In order to configure two osg::cameras, each one rendering to its own specific Nvidia card, how do you specify a camera graphics context for a specific graphics card. Is it simply specifying the appropriate traits-screenNum, or does it take more than that? Has anyone done this in Windows Vista? Thanks. Bob. -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] /Solutions in four dimensions with *fourDscape*®/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting a camera view frustum
For the dome simulation project I'm working on, they went with using a 3rd party projector calibration/blending/warping system/SDK (instead of using some OSG dome correction capability as I was anticipating and had previously mentioned to you), which is initially providing me with the view frustums to use (determined with an off-line calibration process), including rotations/translation values to account for how the projectors are mounted and throw their image onto the screen area. Hence the rotations on the projection matrix, but I'm not sure if or how to properly account for the difference in axis alignments, etc. and how to properly apply the rotations to the frustum. I'll get it right eventually... Bob. Robert Osfield wrote: Hi Bob, I don't understand why your putting rotations and translations into the projection matrix - its like you are mixing the projection and view matrices for some reason. I'd recommend leaving the projection matrix so that it only handles the lens aspect of camera, not the position and attitude of it - for this you should use the camera's view matrix. Robert. On Mon, Jun 23, 2008 at 1:57 AM, Bob Balfour [EMAIL PROTECTED] wrote: I need to set up a specific calibrated view frustum, and I need to be sure I'm doing it right in OSG, as I've gotten a bit confused and my OGL matrix math is a bit rusty! The frustum is predefined by: 1. LeftAngle, RightAngle, TopAngle, BottomAngle of the frustum. 2. A set of rotations (defined as Euler angles) on the frustum: ViewAngleA (first rotation about the z axis**) ViewAngleB (second rotation about the y axis**) ViewAngleC (final rotation about the x axis**) 3. A translation: Xoffset, Yoffset, Zoffset of the viewpt of the frustum. **Note that the axes are defined to be: +x to the right, +y up, -z into the screen (the same as OGL? but different than the OSG camera manipulators?) The sample OpenGL code I have tells me to do the following with this info: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum( near*tan(DegreesToRad*LeftAngle), near*tan(DegreesToRad*RightAngle), near*tan(DegreesToRad*BottomAngle), near*tan(DegreesToRad*TopAngle), near,far); glRotated(ViewAngleA, 0.0, 0.0, 1.0); glRotated(ViewAngleB, 0.0, 1.0, 0.0); glRotated(ViewAngleC, 1.0, 0.0, 0.0); glTranslated(Xoffset, Yoffset, Zoffset); --- Now to do this with an OSG::camera I'm not sure what to do about matching up the axis orientation, if anything (the OSG manipulators and my models work with +z up, +x easting, +y northing, or is that just wrt the modelview matrix and nothing to do with the projection matrix?), use preMult, postMult, makeRotate, etc? ... I have some OSG code that looks like below, but I'm not sure it's doing it right (it just mimicks the OGL code with OSG methods): osg::Matrixd mat; mat.makeIdentity(); mat.preMult(osg::Matrixd::frustum( near*tan(DEG_TO_RAD*LeftAngle), near*tan(DEG_TO_RAD*RightAngle), near*tan(DEG_TO_RAD*BottomAngle), near*tan(DEG_TO_RAD*TopAngle), near,far) ); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleA, 0.0, 0.0, 1.0); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleB, 0.0, 1.0, 0.0); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleC, 1.0, 0.0, 0.0); mat.preMult(osg::Matrixd::translate(Xoffset, Yoffset, Zoffset); camera-setProjectionMatrix(mat); Advice/suggestions from anyone more proficient in this would be appreciated... Thanks. Bob. -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] Solutions in four dimensions with fourDscape(R) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Setting a camera view frustum
I need to set up a specific calibrated view frustum, and I need to be sure I'm doing it right in OSG, as I've gotten a bit confused and my OGL matrix math is a bit rusty! The frustum is predefined by: 1. LeftAngle, RightAngle, TopAngle, BottomAngle of the frustum. 2. A set of rotations (defined as Euler angles) on the frustum: ViewAngleA (first rotation about the z axis**) ViewAngleB (second rotation about the y axis**) ViewAngleC (final rotation about the x axis**) 3. A translation: Xoffset, Yoffset, Zoffset of the viewpt of the frustum. **Note that the axes are defined to be: +x to the right, +y up, -z into the screen (the same as OGL? but different than the OSG camera manipulators?) The sample OpenGL code I have tells me to do the following with this info: glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum( near*tan(DegreesToRad*LeftAngle), near*tan(DegreesToRad*RightAngle), near*tan(DegreesToRad*BottomAngle), near*tan(DegreesToRad*TopAngle), near,far); glRotated(ViewAngleA, 0.0, 0.0, 1.0); glRotated(ViewAngleB, 0.0, 1.0, 0.0); glRotated(ViewAngleC, 1.0, 0.0, 0.0); glTranslated(Xoffset, Yoffset, Zoffset); --- Now to do this with an OSG::camera I'm not sure what to do about matching up the axis orientation, if anything (the OSG manipulators and my models work with +z up, +x easting, +y northing, or is that just wrt the modelview matrix and nothing to do with the projection matrix?), use preMult, postMult, makeRotate, etc? ... I have some OSG code that looks like below, but I'm not sure it's doing it right (it just mimicks the OGL code with OSG methods): osg::Matrixd mat; mat.makeIdentity(); mat.preMult(osg::Matrixd::frustum( near*tan(DEG_TO_RAD*LeftAngle), near*tan(DEG_TO_RAD*RightAngle), near*tan(DEG_TO_RAD*BottomAngle), near*tan(DEG_TO_RAD*TopAngle), near,far) ); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleA, 0.0, 0.0, 1.0); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleB, 0.0, 1.0, 0.0); mat.preMult(osg::Matrixd::rotate(DEG_TO_RAD*ViewAngleC, 1.0, 0.0, 0.0); mat.preMult(osg::Matrixd::translate(Xoffset, Yoffset, Zoffset); camera-setProjectionMatrix(mat); Advice/suggestions from anyone more proficient in this would be appreciated... Thanks. Bob. -- Robert E. Balfour, Ph.D. Exec. V.P. CTO, BALFOUR Technologies LLC 960 So. Broadway, Suite 108, Hicksville NY 11801 Phone: (516)513-0030 Fax: (516)513-0027 email: [EMAIL PROTECTED] /Solutions in four dimensions with *fourDscape*®/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org