Re: [osg-users] Problem with readNodeFiles
Hi Paul, Good detective work, the lack of return was the problem as the FILE_NOT_HANDLED result was being over written by latter operations. Added a return in fixes the problem and : osgviewer cow.osg dumptruck.osg.(-5,-5,-5).trans Works correctly once more :-) Fix now checked into svn/trunk. Robert. On Sun, Mar 14, 2010 at 2:59 AM, Paul Martz pma...@skew-matrix.com wrote: Robert Osfield wrote: Hi Paul, Thanks for the report. I can reproduce it at my end, but as yet don't know what it might be. I will investigate on Monday. Thanks for looking into this. I was curious, so I thought I'd dig a little on a Saturday night over a beer. It appears to be a problem in src/osgPlugins/osg/ReaderWriterOSG2.cpp. The prepareReading method checks for the wrong extension but fails to immediately return once that has been identified as the case... Options* prepareReading( ReadResult result, std::string fileName, const Options* options ) const { std::string ext = osgDB::getLowerCaseFileExtension( fileName ); if ( !acceptsExtension(ext) ) result = ReadResult::FILE_NOT_HANDLED; // Should return here? fileName = osgDB::findDataFile( fileName, options ); if ( fileName.empty() ) result = ReadResult::FILE_NOT_FOUND; // Should return here too, right? osg::ref_ptrOptions local_opt = options ? static_castOptions*(options-clone(osg::CopyOp::SHALLOW_COPY)) : new Options; local_opt-getDatabasePathList().push_front(osgDB::getFilePath(fileName)); if ( ext==osgt ) local_opt-setOptionString( local_opt-getOptionString() + Ascii ); etc But I haven't dug deep enough to explain why the issue goes away when you swap the order of the two command line arguments. Perhaps due to the chain of responsibility pattern. -Paul ___ 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] clip plane and shadow scene
Hi everyone, I have an issue combining clipplane and shadow scene. I first used a scene with a standard osg::group where I attach a clip node with a clip plane cutting the scene along the Y axis. Things worked well so far and I saw the scene correctly cut in half. Now if I remplace the osg::group with a osgShadow::ShadowedScene the problem starts. What happens then is that the scene will not be cut anymore, but only the shadow will be impacted by the clip plane. So I will see on the display the full scene uncutted with the shadow cut in half. What I would like to see is the correctly cut scene together with the cut shadow. I am relatively new to osg so I guess this might just be a small configuration issue, but I looked around on the web and on the mailing archive and I could not find anything on this. Thanks in advance, Vivien PS: here is the code I use to create my clip plane: osg::ref_ptrosg::ClipNode clipNode = new osg::ClipNode(); osg::ref_ptrosg::ClipPlane clipplane = new osg::ClipPlane(); clipplane-setClipPlane(0, -1, 0, 10.1); clipNode-addClipPlane(clipplane); clipNode-setStateSetModes(*_translNode-getOrCreateStateSet(),osg::StateAttribute::ON); _translNode-addChild(clipNode); and here is the code I use to create my shadow scene: osg::ref_ptrosgShadow::ShadowedScene shadowscene = new osgShadow::ShadowedScene(); shadowscene-setReceivesShadowTraversalMask(ReceivesShadowTraversalMask); shadowscene-setCastsShadowTraversalMask(CastsShadowTraversalMask); osg::ref_ptrosgShadow::StandardShadowMap shmap = new osgShadow::StandardShadowMap(); shadowscene-setShadowTechnique(shmap.get()); _translNode-addChild(shadowscene); ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image
Hi, assume you create a picture using GL_BGRA format using osg::Image::allocateImage(int s,int t,int r,GLenum format,GLenum type, int packing) or you set the format with osg::Image::setInternalTextureFormat. Both methods do not check if the internal texture format is valid. Calling osg::Texture::computeInternalFormatWithImage then results in a valid texture format because this function also does not check if the texture format is valid. I am willing to provide a patch but I would like to have an input where I should patch the source code. I prefer to do it in osg::Texture::computeInternalFormatWithImage. Next question: assume the format is wrong which format should be taken? Hartwig Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25628#25628 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image
Hi, sorry, it should read Calling osg::Texture::computeInternalFormatWithImage then results in an invalid texture format Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25629#25629 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ScreenShot File name
Hi Danny, I'm using OSG inside of ActiveX control (based on OSGActiveX example) embedded into HTML page. First time when I'm loading it and each time I'm taking snapshot, I'm getting test_0.png and each snapshot overwrites this file. When I'm pressing F5 or reloading page using IE address bar I'm starting to save snapshots as test_1.png and each snaphot overwrite this file. This behavior continues each time I'm reloading page. the counter is being incremented by one to test_2, test_3 etc the only solution for this problem is to close IE and to wait till ActiveX unloads from Memeory. after it the counts start form zero. Check the code for osgViewer::ScreenCaptureHandler::WriteToFile in src/osgViewer/ScreenCaptureHandler.cpp. There must be a bug there. It's pretty simple code, so you can make your own version of WriteToFile that does whatever you want, and then use an instance of your class in the constructor of ScreenCaptureHandler. // pseudocode class MyWriteToFile : public osgViewer::ScreenCaptureHandler::WriteToFile { MyWriteToFile(filename, extension, savePolicy) : osgViewer::ScreenCaptureHandler::WriteToFile(filename, extension, savePolicy) { // ... } operator()(...) { // ... } // ... }; // then... osgViewer::ScreenCaptureHandler* _scnsvr; _scnsvr = new osgViewer::ScreenCaptureHandler(new MyWriteToFile(test,png,osgViewer::ScreenCaptureHandler::WriteToFile::SavePolicy::OVERWRITE)); (if you do find a bug in the existing code please let us know so we can fix it for future versions of OSG though) 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] [osgPlugins] WRL Plugin needed
Hi, The link doesn't seem to work. I would appreciate it if anyone is willing to share binaries of the VRML Plugin for Visual Studio 2008. Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25631#25631 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Bug in osg::Texture::computeInternalFormatWithImage / osg::Image
Hi Hartwig, If you set a format that isn't supported by the OpenGL driver and you get an error then so be it. Fixing the code that sets up the image with a valid texture format is what should be done. Trying to catch and correct for a problem in user application set of OSG data is rather pushing what the OSG should and can be expected to do. This is particularly the case when what formats that might be supported that can be driver dependent. Robert. On Sun, Mar 14, 2010 at 12:21 PM, Hartwig Wiesmann hartwig.wiesm...@wanadoo.nl wrote: Hi, assume you create a picture using GL_BGRA format using osg::Image::allocateImage(int s,int t,int r,GLenum format,GLenum type, int packing) or you set the format with osg::Image::setInternalTextureFormat. Both methods do not check if the internal texture format is valid. Calling osg::Texture::computeInternalFormatWithImage then results in a valid texture format because this function also does not check if the texture format is valid. I am willing to provide a patch but I would like to have an input where I should patch the source code. I prefer to do it in osg::Texture::computeInternalFormatWithImage. Next question: assume the format is wrong which format should be taken? Hartwig Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25628#25628 ___ 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] [osgPlugins] WRL Plugin needed
Hi, you need the iv plugin which (svn sorce code speaking )is the only which implements such reader. You need coin library to compile it Actually i experienced crashes in reading simple and complex iv \wrl models which i can open easily with coin .(see post) Thank you! Cheers, Michele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25633#25633 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I successfully deploy a OSG app?
Gordon Tomlinson wrote: You don't need static builds to use OSG on another machine You say it does not work ...HOW does NOT work ?, how are you installing on another machine ? Yes you do need the correctly MSVC re-distributable to be installed as part of your applications installation process you can also deploy all in the same folder: your exec + all the bin folder resulted from OSG install step + the neede MSVC stuff: you can obtain it by adding this patch to the main OSG CMakeLists.txt: @@ -243,14 +238,6 @@ SET(CMAKE_EXE_LINKER_FLAGS_DEBUG /debug /INCREMENTAL:NO) ENDIF(NOT OSG_MSVC_DEBUG_INCREMENTAL_LINK) ENDIF() -IF(EXISTS ${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake) -OPTION(OSG_MSVC_INSTALL_MFC_LIBRARIES Set to ON to include system libraries in install dir OFF) -MARK_AS_ADVANCED(OSG_MSVC_INSTALL_MFC_LIBRARIES) -IF(OSG_MSVC_INSTALL_MFC_LIBRARIES) -SET(CMAKE_INSTALL_MFC_LIBRARIES 1) -INCLUDE(InstallRequiredSystemLibraries) -ENDIF(OSG_MSVC_INSTALL_MFC_LIBRARIES) - ENDIF(EXISTS ${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake) ENDIF(MSVC) ENDIF(WIN32) then build osg with cd osg_build cmake -DCMAKE_INSTALL_PREFIX:PATH=your OSG install folder -DOSG_MSVC_INSTALL_MFC_LIBRARIES:BOOL=ON osg source folder cmake --build . --config Release then you should have in your OSG install folder/bin all you need to add to your exe to make it deployable HTH Luigi You need to ensure that the MSVC re-distributable's and the OSG bin\dlls are in your path and that your install all the OSG dlls including the plugin-in directory etc __ Gordon Tomlinson gor...@gordontomlinson.com www.photographybyGordon.com www.vis-sim.com www.gordontomlinson.com IM: gordon3db...@3dscenegraph.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Mas Oug Sent: Friday, March 12, 2010 3:48 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [build] How do I successfully deploy a OSG app? How do we deploy an OSG app that we compiled in VC++ 2008? Because simply the .exe will not work on other computers (naturally). I've tried using VC redist. and friends, but with no avail... I have heard of static linking, but how would that work? I would greatly appreciate any helpful response! Thanks! -Masoug -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25595#25595 ___ 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] [osgPlugins] WRL Plugin needed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2010-03-14 19:55, Michele Fiorentino wrote: Hi, you need the iv plugin which (svn sorce code speaking )is the only which implements such reader. You need coin library to compile it That is actually incorrect. WRL files are VRML files, use the OpenVRML-based VRML plugin for that, not the old iv one which works only for OpenInventor format. Also, the Coin3D based VRML plugin is deprecated as far as I know, it wasn't even working last time I have checked. The source code is in the OSG distribution, just not compiled by default (that's why there is no DLL). Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFLnTgln11XseNj94gRAgw/AJ9dduSp9r+euv0WSoteykOyNtlHmACg3DYc xMqym0/861s4Cx/EJQjlJ10= =UIsH -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] ivplugin or vrml plugin? this is the problem
Hi, ok nice to know! i was walking in the bad direction. Just using cmake it detected my coin installation and ivplugin the only available when i did a search .wrl in my solution with VSC++ , thus my response Now, should i abandon the coin ivplugin ? i was just debugging it! vrml plugin should be the mainstream? Thank you! Cheers, Michele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25636#25636 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] clip plane and shadow scene
Hi Vivien, shadow rendering uses shaders and therefore replaces the fixed function pipeline (FFP). The clipplane functionality is part of the FFP and is not part of the shadow rendering. To solve this you'll need to add clipplane functionality to the shadow rendering shader. Note that this should be solved by OSG in the future once shader composition is implemented. -- Roland -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25637#25637 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I successfully deploy a OSG app?
Thanks a lot for all the helpful responses! :D Currently, I am a little busy, and I can't get to try it out yet, but I'll keep you guys posted! THANKS! -masoug -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25638#25638 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2.8.3 release likely, need community assistance
Hi guys -- Given this work is still in progress, I agree with Robert and I don't think it's right for the 2.8.3 release. Sorry. -Paul Robert Osfield wrote: Hi Andy, On Wed, Mar 10, 2010 at 2:02 PM, Andy Skinner andy.skin...@mathworks.com mailto:andy.skin...@mathworks.com wrote: Robert was at one time (Novemeber, December) working with removing some more static initializers. We really need to get up to date on OSG, and we need to get rid of the initializers. If Robert was able to complete that (he hadn't had time as of December), it would be a big help. (We want to use the osgViewer library, but the initializers caused problems for us.) I'm afraid I've only done part of the work on replacing the static initializers, the only areas that I've cleaned up the ones that I was tackling during other work. Curiously only yesterday I was starting to think about what's left to do for 3.0 and the static initializers was one of own personally todo items. Do this work as a community task might be appropriate, a different thread would be the place to do this. Even if he was able to do it, I don't know whether the changes were small enough for your purposes. But for us to take another step on 2.8.x (as stable instead of developer) would be comforting. I suspect the changes for static initializers would often be a bit too intrusive as it'll come with other changes. One could possible try and tackle the task for the 2.8 branch and 2.9.x series separately, but.. this comes with more resources needed. If you can dive in a help out then it might make it more possible. My guess is that Paul already has more than enough tasks to do to put 2.8.3 together without other tasks pilling on top. If a set of non intrusive changes can be supplied to Paul in a form that he can easily review and merge without risky stability or portability then it'll have a better chance of making it in. With the 2.9.x series the scope is still more open to more intrusive changes. 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] 2.8.3 release likely, need community assistance
Hello OSG community -- Status update: I spent Saturday working on the 2.8 branch, and have already merged and committed several changes, working towards the 2.8.3 release. I will add a wiki page (probably late Monday) to document the changes that are going in, plus the changes under consideration. Sorry I didn't make any progress today. It's tax season in the U.S. :-( PCJohn wrote: Is it possible to include plugins? I am particularly interested in updated Inventor plugin. John It's possible. The updated FBX plugin wasn't too much work. I've added your Inventor plugin to my list of things to look at. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and vrJuggler
Hi, I am trying to use OSG with vrJuggler in a cluster of four machines. I am using OSG 2.8.2 , VC++ 2008 on XP. vrJuggler is already configured on the cluster , but it is useed for VE Suite not OSG. Can anybody please guide me regarding the topic ? or any example code to show a simple object on cluster ? ... Thank you! Cheers, Rohit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25641#25641 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org