[osg-users] Problem: CompositeViewer doesn't work with Stereo
Hello, I use the osg composite viewer and I try to use some stereo mode, i.e. CHECKERBOARD, HORIZONTAL_INTERLACE or the VERTICAL_INTERLACE. But this modes don't work with the composite viewer. I use osg 2.8. I guessed it is a problem in my application, so I tried the osgcompositeviewer example with these stereo modes. Also these didn't work. Any ideas? Cheers 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
Re: [osg-users] WindowManager root
Jeremy Moles wrote: I'm curious why you want this? There might be a better way to get the results you're seeking w/ existing codestuffs. That's the reason why I was asking ;) Basically I have my own layer of objects that encapsulate osg ones. I have a Scene Manager that is not dependent from the viewer. This means my vewer, that encapsulates the osg viewer, calls a getRoot() method of my Scene Manager to get the osg root node and attach it to the osg viewer. I would like my Scene Manager to be independent from the viewer even with widgets. So, which type of osg object should I store in my Scene Manager so that I can just pass it to the viewer to see the osg widgets. Moreover the osg object that I store into my Scene Manager should be able to add other osg widgets at runtime. Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36604#36604 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] compiler errors
Hi Mathias, the problem was related to a conflicting define. Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36606#36606 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cameras and FBOs
Hi there! Is there any way to explicitly pass an osg::FrameBufferObject to a Camera, so the camera renders into it? or, using FRAME_BUFFER_OBJECT as the Camera RenderTargetImplementation and attaching textures/images/buffers to it, is there any way to get the FrameBufferObject the camera is using from a Camera draw callback? or, even not getting it, is there a way to bound the FrameBufferObject of this Camera? Thanks in advance! -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparent Viewers/Close Viewer
Hi Andrew, Do you mean multiple View's withing a CompositeViewer? While it's technically possible to add a osgViewer::Viewer to a CompositeViewer since Viewer subclasses from View, it's not the intended usage - you should use View's instead. In terms of closing a View, does this View have it's own GraphicsWindow(s)? If not then just setting the View's Camera's NodeMask to 0 will switch if off and set it to 0x to switch it back on again. If the View does have it's own GraphicsWindow then you'll need to close the window and switch off the rendering via the NodeMask - although I've never actually tried specifically this so you'll be working on the bleeding edge. The other approach is to simply removing the View from the CompositeView and add back in a new one when you need it. The NodeMask route is lightest weight route though and is what I'd do if it's possible. Robert. On Mon, Feb 14, 2011 at 4:11 AM, Andrew Kos akos...@gmail.com wrote: Hello, I am currently building an application that uses multiple viewers within a composite viewer. Is there a way to make a viewer semi-transparent? Also, is there a way to temporarily close/reopen a viewer? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36602#36602 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem: CompositeViewer doesn't work with Stereo
Hi Martin, The rendering backend is identical between Viewer and CompositeViewer so both are fully capable of doing stereo. I presume the issue comes from the DisplaySettings hints used to pass in the stereo settings. With CompositeViewer each View can have it's own DisplaySettings object so you can set this up independantly. Robert. 2011/2/14 Martin Großer grosser.mar...@gmx.de: Hello, I use the osg composite viewer and I try to use some stereo mode, i.e. CHECKERBOARD, HORIZONTAL_INTERLACE or the VERTICAL_INTERLACE. But this modes don't work with the composite viewer. I use osg 2.8. I guessed it is a problem in my application, so I tried the osgcompositeviewer example with these stereo modes. Also these didn't work. Any ideas? Cheers 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TextureAtlasBuilder
Hi J-S, Thank you for your suggestion. I can merge meny geometry to one but I have the problem with texture. Do you know how to merge texture to one by using TextureAtlasBuilder or other method by writting my own program. Could you please give me suggestion or example code to me. //Phummipat On Sun, Feb 13, 2011 at 9:42 PM, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hello Phummipat, I am very new in openscenegraph, I just want to know how to use MergeGeometryVisitor TextureAtlasBuilder for improving my scenegraph. Could someone give me please an explanation and the example of source code for using these two classes. You can in fact use them without writing any code. Just set the OSG_OPTIMIZER emvironment variable to MERGE_GEOMETRY|TEXTURE_ATLAS_BUILDER and run osgconv infile outfile For example osgconv somemodelfile.osg optimizedfile.ive You may want to experiment with other optimizer options, run osgconv --help-env to see all the available options. This will also embed the textures into the .ive file, and .ive is a more efficient binary format which loads quickly. OSG SVN trunk also has the .osgb format which is even better. If you want to write your own optimizing program, though, look at the source for the osgUtil::Optimizer to learn how to use the MergeGeometryVisitor and TextureAtlasBuilder. 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.9.11 and Delta3D
Hi, The SetFramerate and GetFramerate function errors are solved by adding getIncrementalCompileOperation()-SetFramerate(). But the foloowing function are not there in IncrementalCompileOperation also. If I comment that, will it create any issues? ‘setExpiryDelay’ ‘compileGLObjects’ Thank you! Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36614#36614 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.9.10 on iOS
Hi, I've been trying loading an .ive model too. I've downloaded the last version of the git repository. When I uncomment the //USE_OSGPLUGIN(ive) line and try to compile it, I still get two link errors: Code: ive::Terrain::read(ive::DataInputStream*), referenced from: ive::DataInputStream::readNode() in libosgdb_ive.a(DataInputStream.o) ive::Terrain::write(ive::DataOutputStream*), referenced from: ive::DataOutputStream::writeNode(osg::Node const*) in libosgdb_ive.a(DataOutputStream.o) How did you fix it? Thank you very much for your help. ... Thank you! Cheers, Arsenikal -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36541#36541 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to copy float array into a texture
Hi, i need random float values in my fragment shader for some post-processing. I create the random values on the cpu and stroe them in a float array. The next step is, I try to do is to create a texture and copy the array with random float values in all channels (RGBA) into the texture. In the last step i want to pass this texture to my fragment shader. In OpenGL I can do this with: Code: //create randomFloatsArray //... // copy to texture glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB,0,0,0,width, height,GL_RGBA,GL_FLOAT,randomFloatsArray); How can I do this with OSG? Thank you! Cheers, Dan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36616#36616 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.9.11 and Delta3D
Hi Vijeesh, On Mon, Feb 14, 2011 at 12:32 PM, Vijeesh Theningaledathil vije...@nal.res.in wrote: Hi, The SetFramerate and GetFramerate function errors are solved by adding getIncrementalCompileOperation()-SetFramerate(). But the foloowing function are not there in IncrementalCompileOperation also. If I comment that, will it create any issues? ‘setExpiryDelay’ ‘compileGLObjects’ ExpiryDelay is related to an expiry algorithm that has been replaced by a better scheme so ExpiryDelay is not required anymore so has been removed. The FrameRate is something that I will be soon setting automatically from the Viewer/CompositeViewer as we now have support for querying the screen refresh rate. This will just provide the default value though, you'll still be able to override it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to copy float array into a texture
Hi Dan, You can simply assign the float array to an osg::Image and then attach this to your texture. Robert. On Mon, Feb 14, 2011 at 12:34 PM, Dan Warrior blackbume...@googlemail.com wrote: Hi, i need random float values in my fragment shader for some post-processing. I create the random values on the cpu and stroe them in a float array. The next step is, I try to do is to create a texture and copy the array with random float values in all channels (RGBA) into the texture. In the last step i want to pass this texture to my fragment shader. In OpenGL I can do this with: Code: //create randomFloatsArray //... // copy to texture glTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB,0,0,0,width, height,GL_RGBA,GL_FLOAT,randomFloatsArray); How can I do this with OSG? Thank you! Cheers, Dan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36616#36616 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TextureAtlasBuilder
Hello Phummipat, I can merge meny geometry to one but I have the problem with texture. Do you know how to merge texture to one by using TextureAtlasBuilder or other method by writting my own program. Could you please give me suggestion or example code to me. Please see my previous post, especially this part: If you want to write your own optimizing program, though, look at the source for the osgUtil::Optimizer to learn how to use the MergeGeometryVisitor and TextureAtlasBuilder. 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
[osg-users] Culling mask problem.
Hi, I use osg 2.8.2 and I would like an advice on the problem that block me. I have this graph: transform1 | |___ geode1 | |___ transform2 | |__geode2 So, I have set this: int inheritanceMask = (osgUtil::SceneView::ALL_VARIABLES ~osgUtil::SceneView::CULL_MASK); myViewer-setInheritanceMask(inheritanceMask); myViewer-setCullMask(0x3); And I have set: transform1-setNodeMask(0x0); transform2-setNodeMask(0x1); The problem is that during the rendering process, geode2 is not rendering whereas my nodeMask is valid for transform2. I guess that during traversal, because transform1 node mask is false, the visit stop and transform2 is not displayed. What is the solution to allow the process and display the transform2 and geode2 ? Thank you for your advices. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36627#36627 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Culling mask problem.
Hi Miguel, The traversal is from top down and will stop traversing if the NodeMask of any node is 0, so it'll stop at transform1 is it's NodeMask is 0. If you want to get down to geode2 then you'll need to set the NodeMask of transform1 to a none zero mask. I don't know what you are trying to achieve, but at a guess you might be trying to toggle geode1 and geode2 independently, and if this is the case then you should be moving the NodeMask manipulation to the geodes. Robert. On Mon, Feb 14, 2011 at 2:46 PM, Miguel Lokida mlok...@yahoo.fr wrote: Hi, I use osg 2.8.2 and I would like an advice on the problem that block me. I have this graph: transform1 | |___ geode1 | |___ transform2 | |__geode2 So, I have set this: int inheritanceMask = (osgUtil::SceneView::ALL_VARIABLES ~osgUtil::SceneView::CULL_MASK); myViewer-setInheritanceMask(inheritanceMask); myViewer-setCullMask(0x3); And I have set: transform1-setNodeMask(0x0); transform2-setNodeMask(0x1); The problem is that during the rendering process, geode2 is not rendering whereas my nodeMask is valid for transform2. I guess that during traversal, because transform1 node mask is false, the visit stop and transform2 is not displayed. What is the solution to allow the process and display the transform2 and geode2 ? Thank you for your advices. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36627#36627 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Culling mask problem.
Hi Robert, (I have modified my graph in my last post because it was not clearly displayed.) So, I understand what you mean. I have made such graph because geode 2 follow geode1 transformations. I will try the solution to make geode1 and geode2 independents. Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36631#36631 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cameras and FBOs
Hi Javier Is there any way to explicitly pass an osg::FrameBufferObject to a Camera, so the camera renders into it? Yes you can use a framebufferobject as a render to texture target, checkout the osgprerender example. If you want to use the result of your render in your main app i.e. read the pixel info for some sort of gpu compute, then you need to use a pbuffer for your main viewer. You set it up something like the following Set pbuffer in the graphics traits (used to create your context) to true Set the viewers renderTargetImplementation to FRAME_BUFFER_OBJECT Attach an image as the cameras color buffer. Now when you render the result will end up in the image and could be saved to disk if you like. Hope that helps Tom PS Checkout my helper viewer class and check for the _renderOffScreen bits http://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxViewer.cpp Around line 305 and 357 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Culling mask problem.
As you set the mask of Transform1 to 0x0 You told the system to not to consider that node. Than as T2 and G2 are children T1 they will not be consider either See http://www.vis-sim.com/imgdp/vp_cullmasks_01.jpg http://www.vis-sim.com/imgdp/vp_cullmasks_01a.jpg Gordon Tomlinson 3D Technology System Engineering Consultant Overwatch® 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. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Miguel Lokida Sent: Monday, February 14, 2011 9:47 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Culling mask problem. Hi, I use osg 2.8.2 and I would like an advice on the problem that block me. I have this graph: transform1 | |___ geode1 | |___ transform2 | |__geode2 So, I have set this: int inheritanceMask = (osgUtil::SceneView::ALL_VARIABLES ~osgUtil::SceneView::CULL_MASK); myViewer-setInheritanceMask(inheritanceMask); myViewer-setCullMask(0x3); And I have set: transform1-setNodeMask(0x0); transform2-setNodeMask(0x1); The problem is that during the rendering process, geode2 is not rendering whereas my nodeMask is valid for transform2. I guess that during traversal, because transform1 node mask is false, the visit stop and transform2 is not displayed. What is the solution to allow the process and display the transform2 and geode2 ? Thank you for your advices. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36627#36627 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Main frame buffer corruption when using a slave camera to POST_RENDER to a FBO
Hi Robert, Thanks for your reply. Yes, odd things are certainly happening. From what I am observing it would be more sensible to create the camera at start time. However I am still confused by why this corruption occurs. The osgViewer::Viewer is running in CullDrawThreadPerContext mode. The main thread of my application is calling osgViewer::frame using an frame on idle strategy in wxWindows. I do not use osgViewer::run. The screen capture is called from UI code in this thread. I was assuming, that because of the End Rendering Dispatch Barrier that when osgViewer:frame returns all rendering activity should have finished. Is this correct? I assume from your comments that nodemask is honoured on cameras added by addSlave as well as those added as nodes in the graph. That is useful to know. I have made some notes on concurrency in the various threading models. I would be grateful if you could comment on them and correct me where necessary. I will then put them in the wiki. I apologise in advance if they are utter nonsense, but this stuff is a bit difficult to follow from the code! It took me a while to work out that in standard OSG code the queue of operations in the GraphicsContext is actually always empty and it is the call to the renderer object in the runOperations code that does all the work! SingleThreaded The thread that calls osgViewer::Frame does everything sequentially. CullDrawThreadPerContext An additional thread is created for each GraphicsContext held by the viewer. These additional threads run in parallel but are synchronised to start a cull and draw sequence when the thread that calls osgViewer::frame enters the “Start Rendering” barrier. The thread that calls osgViewer::frame is prevented from returning from that function until all of the additional threads have entered the “End Rendering Dispatch barrier”. (The dynamic draw block is also used, but is it superfluous in this case?) DrawThreadPerContext An additional thread is created for each GraphicsContext held by the viewer. These threads run freely performing the draw operations, they are not synchronised by any barriers. Culling is performed by the main thread during the call to osgViewer:frame. OsgViewer::frame will not return until all dynamic object rendering is complete. CullThreadPerContextDrawThreadPerCamera An additional thread is created for each GraphicsContext held by the viewer. These threads run freely performing the draw operations, they are not synchronised by any barriers. An additional thread is created for the master camera and each slave camera. These camera threads run in parallel but are synchronised to start a draw sequence when the thread that calls osgViewer::Frame enters the “Start Rendering” barrier. OsgViewer::frame will not return until all dynamic object rendering is complete. (Does this mean that non dynamic drawing might not be complete?) Cheers, Roger[/b] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36637#36637 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Main frame buffer corruption when using a slave camera to POST_RENDER to a FBO
Hi James, I'm afraid I'm rather too busy to comment on details today. Robert. On Mon, Feb 14, 2011 at 4:08 PM, Roger James ro...@beardandsandals.co.uk wrote: Hi Robert, Thanks for your reply. Yes, odd things are certainly happening. From what I am observing it would be more sensible to create the camera at start time. However I am still confused by why this corruption occurs. The osgViewer::Viewer is running in CullDrawThreadPerContext mode. The main thread of my application is calling osgViewer::frame using an frame on idle strategy in wxWindows. I do not use osgViewer::run. The screen capture is called from UI code in this thread. I was assuming, that because of the End Rendering Dispatch Barrier that when osgViewer:frame returns all rendering activity should have finished. Is this correct? I assume from your comments that nodemask is honoured on cameras added by addSlave as well as those added as nodes in the graph. That is useful to know. I have made some notes on concurrency in the various threading models. I would be grateful if you could comment on them and correct me where necessary. I will then put them in the wiki. I apologise in advance if they are utter nonsense, but this stuff is a bit difficult to follow from the code! It took me a while to work out that in standard OSG code the queue of operations in the GraphicsContext is actually always empty and it is the call to the renderer object in the runOperations code that does all the work! SingleThreaded The thread that calls osgViewer::Frame does everything sequentially. CullDrawThreadPerContext An additional thread is created for each GraphicsContext held by the viewer. These additional threads run in parallel but are synchronised to start a cull and draw sequence when the thread that calls osgViewer::frame enters the “Start Rendering” barrier. The thread that calls osgViewer::frame is prevented from returning from that function until all of the additional threads have entered the “End Rendering Dispatch barrier”. (The dynamic draw block is also used, but is it superfluous in this case?) DrawThreadPerContext An additional thread is created for each GraphicsContext held by the viewer. These threads run freely performing the draw operations, they are not synchronised by any barriers. Culling is performed by the main thread during the call to osgViewer:frame. OsgViewer::frame will not return until all dynamic object rendering is complete. CullThreadPerContextDrawThreadPerCamera An additional thread is created for each GraphicsContext held by the viewer. These threads run freely performing the draw operations, they are not synchronised by any barriers. An additional thread is created for the master camera and each slave camera. These camera threads run in parallel but are synchronised to start a draw sequence when the thread that calls osgViewer::Frame enters the “Start Rendering” barrier. OsgViewer::frame will not return until all dynamic object rendering is complete. (Does this mean that non dynamic drawing might not be complete?) Cheers, Roger[/b] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36637#36637 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 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] OSG 2.9.10 on iOS
Hi Dani, have you added osgTerrain to the linking phase? Cheers. Alessandro On Fri, Feb 11, 2011 at 9:48 AM, Dani Devesa arseni...@gmail.com wrote: Hi, I've been trying loading an .ive model too. I've downloaded the last version of the git repository. When I uncomment the //USE_OSGPLUGIN(ive) line and try to compile it, I still get two link errors: Code: ive::Terrain::read(ive::DataInputStream*), referenced from: ive::DataInputStream::readNode() in libosgdb_ive.a(DataInputStream.o) ive::Terrain::write(ive::DataOutputStream*), referenced from: ive::DataOutputStream::writeNode(osg::Node const*) in libosgdb_ive.a(DataOutputStream.o) How did you fix it? Thank you very much for your help. ... Thank you! Cheers, Arsenikal -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36541#36541 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 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
[osg-users] Mouse cursor won't redraw
Hi, I'm having a mouse cursor/ windowing issue that I'm hoping someone has run across. I'm changing the mouse cursor via the setCursor() method copied below in my Windows App's preframe function. It works, but the cursor doesn't actually redraw without some sort of mouse input. I can't seem to find a way to trigger this repaint without mouse movement. I've tried the RequestRedraw() and RequestContinuousUpdate() methods on the window with no luck. I also tried sending repaint messages to the Windows view as well as spoofing the mouse movement. I'm sure I'm missing something. Any insight is appreciated. Thank you! Cheers, Garrett Change Cursor: Code: osgViewer::Viewer::Windows windows; mViewer-getWindows(windows); for(osgViewer::Viewer::Windows::iterator itr = windows.begin(); itr != windows.end();++itr) { (*itr)-setCursor(osgViewer::GraphicsWindow::WaitCursor); } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36646#36646 ___ 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] Transparent Viewers/Close Viewer
That worked beautifully! Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36650#36650 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Drawable::UpdateCallback, Modelview and projection matrices
Hello all, Is there a way to get the current ModelView and Projection matrices in the update() call? Thanks, Brad --- Brad Colbert Renaissance Sciences Corporation ___ 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
Hi Shayne, I totally agree to you, but as I said I have to take care on my regular job (medical research and doctorate student in medical science), so it will take a littel bit to accomplish it. Today eent I plan to tag osgVisual 0.6 and i hope to finish the documentation/wiki to the new features till the end of the week. The next task I have to solve is terrain modification (flattening terrain and/or curting wholes in it) to allow to insert airport models with a flat runway. After that I would like to dive into CIGI. I totally agree that currently osgVisual is only useful for very few people wich can use the proprietary VCL implementation. CIGI would be great there - expecially because VCL only supports doubles currently, so it is tricky to update object labels etc. ;) Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36652#36652 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Drawable::UpdateCallback, Modelview and projection matrices
Hi Brad On Mon, Feb 14, 2011 at 7:10 PM, Brad Colbert bcolb...@rscusa.com wrote: Is there a way to get the current ModelView and Projection matrices in the update() call? There isn't necessarily any one modelview and projection matrix as the OSG can have multiple cameras rendering the scene at one time. Is the viewer's master Camera that you want a handle to? If so just get the viewer's camera and get it's projection and view matrixes and then get the model matrices using the osg::computeLocalToWorldMatrix(NodePath) wher the NodePath is supplied by the NodeVisitor::getNodePath(). Robert, ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Imported Model Transparency
Hello, I have a scene with an OSG constructed 3d grid layout. I then import models I've created with Blender (in the .obj format) into the grid. When I view these things together, you can see the grid through the model, but you cannot see one model through another model. Is this a Blender issue? Or is there some way that I'm rendering the imported models incorrectly? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36654#36654 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Drawable::UpdateCallback, Modelview and projection matrices
Hi Robert, I'm computing the NDC coordinates of Particles in a derived ParticleSystem. I'm doing it in the drawImplementation which feels wrong, but can live with it. I was interested in moving this computation to the update phase, but I'm starting to think this isn't the best plan. This was just a quick investigation to figure out if it could be moved. Thanks Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Monday, February 14, 2011 11:34 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Drawable::UpdateCallback, Modelview and projection matrices Hi Brad On Mon, Feb 14, 2011 at 7:10 PM, Brad Colbert bcolb...@rscusa.com wrote: Is there a way to get the current ModelView and Projection matrices in the update() call? There isn't necessarily any one modelview and projection matrix as the OSG can have multiple cameras rendering the scene at one time. Is the viewer's master Camera that you want a handle to? If so just get the viewer's camera and get it's projection and view matrixes and then get the model matrices using the osg::computeLocalToWorldMatrix(NodePath) wher the NodePath is supplied by the NodeVisitor::getNodePath(). 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] Off on trip, back next Monday
Hi All, I'm just heading off for a trip, and will be back and online catching up with mail and submissions next Monday (21st Feb). Have fun :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Imported Model Transparency
Nevermind, solved. The issue was that I had the box's GL_DEPTH_TEST set to off. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36658#36658 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Off on trip, back next Monday
Yo Bob, are you taking the family somewhere or are you on business? Our lot are off all week but I'm pretty much at work all days on the valley grind - turbulent times... Out for now and enjoy! Col. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Off on trip, back next Monday
Ignore please - send Robert a PM to half the world - apologies. Colin. On 14/02/2011 22:24, Colin Dunlop wrote: Yo Bob, are you taking the family somewhere or are you on business? Our lot are off all week but I'm pretty much at work all days on the valley grind - turbulent times... Out for now and enjoy! Col. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Off on trip, back next Monday
Oops, yes I'm away with the family to stay with Julia's family. Will be doing bits of work while away. Good luck @ the valley On 14 Feb 2011 22:29, Colin Dunlop co...@collectivevista.com wrote: Ignore please - send Robert a PM to half the world - apologies. Colin. On 14/02/2011 22:24, Colin Dunlop wrote: Yo Bob, are you taking the family somewhere or are you on business? Our lot are off all week but I'm pretty much at work all days on the valley grind - turbulent times... Out for now and enjoy! Col. ___ 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
Re: [osg-users] Cameras and FBOs
Hi Javier Sorry, I see what you're asking now, what you actually want to look at is osgUtil::RenderStage::runCameraSetup In this function you will see how a cameras BufferAttachment list is used to create relevant fbo etc. The created fbo is stored in the _fbo variable of the RenderStage. I think this stems back to the days of osg using producer as it feels rather like this sort of thing should be happening in the viewer. I think that's why it's quite difficult to follow. What are you trying to achieve with the fbo once you have it? Tom On 14 February 2011 23:30, Javier Taibo javier.ta...@gmail.com wrote: Hi Thomas, Thanks for the answer, but you didn't really understand what I was asking for. I know I can use a FBO to do render to texture or to an image or to a render buffer. The question was if I can have access to the FBO used by the camera, either by passing a FBO pointer to the camera or getting a pointer to the FBO of the camera. I have looked for it in the source code, but I found no way to do it. Thanks anyway. I think I will try by adding an FBO to the StateSet of the part of the scenegraph under the camera. Regards On Mon, Feb 14, 2011 at 4:35 PM, Thomas Hogarth thomas.hoga...@gmail.comwrote: Hi Javier Is there any way to explicitly pass an osg::FrameBufferObject to a Camera, so the camera renders into it? Yes you can use a framebufferobject as a render to texture target, checkout the osgprerender example. If you want to use the result of your render in your main app i.e. read the pixel info for some sort of gpu compute, then you need to use a pbuffer for your main viewer. You set it up something like the following Set pbuffer in the graphics traits (used to create your context) to true Set the viewers renderTargetImplementation to FRAME_BUFFER_OBJECT Attach an image as the cameras color buffer. Now when you render the result will end up in the image and could be saved to disk if you like. Hope that helps Tom PS Checkout my helper viewer class and check for the _renderOffScreen bits http://code.google.com/p/hogbox/source/browse/trunk/src/hogbox/HogBoxViewer.cpp Around line 305 and 357 -- Javier Taibo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Main frame buffer corruption when using a slave camera to POST_RENDER to a FBO
After more checking I can see that my finding that test number 4. was not producing the corruption is false. This is due to the fact that the debugger was stopping all threads. If I put breakpoints on two consecutive (nearly) instructions, then the corruption appears again. I now assume that the corruption apppears for one frame in all cases when the rendering order is set to POST_RENDER. Any explanations are welcome, but are of academic interest only :-) Roger -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36664#36664 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparent Viewers/Close Viewer
So, along the same lines... One of these views contains a windowmanager that controls my 2D GUI that I want on top of the other views. Since my GUI is an L shape, with the main 3D view surrounded by the L, placing the GUI on top of the other views blocks off those views (since the view is a square), but placing the other views on top of the GUI view prevents me from placing GUI elements above those views... Is there a simpler way than just creating more views for GUI elements I want to sit on top of everything else? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=3#3 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] extending Blender with pbuffer/rendering to texture
Hi, I have somewhat similar questions to recent FBO question, but not quite, so I would ask in a new thread. I try to extend Blender with osg rendering ( just because osg does many things better than Blender namely I use osgPango to render dynamically text). First - it is fairly easy to create in osg app pbuffer by setting traits-pbuffer = true; and then osg::ref_ptrosg::GraphicsContext pbuffer = osg::GraphicsContext::createGraphicsContext(traits.get()); if (pbuffer.valid()) { osg::notify(osg::NOTICE)Pixel buffer has been created successfully.std::endl; osg::ref_ptrosg::Camera camera = createOrthoCamera(WINDOW_WIDTH, WINDOW_HEIGHT); camera-setGraphicsContext(pbuffer.get()); osg::GraphicsContext* context = camera-getGraphicsContext(); camera-setViewport(new osg::Viewport(0,0,WINDOW_WIDTH/*traits-width*/,WINDOW_HEIGHT/*traits-height*/)); GLenum buffer = pbuffer-getTraits()-doubleBuffer ? GL_BACK : GL_FRONT; camera-setDrawBuffer(buffer); camera-setReadBuffer(buffer); viewer.setCamera(camera.get()); } set viewer data, set render callback and make it viewer.renderingTraversals(); to perform rendering once. after which it is possible to read glReadPixels and apply them as texture. Obviously, Blender has another context and osg::DisplaySettings* ds = osg::DisplaySettings::instance().get(); traits-width = WINDOW_WIDTH; traits-height = WINDOW_HEIGHT; traits-pbuffer = true; osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits(ds); osg::ref_ptrosg::GraphicsContext pbuffer = osg::GraphicsContext::createGraphicsContext(traits.get()); causes subsequent attachment to blender texture to fail. I tried to notify pbuffer traits with traits-setInheritedWindowPixelFormat = true; osg::ref_ptrosgViewer::GraphicsWindowWin32::WindowData wdata = new osgViewer::GraphicsWindowWin32::WindowData( GetActiveWindow(),false ); traits-inheritedWindowData = wdata.get(); but to no avail - I still have problems ( and BTW I found that code in windows pbuffer won't use inherited data - it will created temporary window). so the question is - if I use osg to render to pbuffer in complex OpenGL application, how to make that contexts problems does not occur? I seen in replies for osg/OpenGL apps integration that FrameBuffer ( pbuffer ) is easiest way to go. but in my case I did not got working solution. so what should be changed to get rendering to pbuffer with osg in outside app ( even if it requires to make changes in core osg - what - to get rid of makecurrent or instead keep track of makecurrent etc?). Best regards Sergey ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] extending Blender with pbuffer/rendering to texture
Hi, after some thought the answer to my question could look like it might be OK to use Blender as external context provider, then render to FBO , such that I get data from Blender osg::ref_ptrosg::Referenced windata = new osgViewer::GraphicsWindowWin32::WindowData(m_hWndBlender); then // Create the Graphics Context osg::GraphicsContext* gc = osg::GraphicsContext::createGraphicsContext(traits.get()); // Init a new Camera (Master for this View) osg::ref_ptrosg::Camera camera = new osg::Camera; // Assign Graphics Context to the Camera camera-setGraphicsContext(gc); osg::Image * fboImage = new osgImage(); fboImage-allocateImage( width, height, 1, GL_RGB, GL_UNSIGNED_BYTE); camera-attach( osg::Camera::COLOR_BUFFER, fboImage); osg::Camera::RenderTargetImplementation renderImplementation; renderImplementation = osg::Camera::FRAME_BUFFER_OBJECT; // tell the camera to use OpenGL frame buffer object where supported. camera-setRenderTargetImplementation(renderImplementation); then setup camera callback but maybe there is something else not to ruin Blender rendering? Regards Sergey ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org