Re: [osg-users] Move object with callback
Hi, if you don't want to use callbacks you can split the viewer->run() into !done and viewer->frame(); And then just update a PositionAttitudeTransform or MatrixTransform that sits above your node you want to move between frame calls. jp On 21/04/10 09:54, daniele argiolas wrote: Hi, in my program I've external inputs that change the position of my object. I do this with setUpdateCallback that call a function that returns osg::NodeCallback*, with osg::AnimationPath* and AnimationPathCallback I set new position and new angle. Is there a way more convenient to do this? I tried to do this with TrasformationMatrix ecc but for setUpdateCallback I need a NodeCallback* return. Have you some ideas? Thank you! Cheers, daniele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27052#27052 ___ 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] openGL error with osgEarth?
Hi Jason, In fact, I create the map through program.What the program does is that as and when some new tif file arrives at particular folder which I am monitoring continuously thru callback, I add the file to the already created map. It works well for some 2-3 tile addition. When it goes beyond that it throws the openGL error. Have a look at my code. Is there any other way to do the same. Akilan. A Code: class monitorCallback : public osg::NodeCallback { public: monitorCallback(osgEarth* map) { _map=map; } virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { // // look for any new tif arrival at specific folder // . . if(new_tif) { sprintf(name, "tile_%d", tif_cnt); osgEarth::Config conf; conf.add("url", new_tif);//new tif name with relative path _map->addMapLayer( new osgEarth::MapLayer(name, osgEarth::MapLayer::TYPE_IMAGE, "gdal", conf ) ); } } osgEarth::Map* _map; }; int main(int argc, char* argv[]) { _chdir(curr_dir); osgViewer::Viewer* viewer=new osgViewer::Viewer; osg::Group* root=new osg::Group; osgEarth::Map* map = new osgEarth::Map(osgEarth::Map::CSTYPE_GEOCENTRIC); // Cache map->setCache(new TMSCache("cache")); // World { osgEarth::Config conf; conf.add( "url", "../data/world.tif" ); map->addMapLayer( new osgEarth::MapLayer("WORLD", osgEarth::MapLayer::TYPE_IMAGE, "gdal", conf ) ); } root->setUpdateCallback(new monitorCallback(map)); osgEarth::MapNode* mapNode=new osgEarth::MapNode(map); mapNode->setNodeMask( 0x01 ); viewer->setCameraManipulator(new osgEarthUtil::EarthManipulator); viewer->addEventHandler( new osgViewer::StatsHandler() ); viewer->addEventHandler( new osgViewer::ThreadingHandler() ); viewer->setSceneData(root); viewer->run(); return 0; } -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27417#27417 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ANN: PAK Scene Editor for OSG
Nice work, i will take a look! cheers, René 2010/4/27 Peter Kilpatrick > Hello, > I'd like to announce the first release of PAK Scene Editor for OSG. > > Features: > - Add models to a scene. > - Drag nodes. > - Edit light and material properties. > > Release details: > - OSG 2.8.0 > - Qt 4.5.0 > - Visual C++ 8.0 > - Tested on Windows XP > > License: proprietary no charge > > Download from www.icon.co.za/~pak > > Cheers, > Peter > > > -- > This message has been scanned for viruses and > dangerous content by Pinpoint, and is > believed to be clean. > > ___ > 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] Simple line construction in a 3d Space
Richard Redding wrote: [quote="Jason Daly"]Richard Redding wrote: I think the osggeometry example has what you're looking for. --"J" [/quote] Hey J, I'm really wet behind the ears on this site. Do you think you could link me to what you are talking about :D!!! Sure. I'm assuming you've already downloaded OSG. If you just go to the "examples" directory off the root of the OSG install, there are quite a few examples there showing off various features. The osggeometry example showcases the Geometry class. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple line construction in a 3d Space
[quote="Jason Daly"]Richard Redding wrote: I think the osggeometry example has what you're looking for. --"J" [/quote] Hey J, I'm really wet behind the ears on this site. Do you think you could link me to what you are talking about :D!!! Thanks for the help! I appreciate it! Cheers mate, Rich -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27407#27407 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPPU] HDR example: wrong average luminance?
Dear Art, Luca, Allen, This is really great news for me to hear that the problem is gone :) Now my tone mapping should be faster and more accurate. Thank you Art! Josselin. This message was sent using IMP, the Internet Messaging Program. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Simple line construction in a 3d Space
Richard Redding wrote: Hey all!, I need to use a line in 3d space and hold one end fixed to a wall and then P.A.T. the other point through data which I am sending it in real time sort of like a tracker. I have a hunch to do this would be through the: osg::Geometry* newLine = new osg::Geometry(); but I'm not sure how to go about actually getting the line up and running. If you could help me with this preliminary code that would be great! I think the osggeometry example has what you're looking for. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Simple line construction in a 3d Space
Hey all!, I need to use a line in 3d space and hold one end fixed to a wall and then P.A.T. the other point through data which I am sending it in real time sort of like a tracker. I have a hunch to do this would be through the: osg::Geometry* newLine = new osg::Geometry(); but I'm not sure how to go about actually getting the line up and running. If you could help me with this preliminary code that would be great! Cheers, Richard :D -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27403#27403 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Osg Viewer in Windows style window
wait. Are these from the sample that is coming with the osg sources? They should work ,,, if something is not broken -Nick On Wed, Apr 28, 2010 at 7:36 PM, Sanat Talmaki wrote: > (remaining .h and .cpp files) > > Thanks for taking a look. I'm not able to make any headway > > Cheers, > Sanat > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27398#27398 > > > > > Attachments: > http://forum.openscenegraph.org//files/stdafx_520.h > http://forum.openscenegraph.org//files/stdafx_136.cpp > http://forum.openscenegraph.org//files/mfc_osg_mdiview_163.h > http://forum.openscenegraph.org//files/mfc_osg_mdiview_143.cpp > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Simplifier does nothing if smoothing set false
I have experimentally determined that a Simplifier with _smoothing set to false will not accomplish anything. The number of verticies always stays the same: osgUtil::Simplifier simp; simp.setSmoothing(false); // set true to actually do something. simp.setSampleRatio(0.5); root->accept(simp); If smoothing is turned on, then decimation takes place. Can anyone reproduce this? I'm looking at the code but haven't determined what is generating the necessary side effect with smoothing turned on. Perhaps the SmoothTriangleFunctor is helping? Lee ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
Paul Martz wrote: > Alberto Luaces wrote: > > > how could I have missed this! Thank you for the tips :) > > > > OSG is big. :-) > > -- > -Paul Martz Skew Matrix Software > http://www.skew-matrix.com/ > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum Hi Paul and J-S! While we are on the subject, let’s turn this inside out for a moment! :? If say, I was looking at a chunk of the earth on a globe (Assuming that you have it dimensioned out properly) You know altitude your camera is from the surface (assuming that its the same as the theoretical ellipsoid) and you want to know the distance (width and height) of the territory you are covering (in the view of your camera) is there a function in OSG that does that? D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27400#27400 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to setup a simple camera?
Hi Claus, You can setup your camera view matrix using : viewer.getCamera()->setViewMatrix(matrix) or viewer.getCamera()->setViewMatrixAsLookAt(eye, center, up) The second one is a good start. For the meaning of the parameters eye, center and up, ask your friend (google ^^) about gluLookAt. Hope this helps, Mourad On Wed, Apr 28, 2010 at 7:29 PM, Claus Thaler wrote: > Hi, > > did nobody ever had this kind of problem? You won't tell me, that you all > use the default TrackballManipulator, don't you? I kindly ask for help - or > links, topics or threads that help. > > kindly, > Claus > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27396#27396 > > > > > > ___ > 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 Viewer in Windows style window
(remaining .h and .cpp files) Thanks for taking a look. I'm not able to make any headway Cheers, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27398#27398 Attachments: http://forum.openscenegraph.org//files/stdafx_520.h http://forum.openscenegraph.org//files/stdafx_136.cpp http://forum.openscenegraph.org//files/mfc_osg_mdiview_163.h http://forum.openscenegraph.org//files/mfc_osg_mdiview_143.cpp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Osg Viewer in Windows style window
Hi, I'm attaching the files (I don't think I made any changes to the code that was in the example). So attaching all the .h and .cpp files provided in the sample. (some in the next post as >10 were there). ... Thanks Cheers, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27397#27397 Attachments: http://forum.openscenegraph.org//files/mfc_osg_mdidoc_567.h http://forum.openscenegraph.org//files/mfc_osg_mdidoc_154.cpp http://forum.openscenegraph.org//files/mfc_osg_mdi_116.h http://forum.openscenegraph.org//files/mfc_osg_mdi_444.cpp http://forum.openscenegraph.org//files/mfc_osg_142.h http://forum.openscenegraph.org//files/mfc_osg_668.cpp http://forum.openscenegraph.org//files/mainfrm_144.h http://forum.openscenegraph.org//files/mainfrm_428.cpp http://forum.openscenegraph.org//files/childfrm_213.h http://forum.openscenegraph.org//files/childfrm_131.cpp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to setup a simple camera?
Hi, did nobody ever had this kind of problem? You won't tell me, that you all use the default TrackballManipulator, don't you? I kindly ask for help - or links, topics or threads that help. kindly, Claus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27396#27396 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Osg Viewer in Windows style window
Hi, if you post your project I can take a look. -Nick On Wed, Apr 28, 2010 at 5:17 PM, Sanat Talmaki wrote: > Hi Nick, > > I have been trying to get the sample running but had a couple of > difficulties along the way. Solved most of them but now am getting a > run-time error. > (I'm using a Win32 Console application project to test the MFCViewer > sample) > > In the OSG_MFCMDI.cpp file; > > the lines > // create main MDI Frame window >CMainFrame* pMainFrame = new CMainFrame; >if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME)) >{ >delete pMainFrame; >return FALSE; >} >m_pMainWnd = pMainFrame; > > give the error > A first chance exception of type 'System.AccessViolationException' occurred > in osg_trial_project.exe > An unhandled exception of type 'System.AccessViolationException' occurred > in osg_trial_project.exe > > I am not sure how to debug this because I believe this is one of the first > calls that happens in the stake frame. > > Did you come across such an error or have a hint why this is happening. > ... > > Thanks > > Cheers, > Sanat > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27384#27384 > > > > > > ___ > 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] [3rdparty] Texture applied in modelling tool not showing up
Hi J-S, Thanks for the quick reply and the info. This is good information and I will follow up as you have suggested. Hopefully I can bring it home from here. I'll let you folks know when I have a resolution (or if I get stuck I'll pos another question :-* ). Thanks again J-S. Cheers, Adam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27394#27394 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Digital elevation model visualization
Hi Lucie, I would recommend looking at both osgEarth and VirtualPlanetBuilder for displaying geospatial data in OSG. Both VPB and osgEarth are built using OSG's osgTerrain library so the resulting scene graphs are similar. The main difference is that VPB produces optimized static scene graph tiles from input geospatial data and osgEarth produces the scene graph at runtime from a variety of different sources (local geospatial data, WMS servers, TMS servers, etc). I'm one of the developers of osgEarth, let us know if you have any questions. Thanks! Jason On Wed, Apr 28, 2010 at 11:28 AM, lucie lemonnier wrote: > Hi, > > I want to develop an application for the visualization of 3D digital terrain > models, and browsing through these models. > I found some plugins to add to openscenegraph (VirtualPlanetBuilder, > osgEarth, Virtual Terrain Project, ...). > What do you recommend? > > > Thank you! > > Cheers, > lucie > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27387#27387 > > > > > > ___ > 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] [3rdparty] Texture applied in modelling tool not showing up
Hi Adam, Don't worry about inexperience. The people around here are very friendly and will only generally respond negatively if you display no desire whatsoever to try and debug things yourself, or if you post a heap of code and ask others to debug it for you. This was not your case, so you're fine :-) 1) As a newbie, I assumed reading in the .DAE file was self-contained and the textures would "magically" display themselves. Is this assumption naive and misguided? (Yes/No) The dae format refers to, but does not embed, textures. So your textures need to be found and then read by the loader. So I suspect the problem is paths. A dae file is XML, so you can open it in a text editor and read it to see where it expects to find texture files. Additionally, and this is useful OSG debugging info in general, you can turn on additional debug info by setting the environment variable OSG_NOTIFY_LEVEL=DEBUG. This will print lots of things, among which the plugins that the app will use to load your file, where it looks for the texture files, etc. This, I believe, is mentioned in the Quick Start Guide. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] Texture applied in modelling tool not showing up
Hi, I hope I am posting to the proper forum. I would like to ask a very basic question. If there is something I missed in the FAQs/forums, I apologize in advance and I will look again. I created a textured scene with a 3D tool (Truespace) and exported the scene as a Collada (.DAE) file. I then tried to render this scene using osgDB::readNodeFile method and the usual osgViewer code. The scene displays but none of the textures I applied in the modelling tool are present. I also tried to enable texturing using set texture mode methods, but to no avail. Clearly the issue is my inexperience and has nothing to do with OSG. My two questions are: 1) As a newbie, I assumed reading in the .DAE file was self-contained and the textures would "magically" display themselves. Is this assumption naive and misguided? (Yes/No) 2) If the answer to question 1 is Yes, what additional steps do I need to do or what forum/web site should I read to resolve this? Just as an FYI, I am aware of and have read some of texturing information in the OSG QuickStart guide. I appreciate any help you can give me and I apologize if this is a RTM question. Thank you! Cheers, Adam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27389#27389 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Nice, now working properly! Many thanks Bye Michael Platings wrote: > Hi Dario, > it just occurred to me that if you're using the 2.8.3 version then changing > to the latest code will be a big pain for you. Instead, in your code go to > the switch statement at line 417 of fbxRNode.cpp and delete the whole of the > case statement for KFbxNodeAttribute::eUNIDENTIFIED -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27388#27388 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [3rdparty] Digital elevation model visualization
Hi, I want to develop an application for the visualization of 3D digital terrain models, and browsing through these models. I found some plugins to add to openscenegraph (VirtualPlanetBuilder, osgEarth, Virtual Terrain Project, ...). What do you recommend? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27387#27387 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi I read right now this message. I try now your trick. Michael Platings wrote: > Hi Dario, > it just occurred to me that if you're using the 2.8.3 version then changing > to the latest code will be a big pain for you. Instead, in your code go to > the switch statement at line 417 of fbxRNode.cpp and delete the whole of the > case statement for KFbxNodeAttribute::eUNIDENTIFIED > > -- > Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27386#27386 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Osg Viewer in Windows style window
Hi Nick, I have been trying to get the sample running but had a couple of difficulties along the way. Solved most of them but now am getting a run-time error. (I'm using a Win32 Console application project to test the MFCViewer sample) In the OSG_MFCMDI.cpp file; the lines // create main MDI Frame window CMainFrame* pMainFrame = new CMainFrame; if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME)) { delete pMainFrame; return FALSE; } m_pMainWnd = pMainFrame; give the error A first chance exception of type 'System.AccessViolationException' occurred in osg_trial_project.exe An unhandled exception of type 'System.AccessViolationException' occurred in osg_trial_project.exe I am not sure how to debug this because I believe this is one of the first calls that happens in the stake frame. Did you come across such an error or have a hint why this is happening. ... Thanks Cheers, Sanat -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27384#27384 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Thanks Michael I have some errors at compile time for the fbx plugin in the fbxRAnimation.cpp. .../fbx/fbxRAnimation.cpp:25: error: variable or field 'readKeys' declared void .../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this scope .../fbx/fbxRAnimation.cpp:25: error: 'curveX' was not declared in this scope .../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this scope .../fbx/fbxRAnimation.cpp:25: error: 'curveY' was not declared in this scope .../fbx/fbxRAnimation.cpp:25: error: 'KFbxAnimCurve' was not declared in this scope .../fbx/fbxRAnimation.cpp:25: error: 'curveZ' was not declared in this scope .../fbx/fbxRAnimation.cpp:26: error: expected primary-expression before 'const' .../fbx/fbxRAnimation.cpp:27: error: expected primary-expression before '&' token .../fbx/fbxRAnimation.cpp:27: error: 'keyFrameCntr' was not declared in this scope I'm using FBX 2010-2 SDK, FBX2011-2 is mandatory for this new FBX plugin? Inside 2.8.3 version of fbxRAnimation file, for example, isn't used the KFbxAnimCurve, but KFCurve. Many thanks again. Bye Michael Platings wrote: > Just saw your last email - you'll need to get the latest FBX plugin code from > the subversion trunk > -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27385#27385 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi Dario, it just occurred to me that if you're using the 2.8.3 version then changing to the latest code will be a big pain for you. Instead, in your code go to the switch statement at line 417 of fbxRNode.cpp and delete the whole of the case statement for KFbxNodeAttribute::eUNIDENTIFIED ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Refreshing a Scenegraph
Hi Suvajit, From your description I suspect that your problem is caused by the osg object cache. try osgDB::Registry::instance()->clearObjectCache(); before the ReadFile() to see if that's the problem. If that helps you might want to just supress the usage of the cache for this readfile call: osgDB::ReaderWriter::Options* opt = osgDB::Registry::instance()->getOptions(); if (!opt) opt = new osgDB::ReaderWriter::Options(); opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_NONE); osgDB::Registry::instance()->setOptions(opt); readFile() opt->setObjectCacheHint(osgDB::ReaderWriter::Options::CACHE_ALL); osgDB::Registry::instance()->setOptions(opt); Cheers, Laurens. On 4/28/2010 3:49 PM, Suvajit Sengupta wrote: Hi Robert, Yes, I am calling the viewer->frame() after updating the model assuming that after the model is built then only I can call for update and render traversal. Now the question to me how to re-render a scene ? Looking for some directions. ... Thank you! Cheers, Suvajit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27368#27368 ___ 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] Refreshing a Scenegraph
HI Suvajit, On Wed, Apr 28, 2010 at 2:49 PM, Suvajit Sengupta wrote: > Hi Robert, > Yes, I am calling the viewer->frame() after updating the model assuming that > after the model is built then only I can call for update and render traversal. > Now the question to me how to re-render a scene ? Looking for some > directions. frame() renders the scene, end of story. Given your descriptions is really hard to know what you are doing wrong. Please spend some time with the example set that are provide with the OSG, and read the quick ref guide. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
Alberto Luaces wrote: how could I have missed this! Thank you for the tips :) OSG is big. :-) -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPPU] HDR example: wrong average luminance?
Hi, cool, I'll give it a try as soon as I can. Out of curiosity, can you post here the syntax of the call to texture2DLod you used? I'm on 0.4 for now and I'd like to test on it, later I'll switch to the trunk. Thanks! Luca -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27375#27375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi Dario, This sound like but unfortunatly don't works. I've exported the variable (export OSG_OPTIMIZER="OFF") but the result is the same as above. HummThere is some other way to control the optimizer behaviour in this cases? OSG is 2.8.3 version. Not sure if you need the quotes or even if they make any difference... Other than that I'm not sure what to suggest so you'll probably need to debug yourself - try setting OSG_NOTIFY_LEVEL=DEBUG, or running osgconv in debug mode in gdb... 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] FBX conversion lost "NULL" nodes.
Just saw your last email - you'll need to get the latest FBX plugin code from the subversion trunk -Michael On 28 April 2010 15:04, Dario Minieri wrote: > Hi, thanks for your reply. > > This sound like but unfortunatly don't works. I've exported the variable > (export OSG_OPTIMIZER="OFF") but the result is the same as above. > HummThere is some other way to control the optimizer behaviour in this > cases? OSG is 2.8.3 version. > > Many thanks again > > Bye > > > Skylark wrote: > > Hi Dario, > > In our case, we often use DOF nodes with no geometry under them to > > position cameras / lights on models, and the Optimizer removes those by > > default (because it thinks they're useless if they have no geometry > > under them). > > > > So I suspect something similar is happening to you. Try setting > > OSG_OPTIMIZER=OFF to see if that helps. > > > > Hope this helps, > > > > J-S > > -- > > __ > > Jean-Sebastien Guay > > http://www.cm-labs.com/ > > http://whitestar02.webhop.org/ > > ___ > > osg-users mailing list > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > -- > > Post generated by Mail2Forum > > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27370#27370 > > > > > > ___ > 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] FBX conversion lost "NULL" nodes.
Hi Dario, I've changed the FBX reader so it will keep redundant nodes (leaving it to the optimiser to remove the fluff) so that combined with J-S's recommendation should get things working the way you want. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
It works!!! Thank you very much! Daniele -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27371#27371 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi, thanks for your reply. This sound like but unfortunatly don't works. I've exported the variable (export OSG_OPTIMIZER="OFF") but the result is the same as above. HummThere is some other way to control the optimizer behaviour in this cases? OSG is 2.8.3 version. Many thanks again Bye Skylark wrote: > Hi Dario, > In our case, we often use DOF nodes with no geometry under them to > position cameras / lights on models, and the Optimizer removes those by > default (because it thinks they're useless if they have no geometry > under them). > > So I suspect something similar is happening to you. Try setting > OSG_OPTIMIZER=OFF to see if that helps. > > Hope this helps, > > J-S > -- > __ > Jean-Sebastien Guay > http://www.cm-labs.com/ > http://whitestar02.webhop.org/ > ___ > osg-users mailing list > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- > Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27370#27370 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Refreshing a Scenegraph
Hi Robert, Yes, I am calling the viewer->frame() after updating the model assuming that after the model is built then only I can call for update and render traversal. Now the question to me how to re-render a scene ? Looking for some directions. ... Thank you! Cheers, Suvajit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27368#27368 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
Paul Martz writes: > Jean-Sébastien Guay wrote: >> Hi Daniele, Alberto, >> >>> Assuming that no transformation nodes exist in the graph describing your >>> node, you can write a node visitor that joins all the bounding boxes of >>> every geode. >>> >>> Else you'll need to modify every bounding box by its parent transforms >>> in order to join them. >> >> Actually you don't need to write this, it's so common that it exists >> in OSG already: osg::ComputeBoundsVisitor. And it does the right >> thing with transforms. >> >> osg::ComputeBoundsVisitor cbbv; >> node->accept(cbbv); >> osg::BoundingBox bb = cbbv.getBoundingBox(); >> osg::Vec3 size = bb._max - bb._min; >> >> // Then size contains the size in X, Y and Z. > > For purposes of analyzing models, it's often useful to have access to > this information from the command line. The osgWorks project > (osgworks.googlecode.com) contains the osgwbvv application to display > bounding volume information, either as a sphere or (using > ComputeBoundsVisitor) as a box. > > >osgwbvv cow.osg > Sphere: > Center 0.776125 -0.43866 0 > Radius 6.35558 > > >osgwbvv --box cow.osg > Box: > Center 0.776125 -0.43866 0 > Radius 6.35558 > Extents 10.4439 3.40282 6.39676 > > The bounding volume (sphere or box) is also displayed graphically as > line geometry around the model. Hi J-S, Paul, how could I have missed this! Thank you for the tips :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] osgdem problem
Hi, I want to generate a database with osgdem but the application crashes using georeferenced texture data (virtualPlanetBuilder version used 0.10, 0.11 and svn trunk, windows machine) The following steps lead to the problem: 1.) Download srtm_ramp2.world.21600x10800.jpg from visibleearth.nasa.gov/view_detail.php?id=8391 Download world.topo.bathy.200407.3x5400x2700.jpg from visibleearth.nasa.gov/view_rec.php?id=7106 (or any other) 2.) gdal_translate srtm_ramp2.world.21600x10800.jpg srtm_ramp2.world.21600x10800_unref.tif 3.) gdal_translate reference.vrt srtm_ramp2.world.21600x10800_ref.tif Code: --- reference.vrt - <--VRTDataset rasterXSize="21600" rasterYSize="10800"--> <--SRS-->WGS84<--/SRS--> <--GeoTransform-->-180,0.016,0,90,0,-0.016<--/GeoTransform--> <--VRTRasterBand dataType="Uint16" band="1"--> <--ColorInterp-->Gray<--/ColorInterp--> <--SimpleSource--> <--SourceFilename-->srtm_ramp2.world.21600x10800_unref.tif<--/SourceFilename--> <--SourceBand-->1<--/SourceBand--> <--SrcRect xOff="0" yOff="0" xSize="21600" ySize="10800"/--> <--DstRect xOff="0" yOff="0" xSize="21600" ySize="10800"/--> <--/SimpleSource--> <--/VRTRasterBand--> <--/VRTDataset--> --- (replace the <-- and --> with the correct brackets) 4a) osgdem --whole-globe -t world.topo.bathy.200407.3x5400x2700.jpg -d srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 -o earth.ive osgdem --whole-globe -t world.topo.bathy.200407.3x5400x2700.jpg -d srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 --geocentric -o earth.ive (I also tried --bluemarble-east -t land_shallow_topo_east.tif --bluemarble-west -t land_shallow_topo_west.tif) All fail with windows error message "osgdem.exe stopped working", fault Module Name: vpb.dll, console output: Code: Constructor OSGReaderWriter - loaded OK Constructor ReaderWriterOSG2 - loaded OK --geocentric --whole-globe GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich", 0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]] matrix={ 360 0 0 0 0 180 0 0 0 0 1 0 -180 -90 0 1 } -t world.topo.bathy.200407.3x5400x2700.jpg ADD: world.topo.bathy.200407.3x5400x2700.jpg loaded layer world.topo.bathy.200407.3x5400x2700.jpg -d srtm_ramp2.world.21600x10800_ref.tif ADD: srtm_ramp2.world.21600x10800_ref.tif -o earth.ive Adding terrainTile DataSet::_run() 0 0 started DataSet::createDestination(3) Time for after_reproject 0.000258 local_extents = xMin() -180.00 180.00 yMin() -90.00 90.00 AR=2.00 C1=2 R1=1 createNewDestinationGraph Time for _destinationGraph->computeMaximumSourceResolution() = 0.016105 Time for createDestinationGraph 0.032705 Time for after_computeNeighbours 0.000504 completed DataSet::createDestination(3) There are 2 contributing source files: srtm_ramp2.world.21600x10800_ref.tif world.topo.bathy.200407.3x5400x2700.jpg mkpath() Need to create output task directory = earth_root_L0_X0_Y0 mkpath(earth_root_L0_X0_Y0) created directory earth_root_L0_X0_Y0 Task output directory = earth_root_L0_X0_Y0\ started DataSet::writeDestination(earth.ive) _readRow 1 reading tile level=0 X=0 Y=0 imageName = earth_L0_X0_Y0.dds DestinationTile::readFrom(SetName=, FileName=world.topo.bathy.200407.3x5400x2700.jpg) Alternatively, world.topo.bathy.200407.3x5400x2700.jpg can also be referenced: 4b) gdal_translate world.topo.bathy.200407.3x5400x2700.jpg world.topo.bathy.200407.3x5400x2700_unref.tif 5b) gdal_translate reference2.vrt world.topo.bathy.200407.3x5400x2700_ref.tif Code: --- reference2.vrt <--VRTDataset rasterXSize="5400" rasterYSize="2700"--> <--SRS-->WGS84<--/SRS--> <--GeoTransform-->-180,0.06,0,90,0,-0.06<--/GeoTransform--> <--VRTRasterBand dataType="Uint16" band="1"--> <--ColorInterp-->Gray<--/ColorInterp--> <--SimpleSource--> <--SourceFilename-->world.topo.bathy.200407.3x5400x2700_unref.tif<--/SourceFilename--> <--SourceBand-->1<--/SourceBand--> <--SrcRect xOff="0" yOff="0" xSize="5400" ySize="2700"/--> <--DstRect xOff="0" yOff="0" xSize="5400" ySize="2700"/--> <--/SimpleSource--> <--/VRTRasterBand--> <--/VRTDataset--> --- 6b) osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d srtm_ramp2.world.21600x10800_ref.tif -l 3 -v 750.0 -o earth.ive osgdem -t world.topo.bathy.200407.3x5400x2700_ref.tif -d srtm_ramp2.world.21600x1
Re: [osg-users] dimension oh a model
Jean-Sébastien Guay wrote: Hi Daniele, Alberto, Assuming that no transformation nodes exist in the graph describing your node, you can write a node visitor that joins all the bounding boxes of every geode. Else you'll need to modify every bounding box by its parent transforms in order to join them. Actually you don't need to write this, it's so common that it exists in OSG already: osg::ComputeBoundsVisitor. And it does the right thing with transforms. osg::ComputeBoundsVisitor cbbv; node->accept(cbbv); osg::BoundingBox bb = cbbv.getBoundingBox(); osg::Vec3 size = bb._max - bb._min; // Then size contains the size in X, Y and Z. For purposes of analyzing models, it's often useful to have access to this information from the command line. The osgWorks project (osgworks.googlecode.com) contains the osgwbvv application to display bounding volume information, either as a sphere or (using ComputeBoundsVisitor) as a box. >osgwbvv cow.osg Sphere: Center 0.776125 -0.43866 0 Radius 6.35558 >osgwbvv --box cow.osg Box: Center 0.776125 -0.43866 0 Radius 6.35558 Extents 10.4439 3.40282 6.39676 The bounding volume (sphere or box) is also displayed graphically as line geometry around the model. -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi Dario, I've exported in FBX a scene structured as the above example and then I have converted this file into an OSG file (osgconv). The OSG file don't contains the NULL nodes but only the object_with_mesh. This is not specific to the FBX loader. osgconv runs the osgUtil::Optimizer on the loaded graph (loaded from the input file) before outputting the new file, and the Optimizer can reorganize the scene graph in some ways. For example it will remove nodes it thinks are redundant. We generally set OSG_OPTIMIZER=OFF in the environment before running osgconv so this does not happen. In our case, we often use DOF nodes with no geometry under them to position cameras / lights on models, and the Optimizer removes those by default (because it thinks they're useless if they have no geometry under them). So I suspect something similar is happening to you. Try setting OSG_OPTIMIZER=OFF to see if that helps. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] FBX conversion lost "NULL" nodes.
Hi, Converting a FBX file (2010.2) into an OSG I saw that some "NULL" nodes are lost. For example I've tried a convertion of a simple scene: OBJECT |OBJ_WRAPPER |object_with_mesh OBJECT and OBJ_WRAPPER are simple "NULL" nodes, typically used to group others object. I've exported in FBX a scene structured as the above example and then I have converted this file into an OSG file (osgconv). The OSG file don't contains the NULL nodes but only the object_with_mesh. Analyzing the FBX file, I think that this happens when to a NULL node is applied no one transformation. OBJECT and OBJ_WRAPPER aren't inserted in the OSG file if they have FBX properties like: Property: "Lcl Translation", "Lcl Translation", "A+",0,0,0 Property: "Lcl Rotation", "Lcl Rotation", "A+",0,0,0 Property: "Lcl Scaling", "Lcl Scaling", "A+",1,1,1 Property: "Visibility", "Visibility", "A+",1 Instead, if they have some non-zero Translation field or others properties, then they are inserted in the OSG file as MatrixTransform node. So, this behavior can be an optimization but the OSG file not always respect the original hierarchy. Is there any way to keep the original hierarchy? Thank you! Cheers, Dario -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27365#27365 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
Hi Daniele, Alberto, Assuming that no transformation nodes exist in the graph describing your node, you can write a node visitor that joins all the bounding boxes of every geode. Else you'll need to modify every bounding box by its parent transforms in order to join them. Actually you don't need to write this, it's so common that it exists in OSG already: osg::ComputeBoundsVisitor. And it does the right thing with transforms. osg::ComputeBoundsVisitor cbbv; node->accept(cbbv); osg::BoundingBox bb = cbbv.getBoundingBox(); osg::Vec3 size = bb._max - bb._min; // Then size contains the size in X, Y and Z. 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] [osgPPU] HDR example: wrong average luminance?
Hi Luca, Allen, Josselin, ok, I found the bug. as I said the bug is not really a bug it is more or less slightly unclear definition of glsl. The problem was to use texture2D method instead of texture2DLod to get value from mipmaps. Actually in the definition of glsl texture2DLod is mean to be used only in vertex shaders. For whatever reasons texture2D do not really accept the last parameter, so one do always read the first mipmap level, instead of the last one. Another problem was not to clamp the resulting luminance to 0 on negative values. Negative values happens when everything is black, so the log(0+epsilon) became negative. On nVidia hardware texture2DLod can be also used in fragment shaders. Unfortunately I have no clue about ATI hardware. I placed some extra glsl extensions into the shader code, to activate this behaviour also an ATI cards. I found this info on a forum about game development. So, maybe this helps. I debugged now the HDR example and it seems to work perfect. However I am not sure how it will work on ATI cards, I hope it would also work perfect :) New changes are submited into osgPPU-0.4.1 repository, the svn trunk is not patched with this changes for now. I will do this in the next days. Cheers, Art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27362#27362 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] integrating AntTweakBar GUI with OSG
Hi, I have the same problem... any help? Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27361#27361 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and CEGUI 0.7
Hi, I´m trying to implement osg with CEGUI 0.7.1... we have the osgcegui.cpp example but is based on older version. http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/examples/osgcegui/osgcegui.cpp I tweak the code and i can complile without problems, but the application gime me an execution error when i create cegui system: Code: CEGUI::System::create( CEGUI::OpenGLRenderer::create() ); Can anybody help me? The examples of cegui wiki are for old versions and is complicate to find information... Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27360#27360 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Pausing and restarting animations in a subgraph read in via osgDB
Hi, I see that you found solution to my problem in this topic. My problem is very similar I have models loaded from external file (.ive exported from 3DSMAX using OSGExp) This file contain animation about 1200 frames. And in my program this animation is playing infinitely but i want to play it only once. I tried to use solution from this topic but in my program it doesn't work or I don't have enough knowledge. This is my program code. Can somebody look at it? please.. [Image: http://forum.openscenegraph.org/images/smiles/icon_arrow.gif ] my source file (http://jezykwaw.je.ohost.de/osgart_AugmentedReality.zip) Thank you! Cheers, Adrian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27359#27359 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Debug Assertion Failed error
Hi Sanat, On 27/04/10 0:46 , Sanat Talmaki wrote: > I tried that and well so far so good. I ran the application and for quite > long and > didn't get that error. I'll crash test it again and hope that the problem's > been > solved. > > Assuming that this caused the bug to be fixed, can you tell me what is the > reasoning > behind it making it work? ... I can't give you the full story, but it has to do with changes to the object happening concurrently with it being rendered. There are a few hits on the mailing list archives, in case you want to dig deeper. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] dimension oh a model
"daniele argiolas" writes: > Hi, > how can I retrieve the dimension of an OSG model loaded in the scene? > > I see that with getBound().radius() I can retrieve informations about the > BoundingSphere. > > But I need also the three dimensions.. Hi Daniele, Assuming that no transformation nodes exist in the graph describing your node, you can write a node visitor that joins all the bounding boxes of every geode. Else you'll need to modify every bounding box by its parent transforms in order to join them. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] dimension oh a model
Hi, how can I retrieve the dimension of an OSG model loaded in the scene? I see that with getBound().radius() I can retrieve informations about the BoundingSphere. But I need also the three dimensions.. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27354#27354 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Slave-cameras and update-callbacks
Hi Martins, Am 27.04.10 22:27, schrieb Martins Innus: > See Robert's response below in a thread entitled "setUpdateCallback > fails under slave-camera" Thanks! So the behaviour is intended. I can work around this. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] QOSGWidget.cpp qt integration ..
Hello everybody, I am trying to run the osgviewerQT with the option --QOSGWidget .. it fails to work. It however works without this option (using AdaptedWidget) . I attached the backtrace when it crashed.. Can anybody see and help me understand why this is failing . I am also going to attach the log file with osg-debug_level set to DEBUG_FP. I am using QT4 to build it. I am also attaching the qt-project file used to compile the program .. I am seeing the exact same behaviour on the application I am developing following the ideas suggested by osgviewerQT example. It works with AdaptedWidget but not with the QOSGWidget.. Thanks and regards, Sunil. #0 0xb65dc471 in strncmp () from /lib/tls/i686/cmov/libc.so.6 #1 0xb7d9b7d4 in osg::LightModel::apply () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgd.so.55 #2 0xb7d18dc5 in osg::State::applyAttribute () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgd.so.55 #3 0xb7e09bee in osg::State::applyAttributeList () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgd.so.55 #4 0xb7dfeb34 in osg::State::apply () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgd.so.55 #5 0xb7582904 in osgUtil::RenderLeaf::render () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #6 0xb7577118 in osgUtil::RenderBin::drawImplementation () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #7 0xb75841f7 in osgUtil::RenderStage::drawImplementation () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #8 0xb75768f1 in osgUtil::RenderBin::draw () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #9 0xb7584cda in osgUtil::RenderStage::drawInner () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #10 0xb7587cfc in osgUtil::RenderStage::draw () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #11 0xb7596ea0 in osgUtil::SceneView::draw () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgUtild.so.55 #12 0xb7165a5b in osgViewer::Renderer::cull_draw () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgViewerd.so.55 #13 0xb7160497 in osgViewer::Renderer::operator() () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgViewerd.so.55 #14 0xb7d654f8 in osg::GraphicsContext::runOperations () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgd.so.55 #15 0xb71ba629 in osgViewer::ViewerBase::renderingTraversals () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgViewerd.so.55 #16 0xb71b7ded in osgViewer::ViewerBase::frame () from /home/sunil/install/osg-2.8.1_shared_debug//lib/libosgViewerd.so.55 #17 0x0805faee in ViewerQOSG::paintEvent (this=0x8c0ab10, event=0xbf914dcc) at QOSGWidget.cpp:309 #18 0x081276fd in QWidget::event () #19 0x080d3bfc in QApplicationPrivate::notify_helper () #20 0x080dabe9 in QApplication::notify () #21 0x0884bb3b in QCoreApplication::notifyInternal () #22 0x0811ef4d in QWidgetPrivate::drawWidget () #23 0x0827a112 in QWidgetPrivate::repaint_sys () #24 0x08115cfe in QWidgetPrivate::syncBackingStore () #25 0x08127ff4 in QWidget::event () #26 0x080d3bfc in QApplicationPrivate::notify_helper () #27 0x080dabe9 in QApplication::notify () #28 0x0884bb3b in QCoreApplication::notifyInternal () #29 0x0884ca1b in QCoreApplicationPrivate::sendPostedEvents () #30 0x0884cc2d in QCoreApplication::sendPostedEvents () #31 0x0887105f in postEventSourceDispatch () #32 0xb6b3dcf6 in IA__g_main_context_dispatch (context=0x8bafa40) at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2012 #33 0xb6b410b3 in g_main_context_iterate (context=0x8bafa40, block=1, dispatch=1, self=0x8baca58) at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2645 #34 0xb6b4166e in IA__g_main_context_iteration (context=0x8bafa40, may_block=1) at /build/buildd/glib2.0-2.16.6/glib/gmain.c:2708 #35 0x088713a1 in QEventDispatcherGlib::processEvents () #36 0x081710f5 in QGuiEventDispatcherGlib::processEvents () #37 0x0884aa2d in QEventLoop::processEvents () #38 0x0884ae4a in QEventLoop::exec () #39 0x0884cced in QCoreApplication::exec () #40 0x080d3687 in QApplication::exec () #41 0x0805f5be in mainQOSGWidget (a...@0xbf915a60, argumen...@0xbf915a3c) at QOSGWidget.cpp:615 #42 0x080635ff in main (argc=2, argv=0xbf915b14) at osgviewerQT.cpp:52 log Description: Binary data qosg.pro Description: application/vnd.nokia.qt.qmakeprofile ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Refreshing a Scenegraph
HI Suvajit, The debig message is telling you that it's just reusing the osgViewer::Scene object, not that it's not re-assigning the scene data itself. The Scene object is a background class used to manage multiple views sharing the same Scene. As for the no visual changes, well are you calling frame afterwards? You won't see any changes unless you re-render the scene. Robert. On Wed, Apr 28, 2010 at 8:24 AM, Suvajit Sengupta wrote: > Hi, > > I have attached a GUIEventHandler to osg::Viewer to refresh the model if the > content in the file has changed. > Like whenever refresh action is called I do the following: > > osg::ref_ptr root = osgDB::readNodeFile("path_to_shp_file"); > viewer->setSceneData(root.get()); > > I have to reread the source file as the content in it has changed. > > But while setting the scenedata OSG states: > View::setSceneData() Reusing exisitng scene01EF1108 > > and hence no visual changes due to change in scenegraph is not perceived. > > It is obvious that I cannot refresh a viewer scene data just by overwriting > it as the reference to existing root still exists. What is the smart way of > doing this like as in updating view when model changes in MVC ? > > ... > > Thank you! > > Cheers, > Suvajit > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27344#27344 > > > > > > ___ > 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] Help for control of Text Labels on HUD type display OFF/ON/BLINK and text
Hi Tim, As a general guide I would recommend picking the simplicist way to implement a solution first and it perform fine then stick with it, don't worry too much about performance. Times to worry about performance are when you've already established a bottleneck through testing and now need to address it, or that you know you are about to throw 10's of thousands of objects at the scene graph and need to do it most efficiently. In your case a simple HUD won't take either the CPU or GPU and an osg::Switch and associated update callback are very unlikely to provide any type of bottleneck. Robert. On Tue, Apr 27, 2010 at 8:07 PM, tim paige wrote: > Hi, > > Thank you, Robert... > I wasn't sure about how "expensive" certain implementations could be and was > concerned about the difference between 1 switch and a bunch of geodes each > with a drawable text versus one geode with a bunch of drawables and node > masking. Geodes just sound so impressive... > Thanks for the reply. I very much appreciate your time and energies here. > I've got lots of learning to do, and...I hope to find some efficiencies along > the way. > > Thank you! On to the next problem! > > Cheers, > tim > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27330#27330 > > > > > > ___ > 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] CityGML
It seems to be very interessting, we're waiting for looking at your work Clement ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] Iam in a puzzle about the realization of osgOcean's 'Glare effect'
Hi, I saw the code in 'OceanScen.cpp', that 5 cameras in 'osgOcean::OceanScen::_glarePasses' were used to render the glare effect. But I saw the realization code in "water.frag" is just as bellow: if(osgOcean_EnableGlare) { float lum = luminance(lumColor); gl_FragData[1] = vec4(lum); } And it looks like that the cameras in 'osgOcean::OceanScen::_glarePasses' were not been used anywhere. Will tell me why? Thank you! Cheers, Tian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27346#27346 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Refreshing a Scenegraph
Hi, I have attached a GUIEventHandler to osg::Viewer to refresh the model if the content in the file has changed. Like whenever refresh action is called I do the following: osg::ref_ptr root = osgDB::readNodeFile("path_to_shp_file"); viewer->setSceneData(root.get()); I have to reread the source file as the content in it has changed. But while setting the scenedata OSG states: View::setSceneData() Reusing exisitng scene01EF1108 and hence no visual changes due to change in scenegraph is not perceived. It is obvious that I cannot refresh a viewer scene data just by overwriting it as the reference to existing root still exists. What is the smart way of doing this like as in updating view when model changes in MVC ? ... Thank you! Cheers, Suvajit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27344#27344 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org