[osg-users] Blender osgExport
Hi there, I am having a hard time to get the osgexport doing anything - is there a known-to-work revision? Right now with the latest rev I get the GUI but after Write File an empty Filename.log file - so kind of hard to debug. Cheers, Hartmut -- Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGViewer Camera Coordinate System, elevation
Hi Chris, Chris 'Xenon' Hanson wrote: J.P. Delport wrote: Hi, did you build your DB with --geocentric? I didn't. I hadn't explored that option. Is that necessary, and can you comment on exactly what that does? I figured that would put my data in geocentric coordinates, which is not what I want. I can't say that it's necessary, but I've never built any databases without it. We usually need to position objects in meters relative to a coordinate system rooted on some point on the planet and the --geocentric coupled with the CoordinateSystemNode works well for this. I want the data in lat/lon (as it is), I just wonder about how the OSGViewer camera ended up in lat/lon as well, since AFAIK, it's not in the file VPB wrote, and therefore not under the Lat/Lon Coordinate System Node VPB created for my data. I'm not sure about what the CoordinateSystemNode contains without --geocentric. jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Q: how do I render an object only to the depth buffer, not to the color buffer?
Hi Robert, I thought it would be that simple, couldn't find it in the code though. Thanks! regards Raymond Robert Osfield wrote: HI Raymond, You simple disable the writes to the colour buffer using the osg::ColorMask StateAttribute. Robert. On Fri, May 15, 2009 at 3:33 PM, Raymond de Vries ree...@xs4all.nl wrote: Hi everyone, I've searched the mailing list but could not find an answer or clue for the solution to my problem. In principle, the issue seems simple to me but I find it hard to come up with an OSG solution. I would like to start my rendering with an object that does write to the depth buffer but does not write to the color buffer. I expect that I need to do something about the color mask but that is a camera setting. Can anyone point me in the right direction? Thanks a lot, best regards Raymond ___ 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] OpenSceneGraph-2.8.1 release candidate four tagged
Hi Robert, I tested the new ReaderWriterCURL.cpp. It compiled ok with my system (libcurl 7.10.6). I also made a test by copying the cessna.osg file to a web-server with a new name cessna2.osg. The libcurl plugin seems to work since I was able to access it with a hyperlink address. Thanks! :) John Ivar On Fri, May 15, 2009 at 5:17 PM, Robert Osfield robert.osfi...@gmail.comwrote: Ho John, On Fri, May 15, 2009 at 3:32 PM, Robert Osfield robert.osfi...@gmail.com wrote: I've found libcurl 7.10.4 and 7.10.8 on the libcurl website, but no 7.10.6. 7.10.8 doesn't have the curl_easy_strerror and this is easy to avoid using by the other codes are a bit more awkward. I've worked out how to use the lib version in the source itself to switch off use of features that more modern features. The modified ReaderWriterCURL.cpp is attached. These changes are also checked into svn/trunk and the OSG-2.8 branch. Could you please test these out on your system? Thanks, 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
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
On Sat, May 16, 2009 at 9:05 PM, p...@tcl3d p...@tcl3d.org wrote: Hi Robert, OSG 2.8.1-rc4 compiled without problems and is running fine with my applications on the following systems: XP 32-bit, VS2005 SP1, CMake 2.6.4 SuSE 11.1 32-bit, gcc 4.3.2, CMake 2.6.4 Thanks Paul. I hadn't even realized that there was a CMake 2.6.4, but now I do and I'm glad to see it doesn't break the OSG build system :-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
Hi John, On Mon, May 18, 2009 at 9:52 AM, John Ivar Haugland john.haugl...@gmail.com wrote: I tested the new ReaderWriterCURL.cpp. It compiled ok with my system (libcurl 7.10.6). I also made a test by copying the cessna.osg file to a web-server with a new name cessna2.osg. The libcurl plugin seems to work since I was able to access it with a hyperlink address. Thanks! :) Thanks for the testing. Most functionality should work, but you'll get codes that that messages on errors, and authentication is not likely to work fully, due to lack of features. For standard web access it should be fine though, and slightly less functionality web access is far better than no web access. On the osgShadow front, I really can't test things out directly so I'll need you to pitch in with testing changes. To try an replecate the problems you are seeing I changed the ViewDependentShadowTechnique to have the ViewData in a private section, this broke the compile of a number of the classes in the osgShadow in what looks to be roughly the same way as your errors. I then added friend class declarations in the ViewDependentShadowTechnique till I got the whole osgShadow compiling again. Thankfully this did work out. I've now changed the private: back to protected: so the ABI should be any different - for the 2.8.0 I'm trying to keep ABI compatibility so this is important. The changed file is attached, could you please apply this and do a new build. Fingers crossed this will fix the build and everything will build for you without any local mods. Could you let me know how you get on so I can move ahead with merging this fix and making... yet another rc... :-) Robert. ViewDependentShadowTechnique Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Blender osgExport
Hi Hartmut, Can you give more information about the exporter you are using ? i take care of the version on this page http://www.openscenegraph.org/projects/osg/wiki/Community/NodeKits/osgAnimation If you have problem with it, could you report the blender file and step that result in a empty osg file, without that i can't really help Cheers, Cedric On Mon, 2009-05-18 at 18:05 +1200, Hartmut Seichter wrote: Hi there, I am having a hard time to get the osgexport doing anything - is there a known-to-work revision? Right now with the latest rev I get the GUI but after Write File an empty Filename.log file - so kind of hard to debug. Cheers, Hartmut -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:morni...@plopbyte.net http://www.plopbyte.net signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] render depth buffer to image for one time
Alright, for whom it may concerns, it's all in the GraphicsContext especially in the pixel buffer. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12367#12367 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG_OpenCV Help
Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) {//.. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsignedchar*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (John Steinbis jsteinbis at gmail.com Mon Sep 17 11:04:04 PDT 2007) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function Convert_OpenCV_to_OSG_IMAGE() is called in the main loop as follows: while { //.getPixelBufferObject()-setImage(Convert_OpenCV_to_OSG_IMAGE(pImage, ((osg::Image*)(video.get(); //. }(!viewer.done()) What might be the problem? When I disable the code segment osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsignedchar*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); everything is OK but as you can guess I cannot use the processed frame as a texture in 3D environment. Thanks for your helps... Best Regards Ugras Erdogan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] No texture loaded on 3d model with osgViewer
I tried doing this. i got the debug logs but it does not seem that the loader is loading any texture! It is searching for the 3ds file and the 3ds plugin. but nothing else. Code: GraphicsContext::setWindowingSystemInterface() 01E58E10 1055D01C CullSettings::readEnvironmentalVariables() DatabasePager::addDatabaseThread() HANDLE_NON_HTTP DatabasePager::addDatabaseThread() HANDLE_ONLY_HTTP CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() DriveManipulator::_height set to ==1.5 CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() CullSettings::readEnvironmentalVariables() itr='C:\OpenSceneGraph-2.8.0\build2\bin' FindFileInPath() : trying C:\OpenSceneGraph-2.8.0\build2\bin\osgPlugins-2.8.0\osgdb_3dsd.dll ... FindFileInPath() : USING C:\OpenSceneGraph-2.8.0\build2\bin\osgPlugins-2.8.0\osgdb_3dsd.dll Opened DynamicLibrary osgPlugins-2.8.0/osgdb_3dsd.dll FindFileInPath(girl.3ds): returning girl.3ds NODE TRAVERSAL of 3ds file XD Soft node name [$$$DUMMY] node id0 node parent id 65535 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [FS_2Figure] pivot 0 0 0 pos -20.8967 -2.02229 -77.348 scl 0.1 0.1 0.1 rot 0.707107 0 0 0.707107 user data node name [sub01] node id1 node parent id 0 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [] pivot 0 0 0 pos 0 0 0 scl 1 1 1 rot -0 -0 -0 1 user data node name [sub02] node id2 node parent id 0 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [] pivot 0 0 0 pos 0 0 0 scl 1 1 1 rot -0 -0 -0 1 user data node name [sub03] node id3 node parent id 0 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [] pivot 0 0 0 pos 0 0 0 scl 1 1 1 rot -0 -0 -0 1 user data node name [sub04] node id4 node parent id 0 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [] pivot 0 0 0 pos 0 0 0 scl 1 1 1 rot -0 -0 -0 1 user data node name [sub05] node id5 node parent id 0 node matrix: 0.1 0 0 0 0 0 0.1 0 0 -0.1 0 0 -20.8967 -2.02229 -77.348 1 node data: objectdata instance [] pivot 0 0 0 pos 0 0 0 scl 1 1 1 rot -0 -0 -0 1 user data MESH TRAVERSAL of 3ds file XD Soft mesh name sub01 0.1 0 0 0 0 -4.37114e-009 0.1 0 0 -0.1 -4.37114e-009 0 -20.8967 -2.02229 -77.348 1 mesh name sub02 0.1 0 0 0 0 -4.37114e-009 0.1 0 0 -0.1 -4.37114e-009 0 -20.8967 -2.02229 -77.348 1 mesh name sub03 0.1 0 0 0 0 -4.37114e-009 0.1 0 0 -0.1 -4.37114e-009 0 -20.8967 -2.02229 -77.348 1 mesh name sub04 0.1 0 0 0 0 -4.37114e-009 0.1 0 0 -0.1 -4.37114e-009 0 -20.8967 -2.02229 -77.348 1 mesh name sub05 0.1 0 0 0 0 -4.37114e-009 0.1 0 0 -0.1 -4.37114e-009 0 -20.8967 -2.02229 -77.348 1 Final OSG node structure looks like this: Group Group Geode Geode Geode Geode Geode Stats before: Object Type #Unique #Instanced StateSet1 5 Group 2 2 Transform 0 0 LOD 0 0 Switch 0 0 Geode 5 5 Drawable5 5 Geometry5 5 Vertices158517 158517 Primitives 291010 291010 Optimizer::optimize() doing REMOVE_LOADED_PROXY_NODES Optimizer::optimize() doing COMBINE_ADJACENT_LODS Optimizer::optimize() doing OPTIMIZE_TEXTURE_SETTINGS Optimizer::optimize() doing SHARE_DUPLICATE_STATE Num of StateSet=1 Optimizer::optimize() doing FLATTEN_STATIC_TRANSFORMS ** RemoveStaticTransformsVisitor *** Pass 0 Optimizer::optimize() doing CHECK_GEOMETRY Optimizer::optimize() doing MERGE_GEOMETRY MERGE_GEOMETRY took 5.34016e-005 Optimizer::optimize() doing REMOVE_REDUNDANT_NODES Stats after: Object Type #Unique #Instanced StateSet1 5 Group 2 2 Transform
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
Hi Robert, I used the new ViewDependentShadowTechnique file. The error messages are the same as with the previous version of the file. See below: [ 34%] Building CXX object src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o In file included from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/LightSpacePerspectiveShadowMap:23, from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/src/osgShadow/LightSpacePerspectiveShadowMap.cpp:18: /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique: In member function `virtual osgShadow::ViewDependentShadowTechnique::ViewData* osgShadow::ProjectionShadowMapMinimalBoundsBaseClass, ShadowProjectionAlgorithmClass::initViewDependentData(osgUtil::CullVisitor*, osgShadow::ViewDependentShadowTechnique::ViewData*)': /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context make[2]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o] Error 1 make[1]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/all] Error 2 make: *** [all] Error 2 On Mon, May 18, 2009 at 11:24 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi John, On Mon, May 18, 2009 at 9:52 AM, John Ivar Haugland john.haugl...@gmail.com wrote: I tested the new ReaderWriterCURL.cpp. It compiled ok with my system (libcurl 7.10.6). I also made a test by copying the cessna.osg file to a web-server with a new name cessna2.osg. The libcurl plugin seems to work since I was able to access it with a hyperlink address. Thanks! :) Thanks for the testing. Most functionality should work, but you'll get codes that that messages on errors, and authentication is not likely to work fully, due to lack of features. For standard web access it should be fine though, and slightly less functionality web access is far better than no web access. On the osgShadow front, I really can't test things out directly so I'll need you to pitch in with testing changes. To try an replecate the problems you are seeing I changed the ViewDependentShadowTechnique to have the ViewData in a private section, this broke the compile of a number of the classes in the osgShadow in what looks to be roughly the same way as your errors. I then added friend class declarations in the ViewDependentShadowTechnique till I got the whole osgShadow compiling again. Thankfully this did work out. I've now changed the private: back to protected: so the ABI should be any different - for the 2.8.0 I'm trying to keep ABI compatibility so this is important. The changed file is attached, could you please apply this and do a new build. Fingers crossed this will fix the build and everything will build for you without any local mods. Could you let me know how you get on so I can move ahead with merging this fix and making... yet another rc... :-) 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
Re: [osg-users] Stereo Problem
There is one possibility that MAY work. I cetainly dont guarentee it. I used to work extensivesly selling and assembling hardware and developing software for 3d stereoscopic VR systems up till about 1 year ago, so some of what i say may be out of date. It is quite correct to say that of the NVIDIA cards the only ones that support Quadbuffer stereo are the proffesiional range QUADRO FX workstation cards. These are workstation cards aimed at the proffesional user and as a example a Quadro FX 4500 would set you back $AUS 4500.00 With one of these cards you can use software written for quadbuffer software and the nvidia drivers even have options to output in different stereo formats to different stereo display devices, so they are very flexiable and desirable cards if you can afford them. Dont mistake the cheap crap quadro multiscreen range for this, the ones needed are QUADRO FX and can be identified by having on the back of the card a THREE (3) pin round connector for the lcd shutter glasses to connect. This is very important. Every second day i would have someone ring up and say ive got a card with this connector but my glasses dont work Of course what they had was a Geforce with a 4 FOUR pin SVHS connector, but do you think i could convince them of this ? The standard Geforce gaming cards DO NOT SUPPORT QUAD BUFFER STEREO, they never have and they never will. All 3D stereo/glasses accessories/drivers that produce 3d stereo on a Geforce card are hacks by Nvidia that interupt the opengl/directx rendering, and attempt to introduce 3d stereo by overriding the game renderding and producing an left right image. How well this works depends on the Game, and how the game is put together, and can vary a lot. So you can see this teqchnique does not rely on your software supporting stereo, it tries to add stereo to exisitng games. Another limitation of this is it only works full screen without window borders. Opengl quadbuffer stereo can work in windows on the desktop, you can have a stereo display inside a window with the rest of the desktop looking normal or you can have it full screen. The whole opengl quadbuffer thing goes right back to the orignal opengl development on SGI machines from years ago, and has been part of opengl ever since. As far as im aware the only directx stereo options are 3rd party hacks and i would never ever use them for a proffesional display. Also i think the stereo sync singal for the glasses that comes out of the 3 pin connector on the quadro is leached of the sync signal from the Analogue VGA port of the grpahics card So if you have a regular Geforce card, and you have lcd shutter glasses that connect and get a signal from the VGA port (there are several manufacturers that produce such glasses readily availbale) and you are using XP you can try a program called Rivatuner from Guru3d.com. I did this about 1.5 years ago and it worked ok, but i certainly dont guarentee any results for anyone. When you install rivatuner you can install a driver to change the PCIID of the graphics card to make it think it is a quadro FX, and as a result have the quadro FX driver features including the quadbuffer stereo capability. You can then run quad buffer stereo software on your geforce that is now thinking it is a QuadroFX. Your VGA attached glasses should work, once you run you stereo application. This worked for me about 1.5 years ago, if there have been software or hadrware changes that prevent this from functioning then you are on your own. You wont get Quadro performance out of your geforce doing this, and the consumer stereo feature for games previosuly avaialbel will not work either. Peted ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG_OpenCV Help
Hi, instead of the magic 3 in your setImage, try GL_RGB. E.g. we have some code like this: -setImage(ImageFormat_.getWidth(), ImageFormat_.getHeight(), 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, (im-Data_[0]), osg::Image::NO_DELETE) jp Ugras Erdogan wrote: Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) { //. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (*John Steinbis* jsteinbis at gmail.com mailto:osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Convertion%20to%20osg%3A%3AImage%20from%20IplImage%20%28OpenCV%29%20for%0A%09useas%20textureIn-Reply-To=E4D07AB09F5F044299333C8D0FEB45E9042314AE%40nrccenexb1.nrc.ca /Mon Sep 17 11:04:04 PDT 2007/) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function Convert_OpenCV_to_OSG_IMAGE() is called in the main loop as follows: while(!viewer.done()) { //. getPixelBufferObject()-setImage(Convert_OpenCV_to_OSG_IMAGE(pImage, ((osg::Image*)(video.get(); //. } What might be the problem? When I disable the code segment osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); everything is OK but as you can guess I cannot use the processed frame as a texture in 3D environment. Thanks for your helps... Best Regards Ugras Erdogan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Set image as static background
Hi Ralf, Thanks, but it still doesn't work... I've added the first function you wrote, and then connected the return geode to a projection pointer, connecting it to my model's root. Shouldn't i connect it (or set it...) to the camera viewer somehow? Here's what i did: osg::Geode* geode = new osg::Geode; osg::Geometry* geometry = osg::createTexturedQuadGeometry(osg::Vec3(0,0.5,0),osg::Vec3(1,0,0),osg::Vec3(0,0,1),0, 0, 1, 1); geode-addDrawable(geometry); osg::Texture2D* t_texture = new osg::Texture2D(osgDB::readImageFile(stars.jpg)); geode-getOrCreateStateSet()-setTextureAttributeAndModes(0,t_texture, osg::StateAttribute::ON); geode-getOrCreateStateSet()-setTextureMode(0, GL_TEXTURE_2D,osg::StateAttribute::ON); osg::Projection* Proj = new osg::Projection; Proj-setMatrix(osg::Matrix::ortho2D(0,1,0,1)); root-addChild(Proj); Proj-addChild(geode); osgViewer::Viewer viewer; viewer.setSceneData (root.get()); return viewer.run(); Thanks again!!! Cheers, roy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12377#12377 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
Hi Robert, I have successfully built rc4 and run our application on the following: Ubuntu Hardy gcc 4.2.4 GeForce 8800GTS OpenGL 3.0.0 NVIDIA 180.44 Ubuntu Breezy gcc 4.0.2 QuadroFX 4500 OpenGL 2.0.2 NVIDIA 87.62 Cheers, -Tony -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12378#12378 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Set image as static background
Hi Roy I see nothing strange in your sample, have you tried setting a higher debug level to see if some of the functions fail? Are you running this in a simeple viewer app like one of the samples? Brgs. Ralf Stokholm 2009/5/18 roy vardi royva...@walla.co.il Hi Ralf, Thanks, but it still doesn't work... I've added the first function you wrote, and then connected the return geode to a projection pointer, connecting it to my model's root. Shouldn't i connect it (or set it...) to the camera viewer somehow? Here's what i did: osg::Geode* geode = new osg::Geode; osg::Geometry* geometry = osg::createTexturedQuadGeometry(osg::Vec3(0,0.5,0),osg::Vec3(1,0,0),osg::Vec3(0,0,1),0, 0, 1, 1); geode-addDrawable(geometry); osg::Texture2D* t_texture = new osg::Texture2D(osgDB::readImageFile(stars.jpg)); geode-getOrCreateStateSet()-setTextureAttributeAndModes(0,t_texture, osg::StateAttribute::ON); geode-getOrCreateStateSet()-setTextureMode(0, GL_TEXTURE_2D,osg::StateAttribute::ON); osg::Projection* Proj = new osg::Projection; Proj-setMatrix(osg::Matrix::ortho2D(0,1,0,1)); root-addChild(Proj); Proj-addChild(geode); osgViewer::Viewer viewer; viewer.setSceneData (root.get()); return viewer.run(); Thanks again!!! Cheers, roy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12377#12377 ___ 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_OpenCV Help
Hi, What I did: I created a class in which I setted frames from the video as textures (using setImage), and refreshed these textures using a callback. It works fine, but is maybe unadapted to your problem. About setImage: I used GL_RGB8 where you tried 3, and GL_BGR as the following argument (I guess OpenCV has a different convention). Ugras Erdogan wrote: Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) { //. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (John Steinbis jsteinbis at gmail.com (osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Convertion%20to%20osg%3A%3AImage%20from%20IplImage%20%28OpenCV%29%20for%0A%09useas%20textureIn-Reply-To=E4D07AB09F5F044299333C8D0FEB45E9042314AE%40nrccenexb1.nrc.ca) Mon Sep 17 11:04:04 PDT 2007) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function Convert_OpenCV_to_OSG_IMAGE() is called in the main loop as follows: while(!viewer.done()) { //. getPixelBufferObject()-setImage(Convert_OpenCV_to_OSG_IMAGE(pImage, ((osg::Image*)(video.get(); //. } What might be the problem? When I disable the code segment osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); everything is OK but as you can guess I cannot use the processed frame as a texture in 3D environment. Thanks for your helps... Best Regards Ugras Erdogan -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12381#12381 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
Hi John, Man that's frustrating. This really does look a buggy compiler The friend even allowed me make the nested base class private on gcc 4.3.2, for gcc 3.2 to ignore the friend, and not obey the usual rules of subclasses having access to protected members is doubly bad. I've been reviewing docs on ABI compatibility and moving this nested class to the public scope would indeed break binary compatibility, so isn't something we can entertain for OSG-2.8.1. Unless someone can spot another way of tricking gcc 3.2 to not tripping over this code we'll just to accept 2.8.1 won't compile out of the box under RHEL 3.2, and pointer users at what mods they can make locally. For the 2.9.x series we could possible look at re-organizing the classes in a way that breaks the ABI, since the ABI is already incompatible with 2.8.0. Robert. On Mon, May 18, 2009 at 11:44 AM, John Ivar Haugland john.haugl...@gmail.com wrote: Hi Robert, I used the new ViewDependentShadowTechnique file. The error messages are the same as with the previous version of the file. See below: [ 34%] Building CXX object src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o In file included from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/LightSpacePerspectiveShadowMap:23, from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/src/osgShadow/LightSpacePerspectiveShadowMap.cpp:18: /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique: In member function `virtual osgShadow::ViewDependentShadowTechnique::ViewData* osgShadow::ProjectionShadowMapMinimalBoundsBaseClass, ShadowProjectionAlgorithmClass::initViewDependentData(osgUtil::CullVisitor*, osgShadow::ViewDependentShadowTechnique::ViewData*)': /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context make[2]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o] Error 1 make[1]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/all] Error 2 make: *** [all] Error 2 On Mon, May 18, 2009 at 11:24 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi John, On Mon, May 18, 2009 at 9:52 AM, John Ivar Haugland john.haugl...@gmail.com wrote: I tested the new ReaderWriterCURL.cpp. It compiled ok with my system (libcurl 7.10.6). I also made a test by copying the cessna.osg file to a web-server with a new name cessna2.osg. The libcurl plugin seems to work since I was able to access it with a hyperlink address. Thanks! :) Thanks for the testing. Most functionality should work, but you'll get codes that that messages on errors, and authentication is not likely to work fully, due to lack of features. For standard web access it should be fine though, and slightly less functionality web access is far better than no web access. On the osgShadow front, I really can't test things out directly so I'll need you to pitch in with testing changes. To try an replecate the problems you are seeing I changed the ViewDependentShadowTechnique to have the ViewData in a private section, this broke the compile of a number of the classes in the osgShadow in what looks to be roughly the same way as your errors. I then added friend class declarations in the ViewDependentShadowTechnique till I got the whole osgShadow compiling again. Thankfully this did work out. I've now changed the private: back to protected: so the ABI should be any different - for the 2.8.0 I'm trying to keep ABI compatibility so this is important. The changed file is attached, could you please apply this and do a new build. Fingers crossed this will fix the build and everything will build for you without any local mods. Could you let me know how you get on so I can move ahead with merging this fix and making... yet another rc... :-) 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Set image as static background
Hi, Yep, I'm running it on a simple viewer. My model is quite simple - a root which is connected to a few children: - A basic primitive shapes based devil - Earth - Moon And now I've added the projection object as another child to the root. All the functions work, I've checked... Shouldn't i attach the projection object to the camera somehow? I've tried to do it through viewer.GetCamera()-SetProjectionMatrix(Proj), but it fails to read the projection object as a matrix, even if i try to cast it... To be honest, i didn't think that it would be such a hard task. I thought it should be quite trivial, after all - changing the RGB colors of the background is done through a single method... Perhaps the problem is with the scaling of the image? Thanks, roy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12383#12383 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions]osgParticle ParticleSystemandModularEmitterindifferent coordinate systems
Hi Tim, Looks like this didn't go to the mailing list. So, here it is again. -Original Message- From: Tim Moore [mailto:timo...@redhat.com] Hi, Sorry to have dropped this on the floor; I missed your response below. Thank you for responding. I took a look at your examples, especially the one that is now broken. I see that what you were doing is quite similar to what the September patch does: construct a frame of reference for the ModularEmitter that is relative to ParticleSystem frame, even though it is rooted to the global frame in the scene graph. You end up doing the particle creation calculations in a frame that doesn't blow out float precision. That's close. The intent is, as you say, to avoid blowing out float precision. The September code makes the assumption that the ModularEmitter and ParticleSystem are both in real coordinate frames, which seems reasonable to me. I'm not sure what you mean by real coordinate frames. I would not put them in the same coordinate frame for the effect I want. See the jalopy description below. Both our methods require that the ParticleSystem be placed and moved to avoid precision errors. In FlightGear I manually change the coordinates of the particles when the ParticleSystem is moved. In the pre-September ModularEmitter code I lock the part of the graph with ParticleSystem drawables in place with a MatrixTransform. When the model moves the ParticleSystem drawables don't. The ModularEmitters use part of the model's MatrixTransform and part of the ParticleSystem drawable's locked MatrixTransform. In short, managing the ModularEmitter. This is what I think you're trying to avoid. Are you managing the particles created by the ParticleSystem drawables instead of the ModularEmitter? I suppose you might be able to get around this in some situations by playing with the velocity vector of the emitted particles, Not a general solution. but I like my approach better because the ModularEmitter does not need to be managed; it can simply be attached to the object from which the particles are emitted. I recommend that you attach the ModularEmitter to your model. It's the difference between cigarette smoke inside an old jalopy moving with the jalopy vs. the burning oil smoke from the tail pipe that, once emitted, no longer moves with the jalopy. I'm trying to do the equivalent of the later. I can do this without managing ModularEmitter and attaching it to the model except I get precision problems with particles. So, one of the following must be true: 1. Your particles always move with the model when the model moves. The cigarette smoke in the jalopy. No management of ModularEmitters or ParticleSystem drawables. 2. When your model moves you do a transform on every particle; even if there are many thousands. The burning oil smoke from the tailpipe. Managing ParticleSystem drawables and particles, not managing ModularEmitters. 3. Or, I still don't understand your use of particle effects. How would you take the original particle.osg, move it 60 meters and get it to work as I show in particle_move_6M_new_code.osg without the precision problems? I have access to a copy of FlightGear 1.9.1. Is there someplace in the FlightGear code I can see how you're managing the ParticleSystems? Or, not managing the ModularEmitters? Tom Jolley Jolley, Thomas P wrote: So, where does that leave us? What breaks by reverting the September changes on ModularEmitter.cpp? Do you have an example of your usage? Traversing the hierarchy to get double precision world matrices and applying it to single precision particle systems causes precision problems for my usage. Reverting the change helps me. One of the changes I made was to do the emitter particle placement calculations in double precision. In any case, someone has to manage the particle system so that the results will fit in single precision variables. Tim Tom Jolley -Original Message- From: Tim Moore FYI, my change wasn't intended to solve particle precision problems by itself, merely support an approach where the particle system is not rooted in the world frame of reference. Application management of the particle system transform is still needed. Before my submission that seemed to be broken. Tim ___ 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] Blender osgExport
Hi Harmut, I just updated the osgexport repository with some bug fixes if you use this exporter maybe it could help, else i will need a blender file to debug it. Cheers, Cedric On Mon, 2009-05-18 at 11:36 +0200, Cedric Pinson wrote: Hi Hartmut, Can you give more information about the exporter you are using ? i take care of the version on this page http://www.openscenegraph.org/projects/osg/wiki/Community/NodeKits/osgAnimation If you have problem with it, could you report the blender file and step that result in a empty osg file, without that i can't really help Cheers, Cedric On Mon, 2009-05-18 at 18:05 +1200, Hartmut Seichter wrote: Hi there, I am having a hard time to get the osgexport doing anything - is there a known-to-work revision? Right now with the latest rev I get the GUI but after Write File an empty Filename.log file - so kind of hard to debug. Cheers, Hartmut ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:morni...@plopbyte.net http://www.plopbyte.net signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Development of Qt support as part of osgViewer
So this happens to be exactly what I've been struggling with over the past week. I want a multithreaded OsgViewer to integrate into a QT GUI and added into a QT layout. I started with the osgviewerQT example and quickly learned that the embedded widget can't be multithreaded and that QOSGWidget/ViewerQOSG example doesn't attach to QT layouts/GUIs. I have not dove into the OsgViewer / GraphicsWindow code but it seems like others have gone down this road. What needs to be done to use an OsgViewer as a QT widget embedded into a larger GUI? I'd be happy to help in any work to generalize this type of integration. Thanks Scott On Mon, May 11, 2009 at 8:43 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi All, There has been lots of support questions relating to Qt integration with the OSG over the past year, and especially in the last few months. This a good in terms of see a cross platform GUI toolkit becoming more widely spread, bad in terms of the difficulties that users still have. Part of the difficulties is down to Qt being a little bit awkward to integrate with making it not entirely straight forward, and while we have an example, it's just a guide so lots of users are having to go re-invent the wheel each time. So it'd be good to try and address this issue by providing a better Qt/OSG widget for users to adopt directly. One of the design facets of osgViewer library is that it's designed to work with multiple windowing toolkits, with four models of integration possible: 1) GraphicsWindowEmbedded - provides very basic single threaded, single context window integration suitable for use with simple apps that use SDL/GLUT. 2) GraphicsWindow core osgViewer implementations (i.e. GraphisWindowWin32/X11/Carbon/Cocoa) - full OpenGL + multi-context, threadeding and pbuffer capabilities exposed. You'll find these implementation interfaces in include/osgViewer/api/Win32, X11, Carbon and Cocoa. 3) GraphicsWindow subclass (i.e GraphicsWindowWx) - 3rd party implementation of a GraphicsWindow, potential for full capabilities if all parts of GraphicsWindow are correctly implemented. For pbuffer support one will have to add PixelBuffer implementation as well. 4) GraphicsWindow window inheritance - windowing toolkit provides the window, while GraphicsWindowWin32/X11/Carbon/Cocoa provide the actual OpenGL context implementation. Now Item 1) is really just for very simple apps, and is often adopted by end users because it's really easy to use, but almost always starts limiting you as your project goes on. I wouldn't recommend 1 for anything by GLUT/SDL style apps. Items 2 is great for sim and games that don't need any GUI. You can get the full capabilities of the OSG with very little effort on your part. If you want a traditional 2D GUI though then it won't help you. Item 3 is possible, but rarely do 3rd party window toolkits do OpenGL really well, often they won't expose the full capabilities of OpenGL or support pbuffers. It also often requires the most work in implementation. Item 4 is possible, but a little bit awkward, but potentially can give users the best of both worlds - full OpenGL/OSG capabilities and the 2D GUI. -- So where does that leave the Qt side? We'll my preference would be to work together to get a GraphicsWindowQt and/or a window inheritance implemented in a full and flexible way that users could just reuse the implementation provided in a new include/osgViewer/api/Qt collection of headers. I would suggest the implementation should be done entirely in the headers to avoid the need for linking the osgViewer library itself to Qt. Now I've tinkered with Qt, but I'm not Qt expert, to get a really good implementation we'll need members of the community to pitch in with helping refine the implementation. Anybody feel that they could help spearhead this development? The first step might simple be to clean up the current Qt example, or start a new example where the new classes could be refined and when ready moved into their own directory in include/osgViewer/api/Qt. Thoughts? Volunteers? 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] Bug? CompositeViewer, Views and EventQueues, multiple windows
Hi all There is something strange (feature or bug?) in the way the osgViewer::CompositeViewer dispatches events to the windows. When there are multiple windows, each containing a single view to a single scene, the events do not seem to be routed to the proper view. I found what I guess is the guilty: the CompositeViewer::eventTraversal() method. There is a concept of master view, which seems to be related to the view having the focus, and this view gets all events, whatever the actual GraphicsContext that generated it. In GraphicsWindowWin32, the events are handled in a per-HWND basis and put in the window's EventQueue. Then the CompositeViewer takes all these events and remaps them (through the viewEventsMap). They are then sent to the remapped window instead of the original window. I'm sure there is a good reason why this remapping takes place, but in practice this causes problems as shown in the attached example. It creates two windows and attaches an event handler that catches RESIZE events, printing the name of the window (small or big) and the size (200x200 or 400x400). If you move the windows around (WM_MOVE and WM_SIZE both generate RESIZE events), you will sometimes see - correct output, i.e. small resized to 200x200 or big resized to 400x400 - and incorrect output, e.g. small resized to 400x400 When I move the big window around, the output is correct the first time, incorrect the second time - the OSG's internal focus might have changed. I haved used the CompositeViewer in the past, but embedded in wxWidgets, and I would get the RESIZE events from wxWidgets, not from the OSG so this behaviour went unnoticed for me until now. If it is a bug, I don't want to start modifying anything since I don't have all CompositeViewer usage scenarii in mind. If it is a feature, do you know what I am doing wrong ? I'm working on the latest SVN, Win32, VC9. Cheers Thibault osg_compositeviewer_events_bug.cpp Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] render depth buffer to image for one time
Hi, Please excuse all my spam... I tried the almost same code than mister Jojo. I tried 2 instances: -One using a created camera diffrent from the viewer's one. -The other using the viewer's camera. In the first case, I can grab the color image, but the camera isn't oriented at all as I tell it to (bad bad camera). In the second case I got nothing. Thus, I guess the only solution is using the viewer, isn't it? If you have nice documentation about the viewer, please, let me know! Thank you! Cheers, Maxime -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12388#12388 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple inheritance destructor
Hi, Thanks Robert. What I wanted to do is create a node that can automatically update itself. I am integrating its with ode so the position and orientation information is from ode. As for multiple inheritance, I thought that was one of the strength of c++ for code reusability. The problem can be avoided easily by putting the node inside the callback or the other, but not as compact in my opinion. I use osg itself uses multiple inheritance all the time. I probably need to overwrite the virtual destructor to avoid double deallocation on the same members that belong to Object. Thank you! Cheers, Rabbi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12389#12389 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Development of Qt support as part of osgViewer
Hi All, I'm mainly just tracking this thread trying to get a feel for what's working an what's not, and who might be able to help refine the right approach. So for nothing concrete has jumped out.. 2009/5/13 René Molenaar megamillerz...@gmail.com: Have you seen David Guthries implementation (posted a few days ago), it uses windowsystemwrapper to integrate osg/qt? No I haven't, was this posted on osg-users? Did I miss it spinning past a 100 knots? I don't know if it's related, but one design aspect to osgViewer which was built in front the start is the osg::GraphicsContext::WindowSystemInterface which provides the abstraction away from the implementation. This interface class was the potential of having multiple implementations, and for the implementations to be moved out into plugins, just like we have plugins for databases and wrappers right now. For ease of building and running OSG apps I didn't go for the full plugin approach from WindowSystemInterface, rather allowed implementations from X11, Win32, Carbon and Cocoa to be imbeded directly into the osgViewer. This means you only have to link against osgViewer to get a viewer up on the screen, but it does mean that the library itself isn't as flexible w.r.t dynamically loading the implementations. It wouldn't be a great deal of work to do this though. Or perhaps we could still have the inbuilt implementations, but allow plugins to add extra ones. A plugin for Qt support would certainly be possible. Potentially one could even compile the core osgViewer library without any default implementation and rely on such a plugin, or change the default implementation that one compiles against. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple inheritance destructor
Hi Rabbi On Mon, May 18, 2009 at 2:55 PM, Rabbi Robinson longa...@gmail.com wrote: Hi, Thanks Robert. What I wanted to do is create a node that can automatically update itself. I am integrating its with ode so the position and orientation information is from ode. As for multiple inheritance, I thought that was one of the strength of c++ for code reusability. The problem can be avoided easily by putting the node inside the callback or the other, but not as compact in my opinion. I use osg itself uses multiple inheritance all the time. I probably need to overwrite the virtual destructor to avoid double deallocation on the same members that belong to Object. Yikes. It really sounds like you need to sit down with some good books on OO programming and C++. There are plenty of pitfalls with multiple inheritance, you should use it very sparingly. One of the pitfalls is what happens in reference counting. Please do the background reading. Also conceptually A callback is not a node, a node is not a callback. Please don't try to mix things that aren't the same type of objects. There are lots of examples in the OSG where the node updates itself, without needing an update callback. Please have a look at nodes like osg::Sequence for an example. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] resizedImplementation bug when resizing slave camera
Hi Jean Sébastien, apparently my bug is due to bad view matrix, my shader need camera view matrix to compute it's effect. What you're proposing is to copy slave camera view matrix into master (default) camera matrix each frame, am I right ? Isn't it another way yo avoid this copy ? isn't it a little expensive ? 2009/5/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hello Alexandre, Well apparently I did achieve to set up my application with 2 slave camera, but there is one last problem, I'm using a shader for my sky sphere wich isn't working when using 2 slave cameras, has anyone already had trouble with shaders and slave camera ? Do you mean that (for example) lighting calculations give the wrong results? IIRC, if you need the projection/view matrix then you can't use the built-in uniform from OpenGL, because that will be your slave camera's projection/view matrix. You need the master view's matrices, which means you'll have to copy the master camera's matrices into uniforms each frame. If that wasn't the problem, you'll have to be more clear. What do you mean by a shader which isn't working? How is it not working? 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 -- Alexandre AMALRIC Ingénieur RD === PIXXIM S.A. 73E, rue Perrin-Solliers 13006 Marseille http://www.pixxim.fr ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate four tagged
Hi Robert, Yes. I agree with you. Thanks. John Ivar On Mon, May 18, 2009 at 2:39 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi John, Man that's frustrating. This really does look a buggy compiler The friend even allowed me make the nested base class private on gcc 4.3.2, for gcc 3.2 to ignore the friend, and not obey the usual rules of subclasses having access to protected members is doubly bad. I've been reviewing docs on ABI compatibility and moving this nested class to the public scope would indeed break binary compatibility, so isn't something we can entertain for OSG-2.8.1. Unless someone can spot another way of tricking gcc 3.2 to not tripping over this code we'll just to accept 2.8.1 won't compile out of the box under RHEL 3.2, and pointer users at what mods they can make locally. For the 2.9.x series we could possible look at re-organizing the classes in a way that breaks the ABI, since the ABI is already incompatible with 2.8.0. Robert. On Mon, May 18, 2009 at 11:44 AM, John Ivar Haugland john.haugl...@gmail.com wrote: Hi Robert, I used the new ViewDependentShadowTechnique file. The error messages are the same as with the previous version of the file. See below: [ 34%] Building CXX object src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o In file included from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/LightSpacePerspectiveShadowMap:23, from /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/src/osgShadow/LightSpacePerspectiveShadowMap.cpp:18: /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique: In member function `virtual osgShadow::ViewDependentShadowTechnique::ViewData* osgShadow::ProjectionShadowMapMinimalBoundsBaseClass, ShadowProjectionAlgorithmClass::initViewDependentData(osgUtil::CullVisitor*, osgShadow::ViewDependentShadowTechnique::ViewData*)': /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ViewDependentShadowTechnique:160: ` struct osgShadow::ViewDependentShadowTechnique::ViewData' is protected /private/jiha/shivr/JIHA/OSG/OpenSceneGraph-2.8.1/include/osgShadow/ProjectionShadowMap:77: within this context make[2]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/LightSpacePerspectiveShadowMap.o] Error 1 make[1]: *** [src/osgShadow/CMakeFiles/osgShadow.dir/all] Error 2 make: *** [all] Error 2 On Mon, May 18, 2009 at 11:24 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi John, On Mon, May 18, 2009 at 9:52 AM, John Ivar Haugland john.haugl...@gmail.com wrote: I tested the new ReaderWriterCURL.cpp. It compiled ok with my system (libcurl 7.10.6). I also made a test by copying the cessna.osg file to a web-server with a new name cessna2.osg. The libcurl plugin seems to work since I was able to access it with a hyperlink address. Thanks! :) Thanks for the testing. Most functionality should work, but you'll get codes that that messages on errors, and authentication is not likely to work fully, due to lack of features. For standard web access it should be fine though, and slightly less functionality web access is far better than no web access. On the osgShadow front, I really can't test things out directly so I'll need you to pitch in with testing changes. To try an replecate the problems you are seeing I changed the ViewDependentShadowTechnique to have the ViewData in a private section, this broke the compile of a number of the classes in the osgShadow in what looks to be roughly the same way as your errors. I then added friend class declarations in the ViewDependentShadowTechnique till I got the whole osgShadow compiling again. Thankfully this did work out. I've now changed the private: back to protected: so the ABI should be any different - for the 2.8.0 I'm trying to keep ABI compatibility so this is important. The changed file is attached, could you please apply this and do a new build. Fingers crossed this will fix the build and everything will build for you without any local mods. Could you let me know how you get on so I can move ahead with merging this fix and making... yet another rc... :-) 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
Re: [osg-users] Help: Using OSG To Build Tiled Display Wall
On 17. May 2009, at 11:11, Robert Osfield wrote: Hi Tim, On Sat, May 16, 2009 at 2:37 PM, Tim Moore timo...@redhat.com wrote: I've been thinking about this too, but without the global cull. Are you trying to avoid having a real scene graph on the local nodes and keep lists of drawables and StateSets instead? I would think that broadcasting the dynamic changes to the scene graph would result in less network traffic than broadcasting lists of drawables, but I suppose it depends very much on the application. A fully distributed scene graph would probably be more efficient that a distributed render graph approach, but it'd be more intrusive to the scene graph design and implementation as all nodes would need an fomarlised update mechanism. OpenSG has such support but is a more complicated object model than the OSG, which makes it more involved to use and extend than the OSG. In fact the only thing needed for this is a change notification mechanism. The distribution can build a 'shadow' hierarchy, and update the remote copies based on the notifications. The update mechanism and serialization can live outside the scene graph. The distributed render graph approach is lighter weight as you are only tracking changes to the drawable leaves and state which is more constrained and well encapsulated than other parts of the scene graph. I believe it'll be much easier to implement this approach in a non intrusive way than a full blow distributed scene graph, which is really why I suggest it, we'd be able to get much of scalability of the cluster without the complexity that normally comes with doing a distributed application or distributed scene graph. I'm wondering what the network load of such a distribution would be, and how one could cache the data. The beauty of the distributed scene graph is that on a static scene virtually no data has to be transmitted. It seems to me that the distributed render graph at least needs to transmit the equivalent of display list ID's. FYI: The Equalizer source tree has an example of an OSG/Eq integration relying on a shared filesystem to load the SG. We are thinking of extending this example (and OSG) towards using a distributed OSG, pending on time/financing. Best, Stefan. -- http://www.eyescale.ch http://www.equalizergraphics.com http://www.linkedin.com/in/eilemann ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Set image as static background
Set up a Camera as PRE_RENDER and configure its matrices to render in screen space. Then draw a fullscreen texture mapped quad. Then configure your top-level camera to not clear the color buffer. Don't let the fact that this is OSG confuse you. You control order and clearing through Camera nodes; otherwise there's really nothing different here than what you would need to do in, say, OpenGL or DirectX to accomplish the same effect. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Development of Qt support as part of osgViewer
Hi Robert, About David Guthries implementation, it was indeed posted on the osg-users ml. Here is a link to this thread : http://forum.openscenegraph.org/viewtopic.php?p=11636#11636 Cheers, Loïc On Mon, May 18, 2009 at 4:03 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi All, I'm mainly just tracking this thread trying to get a feel for what's working an what's not, and who might be able to help refine the right approach. So for nothing concrete has jumped out.. 2009/5/13 René Molenaar megamillerz...@gmail.com: Have you seen David Guthries implementation (posted a few days ago), it uses windowsystemwrapper to integrate osg/qt? No I haven't, was this posted on osg-users? Did I miss it spinning past a 100 knots? I don't know if it's related, but one design aspect to osgViewer which was built in front the start is the osg::GraphicsContext::WindowSystemInterface which provides the abstraction away from the implementation. This interface class was the potential of having multiple implementations, and for the implementations to be moved out into plugins, just like we have plugins for databases and wrappers right now. For ease of building and running OSG apps I didn't go for the full plugin approach from WindowSystemInterface, rather allowed implementations from X11, Win32, Carbon and Cocoa to be imbeded directly into the osgViewer. This means you only have to link against osgViewer to get a viewer up on the screen, but it does mean that the library itself isn't as flexible w.r.t dynamically loading the implementations. It wouldn't be a great deal of work to do this though. Or perhaps we could still have the inbuilt implementations, but allow plugins to add extra ones. A plugin for Qt support would certainly be possible. Potentially one could even compile the core osgViewer library without any default implementation and rely on such a plugin, or change the default implementation that one compiles against. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Loïc Simon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: Using OSG To Build Tiled Display Wall
Hi Stefan, On Mon, May 18, 2009 at 3:21 PM, Stefan Eilemann eilem...@gmail.com wrote: I'm wondering what the network load of such a distribution would be, and how one could cache the data. The beauty of the distributed scene graph is that on a static scene virtually no data has to be transmitted. It seems to me that the distributed render graph at least needs to transmit the equivalent of display list ID's. Yes, a distributed render graph would be kinda equivalent to distributing display list ID's. One would be tied to display lists though, immediate mode would be support far more efficiently that can be achieved with distributed GL implementations as the data that is dispatch to the graphics card is held on the slave, and only updated when needed. The distributed render graph should be considered a step up from distributed GL's, but it's not as efficient as a distributed app approach where you distribute just high level commands. A distributed scene graph would probably sit in between these two in terms of efficiency, at best it might be as good as a distributed high level app, at worst it could be worse than the distributed render graph (in cases where they are many dynamic nodes.) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] resizedImplementation bug when resizing slave camera
Hello Alexandre, What you're proposing is to copy slave camera view matrix into master (default) camera matrix each frame, am I right ? Isn't it another way yo avoid this copy ? isn't it a little expensive ? No, I'm proposing to copy the slave camera's view matrix into an osg::Uniform each frame so that you can use it from the shader for your lighting computations. It's not that expensive, no, and it's required so you can't really do without... 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
Re: [osg-users] Development of Qt support as part of osgViewer
Hi Loic, Thanks for the link. I've done a quick review of the implementation. In terms of osgViewer it is certainly a step above where the osgviewerQT example w.r.t WindowSystemInterface. The use of QGLWidget does limit one a bit though, and the way the QGLWidget is set is rather simplistic as ignores practically all of the settings in the Traits. Personally I'd favor an Qt implementation that use graphics window inheritance to get a full featured GraphicsWindow as a Qt widget. For Qt users I think there needs to be integration done in Qt terms as well, for instance having a OSGWidget that you can add to your application. Another side topic is do you have a window/widget that owns a viewer/composite viewer, or go for window/widget that owns just the GraphicsWindow, and the viewer is owned by the application in the traditional way that the OSG is used. There are reasons to use both approaches, the later being the most flexible. Robert. On Mon, May 18, 2009 at 3:34 PM, Simon Loic simon1l...@gmail.com wrote: Hi Robert, About David Guthries implementation, it was indeed posted on the osg-users ml. Here is a link to this thread : http://forum.openscenegraph.org/viewtopic.php?p=11636#11636 Cheers, Loïc On Mon, May 18, 2009 at 4:03 PM, Robert Osfield robert.osfi...@gmail.com wrote: Hi All, I'm mainly just tracking this thread trying to get a feel for what's working an what's not, and who might be able to help refine the right approach. So for nothing concrete has jumped out.. 2009/5/13 René Molenaar megamillerz...@gmail.com: Have you seen David Guthries implementation (posted a few days ago), it uses windowsystemwrapper to integrate osg/qt? No I haven't, was this posted on osg-users? Did I miss it spinning past a 100 knots? I don't know if it's related, but one design aspect to osgViewer which was built in front the start is the osg::GraphicsContext::WindowSystemInterface which provides the abstraction away from the implementation. This interface class was the potential of having multiple implementations, and for the implementations to be moved out into plugins, just like we have plugins for databases and wrappers right now. For ease of building and running OSG apps I didn't go for the full plugin approach from WindowSystemInterface, rather allowed implementations from X11, Win32, Carbon and Cocoa to be imbeded directly into the osgViewer. This means you only have to link against osgViewer to get a viewer up on the screen, but it does mean that the library itself isn't as flexible w.r.t dynamically loading the implementations. It wouldn't be a great deal of work to do this though. Or perhaps we could still have the inbuilt implementations, but allow plugins to add extra ones. A plugin for Qt support would certainly be possible. Potentially one could even compile the core osgViewer library without any default implementation and rely on such a plugin, or change the default implementation that one compiles against. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Loïc Simon ___ 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-submissions]osgParticle ParticleSystemandModularEmitterindifferent coordinate systems
Hi Tom, Tim et. al, I think what we probably need is a bit of revamp internally in osgParticle to properly support double precision positioning of the particle system and emitter. Exactly how this should look I can't say right now, I'd need to sit down and work out the current osgParticle class structure and see how it might all fit together. I haven't looked at it closely recently so I don't recall the details off the top of my head. Longer term osgParticle could do with be rewritten to use shaders + point sprites rather than the CPU centric implementation that we have right now. Perhaps this could be done at the same time as the above. Short term we are stuck with an fix that works for FlightGear and perhaps other apps that use osgParticle in similar ways, but breaks other apps that use osgParticle in other ways. Reverting to an older rev will just break things for FlightGear and other similar apps. So we are between a rock and hard place. Perhaps a short term solution would be to have an compile option or better still a variable that can control which behave is selected internally. For OSG-2.8.1 we need to stick to ABI compatibility, so the compile option would be the only way, but which should be the default perhaps an env var could be used to toggle the variable. Do one of you guys want to come up with an interim solutions? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG_OpenCV Help
Hi, First of all thanks for all the replies. But problem remains the same. Yes, OpenCV uses BGR format instead of RGB and the image origin should be flipped. Do you think there might be a multithreading issue as I use the same memory space for incoming video data from cam and for the processed video texturing. But I use a mutex synchronization object during modifications. But I do not know at the low level, if DirectShow (as I remember OpenCV relies on that for Win32 platforms)takes care of the threading issues when building the scene graph for video capture. What happens at best is this: I see the live unprocessed video as a texture on 3D object when I do not use setImage function and processed video at the openCV window. I will be working on this. I will be appreciate further suggestions Best Regards Ugras From: Maxime BOUCHER m.boucher...@gmail.com To: osg-users@lists.openscenegraph.org Sent: Monday, May 18, 2009 3:27:47 PM Subject: Re: [osg-users] OSG_OpenCV Help Hi, What I did: I created a class in which I setted frames from the video as textures (using setImage), and refreshed these textures using a callback. It works fine, but is maybe unadapted to your problem. About setImage: I used GL_RGB8 where you tried 3, and GL_BGR as the following argument (I guess OpenCV has a different convention). Ugras Erdogan wrote: Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) { //. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (John Steinbis jsteinbis at gmail.com (osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Convertion%20to%20osg%3A%3AImage%20from%20IplImage%20%28OpenCV%29%20for%0A%09useas%20textureIn-Reply-To=E4D07AB09F5F044299333C8D0FEB45E9042314AE%40nrccenexb1.nrc.ca) Mon Sep 17 11:04:04 PDT 2007) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function Convert_OpenCV_to_OSG_IMAGE() is called in the main loop as follows: while(!viewer.done()) { //. getPixelBufferObject()-setImage(Convert_OpenCV_to_OSG_IMAGE(pImage, ((osg::Image*)(video.get(); //. } What might be the problem? When I disable the code segment osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); everything is OK but as you can guess I cannot use the processed frame as a texture in 3D environment. Thanks for your helps... Best Regards Ugras Erdogan -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12381#12381 ___ 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_OpenCV Help
Well, these are things I ignore. I just can suggest you to grab each frame, using a timer to retrieve at the good time and skip some if the process isn't fast enough, and to dirty your image so that you call setImage only once (because it's heavy and unnecessary). -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12406#12406 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG_OpenCV Help
Hi Ugras, Did you try to run your code in single threaded mode? This could give you a hint whether problem is a race. It's difficult to guess what's going on, but did you try to lock mutex while you read data as well? This might effectively make your program serial during those phases (which defeats the whole purpose of running concurrent) but would at least indicate Ismail On Mon, May 18, 2009 at 5:49 PM, Ugras Erdogan ugraserdo...@yahoo.com wrote: Hi, First of all thanks for all the replies. But problem remains the same. Yes, OpenCV uses BGR format instead of RGB and the image origin should be flipped. Do you think there might be a multithreading issue as I use the same memory space for incoming video data from cam and for the processed video texturing. But I use a mutex synchronization object during modifications. But I do not know at the low level, if DirectShow (as I remember OpenCV relies on that for Win32 platforms)takes care of the threading issues when building the scene graph for video capture. What happens at best is this: I see the live unprocessed video as a texture on 3D object when I do not use setImage function and processed video at the openCV window. I will be working on this. I will be appreciate further suggestions Best Regards Ugras From: Maxime BOUCHER m.boucher...@gmail.com To: osg-users@lists.openscenegraph.org Sent: Monday, May 18, 2009 3:27:47 PM Subject: Re: [osg-users] OSG_OpenCV Help Hi, What I did: I created a class in which I setted frames from the video as textures (using setImage), and refreshed these textures using a callback. It works fine, but is maybe unadapted to your problem. About setImage: I used GL_RGB8 where you tried 3, and GL_BGR as the following argument (I guess OpenCV has a different convention). Ugras Erdogan wrote: Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) { //.. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (John Steinbis jsteinbis at gmail.com (osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Convertion%20to%20osg%3A%3AImage%20from%20IplImage%20%28OpenCV%29%20for%0A%09useas%20textureIn-Reply-To=E4D07AB09F5F044299333C8D0FEB45E9042314AE%40nrccenexb1.nrc.ca) Mon Sep 17 11:04:04 PDT 2007) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function Convert_OpenCV_to_OSG_IMAGE() is called in the main loop as follows: while(!viewer.done()) { //. getPixelBufferObject()-setImage(Convert_OpenCV_to_OSG_IMAGE(pImage, ((osg::Image*)(video.get(); //. } What might be the problem? When I disable the code segment osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); everything is OK but as you can guess I cannot use the processed frame as a texture in 3D environment. Thanks for your helps... Best Regards Ugras Erdogan -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12381#12381 ___ 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] handling trig exceptions due to floating point inaccuracies
I've been trying to use the SphericalManipulator class that was posted to the submission list a few weeks ago and it is throwing exceptions when it is trying to calculate acos(1.002) in the last line of this function: void SphericalManipulator::setByMatrix(const osg::Matrixd matrix) { _center=osg::Vec3(0,0,-_distance)*matrix; _azimuth=atan2(-matrix(0,0),matrix(0,1)); if(_rotationMode != MODE_2D) _zenith=acos(matrix(2,2)); } In my code, the matrix parameter is created by an inverse operation. In general, is there some way to avoid this problem, or do I need to add code that range checks critical values? Should the last line be changed to this block: double val = matrix(2,2); if ((val = 1) || (val = 1)) zenith = 0; else zenith = acos(val); Yuck. Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] handling trig exceptions due to floating point inaccuracies
Ack- acos(-1) is not pi. But the rest of my question still stands. Cory Riddell wrote: I've been trying to use the SphericalManipulator class that was posted to the submission list a few weeks ago and it is throwing exceptions when it is trying to calculate acos(1.002) in the last line of this function: void SphericalManipulator::setByMatrix(const osg::Matrixd matrix) { _center=osg::Vec3(0,0,-_distance)*matrix; _azimuth=atan2(-matrix(0,0),matrix(0,1)); if(_rotationMode != MODE_2D) _zenith=acos(matrix(2,2)); } In my code, the matrix parameter is created by an inverse operation. In general, is there some way to avoid this problem, or do I need to add code that range checks critical values? Should the last line be changed to this block: double val = matrix(2,2); if ((val = 1) || (val = 1)) zenith = 0; else zenith = acos(val); Yuck. Cory ___ 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] OpenSceneGraph-2.8.1 release candidate five tagged
Hi All, I've just tagged another release candidate, this time we've hit 2.8.1-rc5. Fingers crossed this will be our latest rc and we can quickly move on to tagging 2.8.1 and get some new binaries posted. http://www.openscenegraph.org/projects/osg/wiki/Downloads Source Code: ¶ source package : OpenSceneGraph-2.8.1-rc5.zip svn tag: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.1-rc5 OpenSceneGraph Could users please test out this latest rc5 this afternoon/evening and if things look good on the major platforms I'll tag 2.8.1 tomorrow morning. Thanks for your assistance, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] fading of an object using animation path
Hi, I am putting together an animation of an assembly process. I use an animation path to move the loaded files. I having been trying to get the one object to fade from 1.0 to 0.0. I set the transparency by overriding the material properties and I slowly decrease the alpha value but it only ever renders the object completely transparent in the animation. Does anyone know of a way around this or another to do it? Thanks in advance, Chris ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fading of an object using animation path
Hi Chris, You can check in examples directory for osganimation* example, there is an example that fade material attribute. Cheers, Cedric On Mon, 2009-05-18 at 12:40 -0400, Christopher Back wrote: Hi, I am putting together an animation of an assembly process. I use an animation path to move the loaded files. I having been trying to get the one object to fade from 1.0 to 0.0. I set the transparency by overriding the material properties and I slowly decrease the alpha value but it only ever renders the object completely transparent in the animation. Does anyone know of a way around this or another to do it? Thanks in advance, Chris ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:morni...@plopbyte.net http://www.plopbyte.net signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Development of Qt support as part of osgViewer
Hi all, I just posted some code to osg-submissions that may be of interest here. This is something that has been our Qt/OSG integration testbed here for a couple of months. We just dusted it off recently and got permission to post it and some time to clean it up. This demo uses Qt .ui files to define the basic GUI and re-works the object heirarchy from the osgviewerQT example so we can have a 4-way split window with a different scene graph in each of the 4 views, and an optional 5th view in it's own window. All is managed by a CompositeViewer. We've incorporated Martin Beckett's recent fix for WIN32 event queue handling. There are plenty of issues still to be dealt with, among which are the issues with tab-ing from view to view and which view is current in the Qt vs. OSG context. --Don Leich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.1 release candidate five tagged
I'll try, but not sure I can finish this afternoon. I was still working on rc 4. andy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Monday, May 18, 2009 12:20 PM To: OpenSceneGraph Users Subject: [osg-users] OpenSceneGraph-2.8.1 release candidate five tagged Hi All, I've just tagged another release candidate, this time we've hit 2.8.1-rc5. Fingers crossed this will be our latest rc and we can quickly move on to tagging 2.8.1 and get some new binaries posted. http://www.openscenegraph.org/projects/osg/wiki/Downloads Source Code: ¶ source package : OpenSceneGraph-2.8.1-rc5.zip svn tag: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.1-rc5 OpenSceneGraph Could users please test out this latest rc5 this afternoon/evening and if things look good on the major platforms I'll tag 2.8.1 tomorrow morning. Thanks for your assistance, 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
Re: [osg-users] Stereo Problem
Robert Osfield wrote: I look forward to the day when NVidia do the right thing on this. It's about time low cost stereo was rolled out. In the meantime, there's always RivaTuner (at least for Windows users): http://www.guru3d.com/category/rivatuner/ I haven't used it in a while, but it has the ability to tweak graphics cards at both the registry and the driver level. One capability is to soft-mod a GeForce into a Quadro FX card, providing many of the features that would otherwise be missing (including quad-buffer visuals). Using it might void your warranty, though, so consider that before trying it out. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
Hi Jason, I'm not sure RivaTuner will help in this context as there is the new USB hardware for doing the shutter glasses sync, this will need the driver to control it, so I'd expect the NVidia driver will need to specially about this hardware. One could try it... and then report back... Robert. On Mon, May 18, 2009 at 7:27 PM, Jason Daly jd...@ist.ucf.edu wrote: Robert Osfield wrote: I look forward to the day when NVidia do the right thing on this. It's about time low cost stereo was rolled out. In the meantime, there's always RivaTuner (at least for Windows users): http://www.guru3d.com/category/rivatuner/ I haven't used it in a while, but it has the ability to tweak graphics cards at both the registry and the driver level. One capability is to soft-mod a GeForce into a Quadro FX card, providing many of the features that would otherwise be missing (including quad-buffer visuals). Using it might void your warranty, though, so consider that before trying it out. --J ___ 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] What is everyone doing for GUIs?
Simon Hammett wrote: Gtk is quite nice but maybe an arse to install on windozes, there's dozens of dlls for it. We use Gtk, and we did go through the trouble of compiling it ourselves, which took a while. There is a binary release, though, and since it's pure C, there shouldn't be any runtime issues. http://gladewin32.sourceforge.net/ (The web site seems to have been hacked recently, but the files are there) --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] moving the camera to predefined locations smoothly
Ulrich, Ulrich Hertlein wrote: On 16/5/09 10:57 PM, Cory Riddell wrote: Today I tried to do the FRAME event method and it didn't work. So now I'm thinking that AnimationPath is actually what I should be using. Would AnimationPath provide a way for me to move the camera from some arbitrary position to a predefined position? Why doesn't it work? Going the AnimationPath route is of course possible (and might make things easier) but the main task in both cases is to compute the actual path, e.g. a B-spline with proper start/end points, ease-in/ease-out, ensure the viewer is facing the right direction etc. After you asked me that, I went back to try to figure out what didn't work. It turns out that I was able to get it working with a few small changes. I don't know what the correct parametric equation for moving a camera between two points on the surface of a sphere is. I changed my code to move the camera along a chord from point A to point B and that seems to work just fine. Any idea what the parametric equation for the arc connecting to points on a sphere is? Cory ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
Hi Peted Liked your info on Quadbuffered opengl and stereo modes. I have one interesting point to add. I recently brought a MacBook with an Nvidia 9400m graphics card. This card 'does' support quadbuffered opengl and seemingly so do all recent Macs using Geforce graphics cards. I guess it's because they have control over the hardware and drivers, but it's an interesting point. Only big problem is my Mac only has one display port and I don't have any shutter glasses :) Cheers Tom On another Stereo note, sadly Philips has stopped making their 3DWow range so looks like OSGs support will not be as great as I had hoped. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What is everyone doing for GUIs?
Hi, We are using WPF, which is Windows-only, of course. We have a thin layer written in C++/CLI that wraps our code that uses OSG. Brian Stewart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12433#12433 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG_OpenCV Help
Hi to all again, I found the solution, may be not very efficient but it works for now. The problem is not a threading or synchronization issue but a hardware dependent one as I concluded. Comments are welcomed. Now, I do not use the setImage() function. Instead I use the following code segment: osg::Image* osgImg1 = newosg::Image();osgImg1-allocateImage(cvImg-width, cvImg-height, 1, GL_RGBA_INTEGER_EXT, GL_UNSIGNED_BYTE);//Mutex.lock();{ { { p != 3 ? *(osgImg1-data() + 4*320 * r + 4*c + p) = ( *(osgImg1-data() + 4*320 * r + 4*c + p) = 255; } } }for(intr = 0; r cvImg-height; ++r) for(intc = 0; c cvImg-width; ++c) for(intp = 0; p 4; ++p)unsignedchar)(*(cvImg-imageData + 3 * 320 * r + 3 * c + p)) ://Mutex.unlock(); returnosgImg1; As you can notice above, I use GL_RGBA_INTEGER_EXT for allocation. My graphics hardware is ATI HD4850. As I know, th OpenGL assigns alpha channel after getting RGB data, so in the inner loop I just equated the alpha values for full opaque... Any suggestions are welcomed? Best regards, Ugras Erdogan From: Ismail Pazarbasi pazarb...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Monday, May 18, 2009 6:59:46 PM Subject: Re: [osg-users] OSG_OpenCV Help Hi Ugras, Did you try to run your code in single threaded mode? This could give you a hint whether problem is a race. It's difficult to guess what's going on, but did you try to lock mutex while you read data as well? This might effectively make your program serial during those phases (which defeats the whole purpose of running concurrent) but would at least indicate Ismail On Mon, May 18, 2009 at 5:49 PM, Ugras Erdogan ugraserdo...@yahoo.com wrote: Hi, First of all thanks for all the replies. But problem remains the same. Yes, OpenCV uses BGR format instead of RGB and the image origin should be flipped. Do you think there might be a multithreading issue as I use the same memory space for incoming video data from cam and for the processed video texturing. But I use a mutex synchronization object during modifications. But I do not know at the low level, if DirectShow (as I remember OpenCV relies on that for Win32 platforms)takes care of the threading issues when building the scene graph for video capture. What happens at best is this: I see the live unprocessed video as a texture on 3D object when I do not use setImage function and processed video at the openCV window. I will be working on this. I will be appreciate further suggestions Best Regards Ugras From: Maxime BOUCHER m.boucher...@gmail.com To: osg-users@lists.openscenegraph.org Sent: Monday, May 18, 2009 3:27:47 PM Subject: Re: [osg-users] OSG_OpenCV Help Hi, What I did: I created a class in which I setted frames from the video as textures (using setImage), and refreshed these textures using a callback. It works fine, but is maybe unadapted to your problem. About setImage: I used GL_RGB8 where you tried 3, and GL_BGR as the following argument (I guess OpenCV has a different convention). Ugras Erdogan wrote: Dear All, I am using openCV and OSG together in my project. What the problem is as follows: 1) When I try to convert the IplImage to osg::Image the following command line trace occurs. Except the last three lines, the trace shows the openCV and osg image properties. Pixel Bits: 32, Image Size (Byte): 307200 Video Depth: 1 cv Channels = 3 Convert_OpenCV_to_OSG_IMAGE()::Origin Passed 2... Mutex w/r : 0 error pixelFormat = error pixelFormat = 33 Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) 2) I lock the mutex in order to prevent simultaneous writes to osg::Image data and as you can see at 5th line above it returns the correct value 0. Then use the following code: void Convert_OpenCV_to_OSG_IMAGE(IplImage* cvImg, osg::Image* osgImg) { //.. osgImg-setImage(cvImg-width, cvImg-height, 1, 3, GL_RGB, GL_UNSIGNED_BYTE, (unsigned char*)(cvImg-imageData), osg::Image::AllocationMode::NO_DELETE, 1); //. } The above code segment is similar to the one in a post I encountered in this forum (John Steinbis jsteinbis at gmail.com (osg-users%40lists.openscenegraph.org?Subject=%5Bosg-users%5D%20Convertion%20to%20osg%3A%3AImage%20from%20IplImage%20%28OpenCV%29%20for%0A%09useas%20textureIn-Reply-To=E4D07AB09F5F044299333C8D0FEB45E9042314AE%40nrccenexb1.nrc.ca) Mon Sep 17 11:04:04 PDT 2007) but there are modifications for my needs. I can be sure that cvImg-imageData contains the actual processed video data because I can see the results in a seperate window. But the above problem occurs when I try to render the processed video as a texture onto a surface. 3) The above function
Re: [osg-users] Stereo Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Thomas, Thomas Hogarth wrote: Hi Peted Liked your info on Quadbuffered opengl and stereo modes. I have one interesting point to add. I recently brought a MacBook with an Nvidia 9400m graphics card. This card 'does' support quadbuffered opengl and seemingly so do all recent Macs using Geforce graphics cards. Do you have some source to back this up? Did you try if it actually works? You can do that even without glasses - if the mode is broken/unsupported you get an OpenGL error about unsupported visual. I tried googling for some additional info and didn't find anything. If this is true, it would be the first consumer Nvidia device that would have it, not to mention a laptop. Normally only the high-end Quadros have this feature enabled. The hardware is on the GeForces too for the most part, but disabled/unsupported by the drivers. It used to be possible to hack the driver/card to think it is a Quadro and enable this, but that hack doesn't work since a few years any more. On another Stereo note, sadly Philips has stopped making their 3DWow range so looks like OSGs support will not be as great as I had hoped. Well, to be honest, this was a solution looking for both a problem and a market, in my opinion. With no 3D content to show on these ueber-expensive TVs, I wonder what did the managers smoke to think it was a good idea ... On the other hand, getting a projector is possible under 200-300 EUR these days, so two DLP projectors, a simple jig, pair of filters and you have a better passive stereo than any of those TVs, and not tied to any particular graphic card or drivers (anything with two outputs will do). With the new LED projectors you can even have a desktop solution (up to 60 image in normal ambient light) without having to worry about the lamp costs ... Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFKEbann11XseNj94gRAp7zAKDFIuzHqw/sfXuLugo9X9AZW6+tWQCgzFJa IPE1diEWarK6Q8klDcHfuzM= =sKp4 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
I can back this up. I have it direct from an engineer at Apple that quad-buffered stereo is operational in almost the whole range of Apple cards. This apparently caused some difficulty between Apple and Nvidia in the past, as Nvidia wanted Apple to include the feature to drive sales of the high-end Quadro cards, and now stereo-in-a-window is only enabled on Quadro cards. The caveat with using quad-buffered mode is that Apple's machines don't include any means of signalling the shutter glasses or stereo goggles, so you're back to using something like the Stereographics blue-line detector box to perform the signal extraction. Regards, Phil. On 18/05/2009, at 9:27 PM, Jan Ciger wrote: Thomas Hogarth wrote: Hi Peted Liked your info on Quadbuffered opengl and stereo modes. I have one interesting point to add. I recently brought a MacBook with an Nvidia 9400m graphics card. This card 'does' support quadbuffered opengl and seemingly so do all recent Macs using Geforce graphics cards. Do you have some source to back this up? Did you try if it actually works? You can do that even without glasses - if the mode is broken/unsupported you get an OpenGL error about unsupported visual. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Development of Qt support as part of osgViewer
Is there a need for a composite viewer with Qt (or any other widget set)? If you want multiple views of the scene isn't it better to just have multiple Qt widgets (eg DockWidgets) with a view in each? Or am I missing something? Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12444#12444 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions]osgParticleParticleSystemandModularEmitterindifferent coordinate systems
Hi Robert, At the moment I'm not ready to make a submission. No one else has noticed this problem so I wouldn't hold up a new osg release. I have the source code so I can easily build osgParticle that works for my usage. If you would like something for 2.8.1 I can easily modify the code to take an environment variable or compiler option. Let me know if this is what you want. I would still like to know more about FlightGear's usage. Eventually, I think we will either come up with a way in FlightGear to use the earlier ModularEmitter code or, for 2.9 or later, add a way to select the mode in ModularEmitter. If we go back to the earlier code we will certainly need to keep watch on the mailing list for anyone having trouble. Tom Jolley -Original Message- From: Robert Osfield [mailto:robert.osfi...@gmail.com] Hi Tom, Tim et. al, I think what we probably need is a bit of revamp internally in osgParticle to properly support double precision positioning of the particle system and emitter. Exactly how this should look I can't say right now, I'd need to sit down and work out the current osgParticle class structure and see how it might all fit together. I haven't looked at it closely recently so I don't recall the details off the top of my head. Longer term osgParticle could do with be rewritten to use shaders + point sprites rather than the CPU centric implementation that we have right now. Perhaps this could be done at the same time as the above. Short term we are stuck with an fix that works for FlightGear and perhaps other apps that use osgParticle in similar ways, but breaks other apps that use osgParticle in other ways. Reverting to an older rev will just break things for FlightGear and other similar apps. So we are between a rock and hard place. Perhaps a short term solution would be to have an compile option or better still a variable that can control which behave is selected internally. For OSG-2.8.1 we need to stick to ABI compatibility, so the compile option would be the only way, but which should be the default perhaps an env var could be used to toggle the variable. Do one of you guys want to come up with an interim solutions? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
Hi Jan Do you have some source to back this up? Did you try if it actually works? You can do that even without glasses - if the mode is broken/unsupported you get an OpenGL error about unsupported visual. Yeah I gave it a test, saw the page flipping and no errors. I noticed GL_STEREO was available in a little stats gathering app I wrote and wasn't convinced myself so I had to give it a try. Maybe Nvidia are finally coming to their senses. Well, to be honest, this was a solution looking for both a problem and a market, in my opinion. With no 3D content to show on these ueber-expensive TVs, I wonder what did the managers smoke to think it was a good idea ... True :). We had one at work, it was fun to play with but not very practical. We even had one of the 2D to 3D conversion boxes they made (trying to increase the content). You get it thinking, this is going to be amazing, turned out you just made keyframe depth maps and it pretty much just interpolated them lol. I'll try get my mac hooked up to a hmd or something to test if this is truly working, but like I say from my test - The card has GL_STEREO - Osg runs in Quadbuffered stereo - It don't crash and I see page flipping. Interesting ay? Tom PS I've been meaning to post for a while about this, I work at a stereo 3D company and currently have most types of 3D displays available. If people like I can try and make some more official tests using OSGs various drawing modes against each of the screens (for example one of our hyundai screens has the eyes flipped by default) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFKEbann11XseNj94gRAp7zAKDFIuzHqw/sfXuLugo9X9AZW6+tWQCgzFJa IPE1diEWarK6Q8klDcHfuzM= =sKp4 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Blender osgExport
Thanks, Cedric - I just checked out latest revision. Same result ... On a fresh Ubuntu 9.04 with blender 2.48.1 - install into ~/.blender/scripts (the readme says ~/.blender - this however does not work at all) - open blender with default layout and template (including the unit box) - File Export OpenSceneGraph (.osg) - Leave everything as default - Press Write button - Name file Test.osg (directory is $HOME) - Press Export AnimTK button - No error message (btw. on Mac OSX I get a message about checking on the console which is futile because no error messages are logged) - Check if Test.osg exists ... no - however Test.log exists with 0byte - I tested to add a simple translation animation - also no avail Disclaimer - I poke more or less in the dark with blender however I would suspect the exporter can handle a single box - or is the exporter only capable to export rigged animations, which would raise the question how this exporter can work in conjuntion with the existing osg exporter. Cheers, Hartmut On 19/5/09 1:14 AM, Cedric Pinson wrote: Hi Harmut, I just updated the osgexport repository with some bug fixes if you use this exporter maybe it could help, else i will need a blender file to debug it. Cheers, Cedric On Mon, 2009-05-18 at 11:36 +0200, Cedric Pinson wrote: Hi Hartmut, Can you give more information about the exporter you are using ? i take care of the version on this page http://www.openscenegraph.org/projects/osg/wiki/Community/NodeKits/osgAnimation If you have problem with it, could you report the blender file and step that result in a empty osg file, without that i can't really help Cheers, Cedric On Mon, 2009-05-18 at 18:05 +1200, Hartmut Seichter wrote: Hi there, I am having a hard time to get the osgexport doing anything - is there a known-to-work revision? Right now with the latest rev I get the GUI but after Write File an empty Filename.log file - so kind of hard to debug. Cheers, Hartmut ___ 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 -- Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Philip Lamb wrote: I can back this up. I have it direct from an engineer at Apple that quad-buffered stereo is operational in almost the whole range of Apple cards. This apparently caused some difficulty between Apple and Nvidia in the past, as Nvidia wanted Apple to include the feature to drive sales of the high-end Quadro cards, and now stereo-in-a-window is only enabled on Quadro cards. Argh, nothing like a monopoly jacking up prices artificially :( It has been known that the hw can do it even on generic GeForces and that NVIDIA was intentionally disabling it - there is little need for their overpriced Quadros if your HMD can do only 800x600 anyway. Thanks for confirming this, though. The internet is suspiciously mum about this. The caveat with using quad-buffered mode is that Apple's machines don't include any means of signalling the shutter glasses or stereo goggles, so you're back to using something like the Stereographics blue-line detector box to perform the signal extraction. It doesn't work through the VGA pin 13 DDC signal? That is what NVIDIA used to use on consumer cards before and it is an option on Quadros too. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFKEeTHn11XseNj94gRAtpkAKCKwLN0ILBFMyYJuB2JyhEOta6sPACfWT8r xTQZRuXaZW7YtGKHfnoFKVY= =0auQ -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Stereo Problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Thomas, Thomas Hogarth wrote: Hi Jan Yeah I gave it a test, saw the page flipping and no errors. I noticed GL_STEREO was available in a little stats gathering app I wrote and wasn't convinced myself so I had to give it a try. Maybe Nvidia are finally coming to their senses. Nice to know, thanks for confirming this. Nvidia coming to senses is unlikely, though - otherwise they would be undercutting their ueber expensive Quadro line - there is little reason to shell out money for a Quadro these days unless you need stereo or genlock (e.g. for a cave). This is also likely why we are not going to see the consumer stereo support for OpenGL any time soon, I think :( I'll try get my mac hooked up to a hmd or something to test if this is truly working, but like I say from my test * The card has GL_STEREO * Osg runs in Quadbuffered stereo * It don't crash and I see page flipping. Interesting ay? Very much so! Apple HW looks quite attractive from this POV for development. BTW, if the stereo works, it is likely using the DDC pin to send out the flipping signal since it does not have a separate stereo output connector. If you have a DVI-VGA converter, try to hook up an oscilloscope to the pin 13 (I think) - you should see a TTL (~5 V) level square wave signal at the refresh rate of your monitor when the stereo is on. I will try to round up one of our Mac users here and subject their Mac to some testing :-p PS I've been meaning to post for a while about this, I work at a stereo 3D company and currently have most types of 3D displays available. If people like I can try and make some more official tests using OSGs various drawing modes against each of the screens (for example one of our hyundai screens has the eyes flipped by default) This would be pretty good to know - few people have such means to test things :) Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFKEeaan11XseNj94gRAuK3AKCIXCnb//yD3r2JdKt4lz24FKnrNwCfbu81 vJDbHnfTeTfLN3ZWkvvzces= =/jox -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What is everyone doing for GUIs?
Hi, If you are looking for something more lightweight then Qt or wxWidgets, might I suggest AntTweakBar, which is a very lightweight OpenGL GUI that works on Windows, Linux and most recently Mac OS X. - Anna Once we accept our limits, we go beyond them. -- Albert Einstein ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to control camera
Dear All, I want to control virtual camera by a remote computer and local mouse. Anybody know how to make two controls work at the same time? I did it as following, but do not work. Firstly, following functions are invoked. mViewer-setCameraManipulator(NULL); mViewer-getCamera()-setViewMatrixAsLookAt(); Then to get the handle of camera from mViewer with mViewer-getCamera()-setViewMatrixAsLookAt(); but reply the NULL. Thus, I can not set my camera at a desired location. Show your comments to help me. Thanks. 2009-05-19 ijustfu 请教一个关于setViewMatrixAsLookAt函数的问题 如果先调用mViewer-setCameraManipulator(NULL);然后再调用mViewer-getCamera()-setViewMatrixAsLookAt(),此时的setViewMatrixAsLookAt有效;如果mViewer里面存在一个照相机控制器,然后调用mViewer-getCamera()-setViewMatrixAsLookAt(),此时的setViewMatrixAsLookAt函数无效,即不能够把照相机定位到想要的位置,场景无任何变化。 请问哪问朋友遇到后面这种情况没有,可能出现的问题在那里,应该如何,才能使setViewMatrixAsLookAt该函数有效呢?先谢谢各位 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Matrix Application Problem
-- Hi All I have an iv model i import it into OSg and later when i import the next iv model i give an MatrixTransform for which the 2nd imported model is attached and then i attach the MatrixTransform to the previously imported model... but the object gets placed to the distance which i give in the MatrixTransform in osg but when i pick the model with respect to the pick path it gets hilighted with respect to the global co - oardinate... not on the imported model it hilightes some where and the model is some where for hilighiting the picked point i use bounding box calculation and render the bounding box around the picked node but during the import the MatrixTransform is applied globally but dont get applied to the node or group of the imported mode... Can any one help me 1)step i have Sceneroot 2) get a MatrixTransformation 3) I import an model 4)attach the imported model to the MatrixTransform then attach the MatrixTransform to the Scenroot 5)Select the node next where u want to attach the next impoted model 6)get a MatrixTranformation 7)repeat the 34 set finally when i pick now it gives the bounding box in the wrong position.not where the model is Always Keep Smiling! Defeat the defeat before defeat defeats you Regards Sunitha.S.Sunagad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org