Re: [osg-users] Object transparency
Hi, Thanks for the reply! I partially solved the problem by activating the Facing cull. But as you explain, if overlaps the arm with the body, for example, I still have the same problem ... I'll try to fix it! Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31005#31005 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture2D subload callback gone
Hi Thomas, I'm afraid I don't have any specific to recommend as there type of problem really requires one to see the problem first hand and step through all the relevant code. So if you can get an example together than illustrates the problem then this would be a big help. Cheers, Robert. On Mon, Aug 23, 2010 at 10:11 PM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Further update Bit of digging on the mailing list revealed this post. http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg35004.html Sounds like it could be what's effecting me as my code was checked out quite some time ago. I'll check the code i have at work against the latest svn tomorrow, but have a feeling this is the culprit. A risk of moving to a non release version I guess Cheers Tom On 23 August 2010 19:23, Thomas Hogarth thomas.hoga...@googlemail.com wrote: More info on the Texture2D callback issue. The version I have that works actually links to osg 2.6.1 or 2.8.2. So seems the bug has crept in with 2.9.8 and I'm assuming is caused by the texture pool. I think I read somewhere you can disable it so I'll give it a try. Tom ___ 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] Can we used OSG for ES 2.0 project on linux??
Hi list, Can we used OSG for our ES 2.0 project on linux project . I am asking because its still in beta duild no stable build. Guys please help me out on this. Thank you! Cheers, Rakesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31007#31007 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable/Disable stereo during runtime
Hi, i'm still trying to enable or disable stereo during runtime. I created a small app, which simply recreates the graphic context when you press g. It does not enable or disable stereo at all (due to lack of stereo hw at the moment), but i think the actual stereo on/off can be easily added when this app is working properly. Code: #include stdafx.h #include osgDB/ReadFile #include osgViewer/CompositeViewer #include osgGA/TrackballManipulator class GCEventHandler : public osgGA::GUIEventHandler { public: GCEventHandler(osgViewer::CompositeViewer * viewer, osgViewer::View * view) : m_viewer(viewer) , m_view(view) , m_x(200) , m_y(200) , m_width(800) , m_height(600) , m_recreateContext(false) { } void preFrame() { if(m_recreateContext) { m_recreateContext = false; destroyCamera(); recreateContext(); createCamera(); } } bool createContext() { osg::ref_ptrosg::GraphicsContext::Traits traits = new osg::GraphicsContext::Traits; traits-readDISPLAY(); if (traits-displayNum0) traits-displayNum = 0; traits-screenNum = 0; traits-x = m_x; traits-y = m_y; traits-width = m_width; traits-height = m_height; traits-alpha = 0; traits-stencil = 0; traits-windowDecoration = true; traits-doubleBuffer = true; traits-sharedContext = 0; osg::ref_ptrosg::GraphicsContext gc = osg::GraphicsContext::createGraphicsContext(traits.get()); if(gc.valid()) { m_gw = dynamic_castosgViewer::GraphicsWindow*(gc.get()); m_viewer-addView(m_view); } return gc.valid(); } void destroyContext() { m_viewer-removeView(m_view); m_viewer-stopThreading(); if(m_gw.valid()) { m_gw-close(); m_gw = NULL; } } bool recreateContext() { destroyContext(); return createContext(); } void destroyCamera() { osg::Camera * camera = m_view-getCamera(); osg::ref_ptrosg::GraphicsContext gc = camera-getGraphicsContext(); if(gc.valid()) { m_gw = dynamic_castosgViewer::GraphicsWindow*(gc.get()); } camera-setGraphicsContext(NULL); } void createCamera() { osg::Camera * camera = m_view-getCamera(); camera-setGraphicsContext( m_gw.get() ); camera-setProjectionMatrixAsPerspective( 30.0f, static_castdouble(m_width) / static_castdouble(m_height), 1.0, 1000.0); camera-setViewport( new osg::Viewport( 0, 0, m_width, m_height)); } virtual bool handle(const osgGA::GUIEventAdapter ea,osgGA::GUIActionAdapter aa, osg::Object*, osg::NodeVisitor*) { switch(ea.getEventType()) { case osgGA::GUIEventAdapter::KEYUP: { switch(ea.getKey()) { case 'g': m_recreateContext = true; break; } } break; } return osgGA::GUIEventHandler::handle(ea,aa); } private: osgViewer::CompositeViewer * m_viewer; osgViewer::View * m_view; osg::ref_ptrosgViewer::GraphicsWindow m_gw; int m_x; int m_y; int m_width; int m_height; bool m_recreateContext; }; int main(int argc, char** argv) { // use an ArgumentParser object to manage the program arguments. osg::ArgumentParser arguments(argc,argv); osgViewer::CompositeViewer viewer(arguments); // report any errors if they have occurred when parsing the program arguments. if (arguments.errors()) { arguments.writeErrorMessages(std::cout); return 1; } if (arguments.argc()=1) { arguments.getApplicationUsage()-write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); return 1; } osg::ref_ptrosgViewer::View view = new osgViewer::View(); viewer.addView(view); view-setCameraManipulator( new osgGA::TrackballManipulator ); // add the GC handler osg::ref_ptrGCEventHandler gchandler = new GCEventHandler(viewer, view); view-addEventHandler(gchandler); gchandler-createContext(); gchandler-createCamera(); // load the data osg::ref_ptrosg::Node loadedModel = osgDB::readNodeFiles(arguments); if (!loadedModel) { std::cout arguments.getApplicationName() : No data loaded std::endl; return 1; } // any option left unread are converted into errors to write out later. arguments.reportRemainingOptionsAsUnrecognized(); // report any errors if they have occurred when parsing the program arguments. if (arguments.errors()) { arguments.writeErrorMessages(std::cout); return 1; }
Re: [osg-users] Texture2D subload callback gone
Hi Robert I've rolledback a minor version to 2.8.3 and that has fixed the problem (no changes to my code). I've had to do this as we are on a deadline. However my home project uses a similar setup so I will be back with an example app showing the issue at some point Cheers Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable/Disable stereo during runtime
Hi Andreas, Enable stereo with: osg::DisplaySettings::instance()-setStereo( true ); and set to false to disable it. Wang Rui ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can we used OSG for ES 2.0 project on linux??
Hi Rakesh, On Tue, Aug 24, 2010 at 3:24 PM, Rakesh Parmar rakes...@kpitcummins.com wrote: Can we used OSG for our ES 2.0 project on linux project . I am asking because its still in beta duild no stable build. Guys please help me out on this. Linux was the development platform I used for OpenGL ES 1.1 and 2.0 development. The code has been checked in at the end of the year, so while there hasn't been a stable release made since then the actual code itself is reasonably well established. In general the OSG code base in svn/trunk and dev releases is kept at a pretty high standard, any problems that are observed which seek to tackle as soon as we can and get a fix checked into svn/trunk. This means that svn/trunk and dev releases can often be more polished than the previous stable release. There are occasional regressions though, as you are working with an evolving code, so while in general you should be comfortable use developer versions you should also be prepared to help pitch in a get problems characterised and solved. Getting stuck in with the code base is a good thing for both yourselves and the OSG as whole, as you can help make sure it addresses your particular needs better as well as make sure the OSG code base stabilizes nicely for the next stable release. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable/Disable stereo during runtime
I'm afraid it's a bit more complicated than your suggested line. Wang Rui wrote: osg::DisplaySettings::instance()-setStereo( true ); I want to enable/disable stereo mode during the runtime of my application. The line above only changes the display settings for the next graphic context to be created, but it does not change anything on my existing GC. Regards, Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31012#31012 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable/Disable stereo during runtime
Hi Andreas, It can work as a runtime switch of stereo mode. The SceneView will check the getStereo() method every cull() and draw() to see if it should use stereo parameters to render the scene. In that case you won't have to reallocate the graphics context all the time. I've already done the same work before. :) Wang Rui 2010/8/24 Andreas Roth osgfo...@tevs.eu: I'm afraid it's a bit more complicated than your suggested line. Wang Rui wrote: osg::DisplaySettings::instance()-setStereo( true ); I want to enable/disable stereo mode during the runtime of my application. The line above only changes the display settings for the next graphic context to be created, but it does not change anything on my existing GC. Regards, Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31012#31012 ___ 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] Enable/Disable stereo during runtime
Thank you Wang Rui! I haven't thought it would be so easy ;-) I use the quad buffer stereo mode. Do i have to create my graphic context with quad buffer enabled or can i turn it on later (during runtime)? Is there a draw back when quad buffer is enabled but stereo is not enabled (concerning performance)? Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31014#31014 ___ 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...
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 Overwatch(r) 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Invitation to connect on LinkedIn
LinkedIn OpenSceneGraph, I'd like to add you to my professional network on LinkedIn. - Shoham Shoham Ben-Har Software Eng. at Classified Israel Confirm that you know Shoham Ben-Har https://www.linkedin.com/e/-qywqtf-gd923034-5v/isd/1596264912/hRMVNAaT/ -- (c) 2010, LinkedIn Corporation___ 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
[osg-users] Textures problems in FLTK Viewer utility with LOD model and Viewer.
Hi, I have a very strange problem. I've written an FLTK application, which use the viewer (pretty similar to the FLTKViewer in the OSG examples), that compose and show LOD models. I can load multiples models and I inserted these models as childs of an osg::LOD node. Then, I've tried to write the LOD model into a file using writeObject method and ref_ptr original LOD pointer as first parameter. Now, I've a strange behaviour. In the viewer ALL WORKS FINE, I can see the models switch and all relatives textures correctly. The written LOD model is correct in terms of meshes (I see the correct models transition when the bound is reached) but there is a very strange problem with the textures (assuming to use 2 models): 1. If I DON'T switch between near and middle object in the viewer, then the LOD model written have NO TEXTURE for the NEAR object, but have the CORRECT texture for the second model! 2. If I SWITCH between near and middle object in the viewer, then I see NO TEXTURE for all LOD objects models. I've tried to disable the my_viewer-setSceneData(LOD_model_pointer) (and the Fl::redraw() idle action), so that I can't view the models loaded in the viewer. In this case, the LOD written model is correct!!! There are all textures!!! I've tried also writing the LOD model without using the graphical application (this is rougly the same test...) and, obviously, all works fine!!! So, seems that if an object is visualized under the viewer, then the writeObject method don't writes the textures informations, otherwise is ok. In effects, the near model is ever showed as first and so don't ever has the textures. The viewer locks the texture informations...?!? This is very strange for me... Can you help me? Many thanks! Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31019#31019 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] drawImplementation not being called every frame
Hi, I have tried to implement fade quad following the code of osgText::FadeText. However, I found my drawImplementation not being called every frame. The code is almost identical except using osg::Geometry instead of osg::Text. Code is attached. Would anyone please give me some light? Thank you! :-) Cheers, Yun-Ta -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31021#31021 Attachments: http://forum.openscenegraph.org//files/fadequad_168.h http://forum.openscenegraph.org//files/fadequad_127.cpp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable/Disable stereo during runtime
Hi Andreas, Yes, you have to set traits-quadBufferStereo to true and create you graphics context. It will automatically add a WGL_STEREO_ARB attribute to the WGL pixel format settings. I haven't heard of any obvious draw back here. Wang Rui 2010/8/25, Andreas Roth osgfo...@tevs.eu: Thank you Wang Rui! I haven't thought it would be so easy ;-) I use the quad buffer stereo mode. Do i have to create my graphic context with quad buffer enabled or can i turn it on later (during runtime)? Is there a draw back when quad buffer is enabled but stereo is not enabled (concerning performance)? Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31014#31014 ___ 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] drawImplementation not being called every frame
Hi Yun-Ta, Have you disabled display list with setUseDisplayList(false)? Otherwise the drawImplementation() method will be called only once to create the display list. And the latter will be actually used for rendering every frame. Cheers, Wang Rui 2010/8/25, Yun-Ta Tsai bbns.t...@gmail.com: Hi, I have tried to implement fade quad following the code of osgText::FadeText. However, I found my drawImplementation not being called every frame. The code is almost identical except using osg::Geometry instead of osg::Text. Code is attached. Would anyone please give me some light? Thank you! :-) Cheers, Yun-Ta -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31021#31021 Attachments: http://forum.openscenegraph.org//files/fadequad_168.h http://forum.openscenegraph.org//files/fadequad_127.cpp ___ 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] Textures problems in FLTK Viewer utility with LOD model and Viewer.
Hi Dario, On 25/08/10 4:26 , Dario Minieri wrote: Now, I've a strange behaviour. In the viewer ALL WORKS FINE, I can see the models switch and all relatives textures correctly. The written LOD model is correct in terms of meshes (I see the correct models transition when the bound is reached) but there is a very strange problem with the textures (assuming to use 2 models): 1. If I DON'T switch between near and middle object in the viewer, then the LOD model written have NO TEXTURE for the NEAR object, but have the CORRECT texture for the second model! 2. If I SWITCH between near and middle object in the viewer, then I see NO TEXTURE for all LOD objects models. I've tried to disable the my_viewer-setSceneData(LOD_model_pointer) (and the Fl::redraw() idle action), so that I can't view the models loaded in the viewer. In this case, the LOD written model is correct!!! There are all textures!!! I've tried also writing the LOD model without using the graphical application (this is rougly the same test...) and, obviously, all works fine!!! So, seems that if an object is visualized under the viewer, then the writeObject method don't writes the textures informations, otherwise is ok. In effects, the near model is ever showed as first and so don't ever has the textures. The viewer locks the texture informations...?!? This is very strange for me... Are you saving '.ive' files with inlined textures by any chance? Once a texture is applied/used its associated image data by default is removed from memory to save space. This means that the image *data* cannot be saved to disk anymore (but the file name can). You can prevent this by calling 'setUnRefImageDataAfterApply(false)' on the textures. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org