Re: [osg-users] Callbacks: operator() call
Hi, To use a lot of callback, you need to verify that you call *traverse(node, nv);* at the end of each callback operator() to continue traversing the graph. If I'm right, all the callback are traversed at each frame, during the update (for the updatecallback) and is it not done in a parallel thread. Regards, Vincent. 2008/10/29 Renan Mendes [EMAIL PROTECTED] Hi, I'm having some trouble when using a whole lot of callbacks at the same time... Apparently it has something to do with the order that they're being called. I want to know how is it done. Are the operator()'s executed one by one in a given order or are they executed in a parallel manner? Thanks, Renan M Z Mendes ___ 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] I use eclipse IDE with QT4.4.3
Hi I use eclipse IDE with QT4.4.3, Can I integrate with OSG(I compile osg use vc2005 sp1) with eclipse IDE and QT4.4.3, Best Regards YangXiao. - 雅虎邮箱,您的终生邮箱!___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] I use eclipse IDE with QT4.4.3
Hi YangXiao, I think a same compiler (to build OSG and QT) is required, no matter which IDE is used. Wang Rui 2008/10/30 YangXiao [EMAIL PROTECTED] Hi I use eclipse IDE with QT4.4.3, Can I integrate with OSG(I compile osg use vc2005 sp1) with eclipse IDE and QT4.4.3, Best Regards YangXiao. -- 雅虎邮箱,您的终生邮箱! http://cn.mail.yahoo.com/ ___ 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] If I want to use wxWidgets with OSG, do I need a particular version of wxWidgets?
Hi, I've had my share of problems with this of late as well, but managed to get everything working. You have to indeed manually enable OpenGL support when building wxWidgets. To do so, you need to edit the 'master setup.h file'. This file can be found at include/wx/your build platform (as described at http://wiki.wxwidgets.org/Setup.H). Change the value of WX_USE_GLCANVAS from 0 to 1. Then, rebuild the lot. Frank D.J. Caldwell wrote: Whatever your wxWidgets version, I believe you must explicitly enable OpenGL support when building wxWidgets (OpenGL support is disabled by default). D.J. On Wed, Oct 29, 2008 at 11:46 AM, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I thought the latest version should work, but when I try to build the osgviewerWX examples I get the following errors Maybe I am missing something Scanning dependencies of target example_osgviewerWX [ 98%] Building CXX object examples/osgviewerWX/CMakeFiles/example_osgviewerWX.dir/osgviewerWX.o In file included from /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:18: /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.h:14: error: expected class-name before ?{? token /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp: In member function ?virtual bool wxOsgApp::OnInit()?: /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:49: error: ?WX_GL_DOUBLEBUFFER? was not declared in this scope /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:50: error: ?WX_GL_RGBA? was not declared in this scope /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:51: error: ?WX_GL_DEPTH_SIZE? was not declared in this scope /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:53: error: ?WX_GL_STENCIL_SIZE? was not declared in this scope /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp: At global scope: /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:114: error: ?wxGLCanvas? has not been declared /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:115: error: invalid static_cast from type ?void (OSGCanvas::*)(wxSizeEvent)? to type ?void (wxEvtHandler::*)(wxSizeEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:116: error: invalid static_cast from type ?void (OSGCanvas::*)(wxPaintEvent)? to type ?void (wxEvtHandler::*)(wxPaintEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:117: error: invalid static_cast from type ?void (OSGCanvas::*)(wxEraseEvent)? to type ?void (wxEvtHandler::*)(wxEraseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:119: error: invalid static_cast from type ?void (OSGCanvas::*)(wxKeyEvent)? to type ?void (wxEvtHandler::*)(wxKeyEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:120: error: invalid static_cast from type ?void (OSGCanvas::*)(wxKeyEvent)? to type ?void (wxEvtHandler::*)(wxKeyEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:122: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:123: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:124: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:125: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:126: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)? /home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:127: error: invalid static_cast from type ?void (OSGCanvas::*)(wxMouseEvent)? to type ?void (wxEvtHandler::*)(wxMouseEvent)?
[osg-users] Camera rotation on three axes
I'm trying to rotate a camera on all axes but my code fails when the x-axis or y-axis rotation approaches 90 degrees. I am using a viewer.frame loop to avoid the default manipulator supplied by viewer.run. My current camera code is : cameraRotation.makeRotate ( yrads,osg::Vec3 (0, 1, 0) , // roll Y xrads,osg::Vec3 (1, 0, 0) , // pitch X zrads,osg::Vec3 (0, 0, 1) ); // yaw Z cameraTrans.makeTranslate (xdist, ydist, zdist); myCameraMatrix = cameraRotation * cameraTrans; inverseMatrix = myCameraMatrix.inverse (myCameraMatrix); inverseMatrix *= osg::Matrixd::rotate (-(osg::PI_2), 1, 0, 0); viewer.getCamera ()-setViewMatrix (inverseMatrix); When the pitch (xrads) is 0 everything works properly. But when xrads is PI/2 the effect of yrads is identical to zrads (both do z-axis rotation). I've tried applying the rotations in various orders but the code fails when one of the rotations is PI/2. Can anyone suggest what I am doing wrong here or point me to a sample of working code ? Thanks, Steven ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
Steven Saunderson wrote: I'm trying to rotate a camera on all axes but my code fails when the x-axis or y-axis rotation approaches 90 degrees. I am using a viewer.frame loop to avoid the default manipulator supplied by viewer.run. My current camera code is : cameraRotation.makeRotate ( yrads,osg::Vec3 (0, 1, 0) , // roll Y xrads,osg::Vec3 (1, 0, 0) , // pitch X zrads,osg::Vec3 (0, 0, 1) ); // yaw Z cameraTrans.makeTranslate (xdist, ydist, zdist); myCameraMatrix = cameraRotation * cameraTrans; inverseMatrix = myCameraMatrix.inverse (myCameraMatrix); inverseMatrix *= osg::Matrixd::rotate (-(osg::PI_2), 1, 0, 0); viewer.getCamera ()-setViewMatrix (inverseMatrix); When the pitch (xrads) is 0 everything works properly. But when xrads is PI/2 the effect of yrads is identical to zrads (both do z-axis rotation). I've tried applying the rotations in various orders but the code fails when one of the rotations is PI/2. Can anyone suggest what I am doing wrong here or point me to a sample of working code ? You've hit upon a phenomenon called 'gimbal lock'. See http://web.archive.org/web/20041029003853/http:/www.j3d.org/matrix_faq/matrfaq_latest.html#Q34 for an explanation (and possibly some different ways of controling your camera). Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
As Paul mentions the is the age old Gimbal Lock problem The quick answer to this is to build a quaternion and use that populate the oration matrix Or the really old nasty trick of limiting rotations to -89.5 thru +89.5 or so ... Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Melis Sent: Thursday, October 30, 2008 6:10 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Camera rotation on three axes Steven Saunderson wrote: I'm trying to rotate a camera on all axes but my code fails when the x-axis or y-axis rotation approaches 90 degrees. I am using a viewer.frame loop to avoid the default manipulator supplied by viewer.run. My current camera code is : cameraRotation.makeRotate ( yrads,osg::Vec3 (0, 1, 0) , // roll Y xrads,osg::Vec3 (1, 0, 0) , // pitch X zrads,osg::Vec3 (0, 0, 1) ); // yaw Z cameraTrans.makeTranslate (xdist, ydist, zdist); myCameraMatrix = cameraRotation * cameraTrans; inverseMatrix = myCameraMatrix.inverse (myCameraMatrix); inverseMatrix *= osg::Matrixd::rotate (-(osg::PI_2), 1, 0, 0); viewer.getCamera ()-setViewMatrix (inverseMatrix); When the pitch (xrads) is 0 everything works properly. But when xrads is PI/2 the effect of yrads is identical to zrads (both do z-axis rotation). I've tried applying the rotations in various orders but the code fails when one of the rotations is PI/2. Can anyone suggest what I am doing wrong here or point me to a sample of working code ? You've hit upon a phenomenon called 'gimbal lock'. See http://web.archive.org/web/20041029003853/http:/www.j3d.org/matrix_faq/m atrfaq_latest.html#Q34 for an explanation (and possibly some different ways of controling your camera). Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] BS radius : world coordinate or local coordinate ?
Hi Get bounds is the local coordinates of the node. So yes any scale in the tree above the node will need to be factored in if you matrices that apply a scale above the node Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Bourdier Sent: Thursday, October 30, 2008 5:21 AM To: osg Subject: [osg-users] BS radius : world coordinate or local coordinate ? Hi, Just a simple question for you : When I get the Radius of a BS of a node, do I get the radius in World scale unit ? or is the raduis depending on the scale of the node ? for the moment I use : node-getBound().radius() * node-getWorldMatrices()[0].getScale()[0] But I am not sure of the result. Thanks a lot. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
Hi Steven, Here is a snipplet of code from the osgautocapture example that I just sent to osg-submissions (if my email got through?), provided as is. I hope it might be of help: ... // Compute eye point in world coordiantes osg::Vec3d eye; csn-getEllipsoidModel()-convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z()); // Build matrix for computing target vector osg::Matrixd target_matrix = osg::Matrixd::rotate(-heading, osg::Vec3d(1,0,0), -lat, osg::Vec3d(0,1,0), lon, osg::Vec3d(0,0,1)); // Compute tangent vector ... osg::Vec3d tangent = target_matrix.preMult(osg::Vec3d(0, 0, 1)); // Compute non-inclined, non-rolled up vector ... osg::Vec3d up(eye); up.normalize(); // Incline by rotating the target- and up vector around the tangent/up-vector // cross-product ... osg::Vec3d up_cross_tangent = up ^ tangent; osg::Matrixd incline_matrix = osg::Matrixd::rotate(incline, up_cross_tangent); osg::Vec3d target = incline_matrix.preMult(tangent); // Roll by rotating the up vector around the target vector ... osg::Matrixd roll_matrix = incline_matrix * osg::Matrixd::rotate(roll, target); up = roll_matrix.preMult(up); viewerWindow-getCamera()-setViewMatrixAsLookAt(eye, eye+target, up); ... Best regards, John Steven Saunderson wrote: I'm trying to rotate a camera on all axes but my code fails when the x-axis or y-axis rotation approaches 90 degrees. I am using a viewer.frame loop to avoid the default manipulator supplied by viewer.run. My current camera code is : cameraRotation.makeRotate ( yrads,osg::Vec3 (0, 1, 0) , // roll Y xrads,osg::Vec3 (1, 0, 0) , // pitch X zrads,osg::Vec3 (0, 0, 1) ); // yaw Z cameraTrans.makeTranslate (xdist, ydist, zdist); myCameraMatrix = cameraRotation * cameraTrans; inverseMatrix = myCameraMatrix.inverse (myCameraMatrix); inverseMatrix *= osg::Matrixd::rotate (-(osg::PI_2), 1, 0, 0); viewer.getCamera ()-setViewMatrix (inverseMatrix); When the pitch (xrads) is 0 everything works properly. But when xrads is PI/2 the effect of yrads is identical to zrads (both do z-axis rotation). I've tried applying the rotations in various orders but the code fails when one of the rotations is PI/2. Can anyone suggest what I am doing wrong here or point me to a sample of working code ? Thanks, Steven ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Best regards, John WeatherOne -- This message has been scanned for viruses and dangerous content by MailScanner, 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
Re: [osg-users] BS radius : world coordinate or local coordinate ?
Thanks Grodon. :-) 2008/10/30 Tomlinson, Gordon [EMAIL PROTECTED] Hi Get bounds is the local coordinates of the node. So yes any scale in the tree above the node will need to be factored in if you matrices that apply a scale above the node *Gordon* __ *Gordon Tomlinson* *Product Manager 3D **Email * : gtomlinson @ overwatch.textron.com __ *(C): (+1) 571-265-2612 (W)**: (+1) 703-437-7651* Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - *Master Tambo Tetsura* -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Vincent Bourdier *Sent:* Thursday, October 30, 2008 5:21 AM *To:* osg *Subject:* [osg-users] BS radius : world coordinate or local coordinate ? Hi, Just a simple question for you : When I get the Radius of a BS of a node, do I get the radius in World scale unit ? or is the raduis depending on the scale of the node ? for the moment I use : *node-getBound().radius() * node-getWorldMatrices()[0].getScale()[0] *But I am not sure of the result.* * Thanks a lot. Regards, Vincent. ___ 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] auto-capture example: capturing an image from a PagedLOD Database
Hi Robert, I made it work! However, to make the example work I had to a new statistics counter to DatabasePager. I added the method the DatabasePager: /** Get number of fileRequest that are currently being processed in DatabaseThreads */ int getRequestsInProgress() const { return _requestsInProgress; } The member _requestsInProgress is intialized to zero in the DatabasePager c'tors, increased by one in DatabasePager::requestNodeFile(), and decreased by one in DatabasePager::addLoadedDataToSceneGraph(); This counter in the DatabasePager allows me to use the following algorithm in the custom viewer class: ... // Initiate the first PagedLOD request frame(); // Keep rendering until full level of detail is reached while(!done() getDatabasePager()-getRequestsInProgress()) { updateTraversal(); renderingTraversals(); } // Add the WindowCaptureCallback now that we have full resolution getCamera()-setFinalDrawCallback(new WindowCaptureCallback(GL_BACK, _fileName)); renderingTraversals(); // Automatically close after capture close(); ... Although this works, it takes a looong time for the program to capture the full-res image. I'll send the example and DatabasePager mods to osg-submissions, and I hope the community can find a better / faster way to implement this example. I think such a solution is needed for OSG to support auto rendering jobs (command line / cronjob), whether the output is in form of images or movies. One usage example is to render the same animation path each day over a terrain, but with different data overlays (e.g. weather, pollution, traffic, etc.) And you want your movies / images to be crisp;) Best regards, John John Vidar Larring wrote: Hi Robert, Are you planning to submit this example for inclusion with the OSG example set? If so then I could integrate then I and others could tweak it so it works. Yes, that was basically the plan, only that I originally wanted to submit a working example;) The reason for putting together this example in the first place was to create an application scenario that could make it interesting for others to solve this particular DatabasePager problem as well. I'll try out a few more hunches before cleaning up and submitting the example, working or not working. Best regards, John -- Best regards, John WeatherOne -- This message has been scanned for viruses and dangerous content by MailScanner, 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] [Fwd: Re: auto-capture example: capturing an image from a PagedLOD Database]
Re-sending since the the original mail did not seem to make it through... -- John -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ---BeginMessage--- Hi Robert, I made it work! However, to make the example work I had to a new statistics counter to DatabasePager. I added the method the DatabasePager: /** Get number of fileRequest that are currently being processed in DatabaseThreads */ int getRequestsInProgress() const { return _requestsInProgress; } The member _requestsInProgress is intialized to zero in the DatabasePager c'tors, increased by one in DatabasePager::requestNodeFile(), and decreased by one in DatabasePager::addLoadedDataToSceneGraph(); This counter in the DatabasePager allows me to use the following algorithm in the custom viewer class: ... // Initiate the first PagedLOD request frame(); // Keep rendering until full level of detail is reached while(!done() getDatabasePager()-getRequestsInProgress()) { updateTraversal(); renderingTraversals(); } // Add the WindowCaptureCallback now that we have full resolution getCamera()-setFinalDrawCallback(new WindowCaptureCallback(GL_BACK, _fileName)); renderingTraversals(); // Automatically close after capture close(); ... Although this works, it takes a looong time for the program to capture the full-res image. I'll send the example and DatabasePager mods to osg-submissions, and I hope the community can find a better / faster way to implement this example. I think such a solution is needed for OSG to support auto rendering jobs (command line / cronjob), whether the output is in form of images or movies. One usage example is to render the same animation path each day over a terrain, but with different data overlays (e.g. weather, pollution, traffic, etc.) And you want your movies / images to be crisp;) Best regards, John John Vidar Larring wrote: Hi Robert, Are you planning to submit this example for inclusion with the OSG example set? If so then I could integrate then I and others could tweak it so it works. Yes, that was basically the plan, only that I originally wanted to submit a working example;) The reason for putting together this example in the first place was to create an application scenario that could make it interesting for others to solve this particular DatabasePager problem as well. I'll try out a few more hunches before cleaning up and submitting the example, working or not working. Best regards, John -- Best regards, John WeatherOne ---End Message--- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
- From: Paul Melis at 2008-10-30 21:10- You've hit upon a phenomenon called 'gimbal lock'. See http://web.archive.org/web/20041029003853/http:/www.j3d.org/matrix_faq/matrfaq_latest.html#Q34 for an explanation (and possibly some different ways of controling your camera). Hi Paul, Thanks for you quick answer. I've tried loading the matrix manually but I still get stuck when both x-axis and y-axis are PI/2. I am doing a mult after to apply the x,y,z offsets and then getting the inverse matrix before loading the camera. Will these actions thwart the fix ? Thanks, Steven ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager questions
Hi Rick, The osgDB::DatabasePager::instance() exist for backwards compatibility with osgProducer from the OSG-1.x era. In OSG-2.x's osgViewer library there is one osgDB::DatabasePager per osgViewer::Scene, and the Scene is used internally by osgViewer::View to manage the sharing of a single scene graph between multiple View's. The coupling of DatabasePager and Scene ensures that there is only ever one pager working for one scene graph. It also allows multiple scene graphs to be managed, each with their own dedicated pager. In terms of user management, this is all done behind the scenes in osgViewer, it'll just automatically assign and set up and interact with the pager, you needn't do anything yourself. If your scene graph contains PagedLOD then it'll automatically start up and run in the background. The only time you need to know about the DatabasePager is when you want to adjust parameters to optimize the behavior to your type of data/application, but the since the defaults have been chosen to work well for most datasets users typically won't need to tweak parameters. Robert. On Thu, Oct 30, 2008 at 10:57 AM, Rick Appleton [EMAIL PROTECTED] wrote: I've only recently started using OpenSceneGraph, so am probably mistaken about this, but I feel there's some issues with osgDB::DatabasePager. It seems the design of osgDB::DatabasePager allows for multiple instances of it to exist side-by-side. Scene creates one instance in it's constructor, and if you call Registry::getOrCreateDatabasePager without setting a pager up, it creates another instance. The first uses the Database::create function, whereas the second uses a simple 'new'. This has caused us some issues as we only expected there to be a single instance of osgDB::DatabasePager. What is the reason for explicitly allowing this functionality? It may simply be to do with the way we have the DatabasePager setup, but my lack of a higher view of the code is making it hard to understand what's supposed to happen. Can anyone clarify how the DatabasePager is supposed to be used for me? Kind regards, Rick Appleton ___ 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] auto-capture example: capturing an image from a PagedLOD Database
Hi John, Although this works, it takes a looong time for the program to capture the full-res image. I'll send the example and DatabasePager mods to osg-submissions, and I hope the community can find a better / faster way to implement this example. One suggestion to speed up the loading of the required paged lod nodes is to weak the database pager settings: Try to decrease the target frame rate (e.g. to 1), and increase the minimumTimeAvailableForGLCompileAndDeletePerFrame (e.g. to 1) and the maximumNumOfObjectsToCompilePerFrame (e.g. to 100). Kind regards, Daniel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] If I want to use wxWidgets with OSG, do I need a particular version of wxWidgets?
Frank van Meurs wrote: I've had my share of problems with this of late as well, but managed to get everything working. You have to indeed manually enable OpenGL support when building wxWidgets. To do so, you need to edit the 'master setup.h file'. This file can be found at include/wx/your build platform (as described at http://wiki.wxwidgets.org/Setup.H). Change the value of WX_USE_GLCANVAS from 0 to 1. Or pass --with-opengl to ./configure when you're on a platform that use the configure script Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [Fwd: Re: auto-capture example: capturing an image from a PagedLOD Database]
Hi John, I'll do a review of the submission and provide a bit more in the way of thoughts once completed. In terms of possible optimizations, disabling the precompile and only doing the update, event, and cull would be probably the most efficient way to get tiles loaded, then once the tiles are loaded do the final render. The awkward part of this is that the cull and draw are closely coupled in the Viewer... One way around this would be just write a custom CullVisitor that kicks of the database request for a given camera set up. Robert. On Thu, Oct 30, 2008 at 11:23 AM, John Vidar Larring [EMAIL PROTECTED] wrote: Re-sending since the the original mail did not seem to make it through... -- John -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- Forwarded message -- From: John Vidar Larring [EMAIL PROTECTED] To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Date: Thu, 30 Oct 2008 10:37:20 +0100 Subject: Re: [osg-users] auto-capture example: capturing an image from a PagedLOD Database Hi Robert, I made it work! However, to make the example work I had to a new statistics counter to DatabasePager. I added the method the DatabasePager: /** Get number of fileRequest that are currently being processed in DatabaseThreads */ int getRequestsInProgress() const { return _requestsInProgress; } The member _requestsInProgress is intialized to zero in the DatabasePager c'tors, increased by one in DatabasePager::requestNodeFile(), and decreased by one in DatabasePager::addLoadedDataToSceneGraph(); This counter in the DatabasePager allows me to use the following algorithm in the custom viewer class: ... // Initiate the first PagedLOD request frame(); // Keep rendering until full level of detail is reached while(!done() getDatabasePager()-getRequestsInProgress()) { updateTraversal(); renderingTraversals(); } // Add the WindowCaptureCallback now that we have full resolution getCamera()-setFinalDrawCallback(new WindowCaptureCallback(GL_BACK, _fileName)); renderingTraversals(); // Automatically close after capture close(); ... Although this works, it takes a looong time for the program to capture the full-res image. I'll send the example and DatabasePager mods to osg-submissions, and I hope the community can find a better / faster way to implement this example. I think such a solution is needed for OSG to support auto rendering jobs (command line / cronjob), whether the output is in form of images or movies. One usage example is to render the same animation path each day over a terrain, but with different data overlays (e.g. weather, pollution, traffic, etc.) And you want your movies / images to be crisp;) Best regards, John John Vidar Larring wrote: Hi Robert, Are you planning to submit this example for inclusion with the OSG example set? If so then I could integrate then I and others could tweak it so it works. Yes, that was basically the plan, only that I originally wanted to submit a working example;) The reason for putting together this example in the first place was to create an application scenario that could make it interesting for others to solve this particular DatabasePager problem as well. I'll try out a few more hunches before cleaning up and submitting the example, working or not working. Best regards, John -- Best regards, John WeatherOne ___ 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] help building vpb for osg 2.6.1
Hi i´m a vista user, visual studio 2005 and i´m trying to compile VPB against osg 2.6.1 i cheked the vpb web and it said that i needed the vpb svn r924 revision in order to make it work with osg 2.6.0 i downloaded the VPB 0.9.7 and overwrote the files that were modified in the r924 svn release set up everything with cmake 2.6 for visual studio 2005 and now i get compilations errors like these .\TaskManager.cpp(192) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' 2.\TaskManager.cpp(233) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' 2.\TaskManager.cpp(679) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' i guess that 2.6.1 is not the right version for the VPB i´m using. What do you suggest thanks _ ¡Entra en el Club oficial de Messenger y te enterarás de todas las novedades! http://www.vivelive.com/ilovemessenger___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager questions
Thank you Robert for the quick reply. I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph. Kind regards, Rick -Original Message- From: [EMAIL PROTECTED] on behalf of Robert Osfield Sent: Thu 10/30/2008 12:57 PM To: OpenSceneGraph Users Subject: Re: [osg-users] DatabasePager questions Hi Rick, The osgDB::DatabasePager::instance() exist for backwards compatibility with osgProducer from the OSG-1.x era. In OSG-2.x's osgViewer library there is one osgDB::DatabasePager per osgViewer::Scene, and the Scene is used internally by osgViewer::View to manage the sharing of a single scene graph between multiple View's. The coupling of DatabasePager and Scene ensures that there is only ever one pager working for one scene graph. It also allows multiple scene graphs to be managed, each with their own dedicated pager. In terms of user management, this is all done behind the scenes in osgViewer, it'll just automatically assign and set up and interact with the pager, you needn't do anything yourself. If your scene graph contains PagedLOD then it'll automatically start up and run in the background. The only time you need to know about the DatabasePager is when you want to adjust parameters to optimize the behavior to your type of data/application, but the since the defaults have been chosen to work well for most datasets users typically won't need to tweak parameters. Robert. On Thu, Oct 30, 2008 at 10:57 AM, Rick Appleton [EMAIL PROTECTED] wrote: I've only recently started using OpenSceneGraph, so am probably mistaken about this, but I feel there's some issues with osgDB::DatabasePager. It seems the design of osgDB::DatabasePager allows for multiple instances of it to exist side-by-side. Scene creates one instance in it's constructor, and if you call Registry::getOrCreateDatabasePager without setting a pager up, it creates another instance. The first uses the Database::create function, whereas the second uses a simple 'new'. This has caused us some issues as we only expected there to be a single instance of osgDB::DatabasePager. What is the reason for explicitly allowing this functionality? It may simply be to do with the way we have the DatabasePager setup, but my lack of a higher view of the code is making it hard to understand what's supposed to happen. Can anyone clarify how the DatabasePager is supposed to be used for me? Kind regards, Rick Appleton ___ 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 winmail.dat___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager questions
Hi Rick, On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton [EMAIL PROTECTED] wrote: I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph. Oooh, those methods are deprecated, and completely forgotton about... thanks for pointing this out. I've just removed them from the Registry to avoid future confusion. I'll check this in after a clean build. 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.7.4 dev release tagged.
Hello Robert, What are the current requirements on the CMake version used? I have 2.4.6 and get CMake Error: Error in cmake code at /home/paul/c/osg-svn/CMakeLists.txt:25: IF had incorrect arguments: POLICY CMP0008 (Unknown arguments specified). Current CMake stack: /home/paul/c/osg-svn/CMakeLists.txt when configuring... Paul Robert Osfield wrote: Hi All, I have just tagged the OpenSceneGraph-2.7.4 developer release. Downloads on the DeveloperReleases page: http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases * OpenSceneGraph-2.7.4, released on 29th October 2008. OpenSceneGraph-2.7.4, changes include: o New gz plugin for reading gzipped files. o Compression/Uncompression support in .ive using zlib. Use ReaderWriter::Options string compress to enable compression on write. o Support for fine control of mipmapping in osgTerrain::Layer, and support of NPOT textures. o osgDB::DatatabasePager has now mechanism for managing PageLOD expiry - using a target maximum number of active/inactive PagedLOD o osgDB::FileCache Introduced as an extensible mechanism for cache files download from http. o New osgrobot example that demonstrates hierarchies of transforms. o New osggameoflife example that demonstates ping pong RTT. o Various bug and build fixes. source package : OpenSceneGraph-2.7.4.zip svn tag: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.7.4 OpenSceneGraph Full ChangeLog since last dev release below. Robert. -- ChangeLog since 2.7.3 2008-10-29 11:51 + [r9077] robert: * From Blasius Czink, changed the CHECK_CXX_SOURCE_RUNS macro slightly to avoid the compile problems due to bugged intrin.h. In such a case the mutex fallback will be used (see attached file). 2008-10-29 11:15 + [r9076] robert: * Warning fixes 2008-10-29 11:09 + [r9075] robert: * Added missing implementations 2008-10-29 10:56 + [r9074] robert: * Updated ChangeLog and AUTHORS.txt for 2.7.4 release 2008-10-29 10:38 + [r9073] robert: * Updated wrappers 2008-10-29 10:25 + [r9072] robert: * From Lukas Diduch, added a multithread compsite viewer path, accessible using: osgviewerQT --MTCompositeViewer --QOSGWidget cow.osg 2008-10-29 10:12 + [r9071] robert: * From James Moliere, fixed display of axis 2008-10-28 17:28 + [r9070] robert: * From Lionel Lagrade, I've replaced readsome by read+gcount. From Robert Osfeld, added throw on uncompress error. 2008-10-27 19:59 + [r9069] robert: * From Chris Denham, changed nested Camera intersection test so that it requires the command line --relative-camera-scene to enable it 2008-10-27 17:42 + [r9068] robert: * Added --help-env docs for OSG_MAX_PAGEDLOD 2008-10-27 17:11 + [r9066-9067] robert: * Merged in comment split code from the old flt plugin so that FLT comments string with returns in them are put into separate description entries. * From Wojciech Lewandowski, I am sending a really minor fix for StatsHandler::reset method. We dynamically add and remove slave cameras in our application. StatsHandler does not automatically adapt to this situation, and we call StatsHandler::reset to force it to update number of cameras and their graphs. Unfortunately, if stats were already drawn, reset would not remove former graph drawables and they would remain frozen below new stats. This update fixes it. 2008-10-27 16:16 + [r9065] robert: * From Chris Denham, default scene that tests the use of in scene graph Camera which has a RELATIVE_RF ReferenceFrame. 2008-10-27 16:06 + [r9064] robert: * From Chris Denham, fixed support of in scene graph osg::Camera's with ReferenceFrame of RELATIVE_RF. 2008-10-27 15:26 + [r9063] robert: * From Katharina Plugge, I found a bug in the OpenFlight-Plugin. When exporting to OpenFlight it could happen that palettes of an external reference like the texture palette are set wrong, because they are overwritten by parent settings (userData), which actually do not refer to palette entries respectively ParentPools (happens for example if a Transform is parent of a ProxyNode). The static cast from userData to ParentPools should therefore be a dynamic cast. --- function FltExportVisitor::writeExternalReference( const osg::ProxyNode proxy ): Line 423 in file expPrimaryRecords.cpp has to be changed from const ParentPools* pp = static_castconst ParentPools*(proxy.getUserData() ); to const ParentPools* pp =
Re: [osg-users] DatabasePager questions
Thanks again for the quick reply. All is clear now, and I'll fix our code to not use the Registry DatabasePager. Rick -Original Message- From: [EMAIL PROTECTED] on behalf of Robert Osfield Sent: Thu 10/30/2008 1:36 PM To: OpenSceneGraph Users Subject: Re: [osg-users] DatabasePager questions Hi Rick, On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton [EMAIL PROTECTED] wrote: I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph. Oooh, those methods are deprecated, and completely forgotton about... thanks for pointing this out. I've just removed them from the Registry to avoid future confusion. I'll check this in after a clean build. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org winmail.dat___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.7.4 dev release tagged.
Ok, upgrading to CMake 2.7.8 seems to have fixed this... Paul Paul Melis wrote: Hello Robert, What are the current requirements on the CMake version used? I have 2.4.6 and get CMake Error: Error in cmake code at /home/paul/c/osg-svn/CMakeLists.txt:25: IF had incorrect arguments: POLICY CMP0008 (Unknown arguments specified). Current CMake stack: /home/paul/c/osg-svn/CMakeLists.txt when configuring... Paul Robert Osfield wrote: Hi All, I have just tagged the OpenSceneGraph-2.7.4 developer release. Downloads on the DeveloperReleases page: http://www.openscenegraph.org/projects/osg/wiki/Downloads/DeveloperReleases * OpenSceneGraph-2.7.4, released on 29th October 2008. OpenSceneGraph-2.7.4, changes include: o New gz plugin for reading gzipped files. o Compression/Uncompression support in .ive using zlib. Use ReaderWriter::Options string compress to enable compression on write. o Support for fine control of mipmapping in osgTerrain::Layer, and support of NPOT textures. o osgDB::DatatabasePager has now mechanism for managing PageLOD expiry - using a target maximum number of active/inactive PagedLOD o osgDB::FileCache Introduced as an extensible mechanism for cache files download from http. o New osgrobot example that demonstrates hierarchies of transforms. o New osggameoflife example that demonstates ping pong RTT. o Various bug and build fixes. source package : OpenSceneGraph-2.7.4.zip svn tag: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.7.4 OpenSceneGraph Full ChangeLog since last dev release below. Robert. -- ChangeLog since 2.7.3 2008-10-29 11:51 + [r9077] robert: * From Blasius Czink, changed the CHECK_CXX_SOURCE_RUNS macro slightly to avoid the compile problems due to bugged intrin.h. In such a case the mutex fallback will be used (see attached file). 2008-10-29 11:15 + [r9076] robert: * Warning fixes 2008-10-29 11:09 + [r9075] robert: * Added missing implementations 2008-10-29 10:56 + [r9074] robert: * Updated ChangeLog and AUTHORS.txt for 2.7.4 release 2008-10-29 10:38 + [r9073] robert: * Updated wrappers 2008-10-29 10:25 + [r9072] robert: * From Lukas Diduch, added a multithread compsite viewer path, accessible using: osgviewerQT --MTCompositeViewer --QOSGWidget cow.osg 2008-10-29 10:12 + [r9071] robert: * From James Moliere, fixed display of axis 2008-10-28 17:28 + [r9070] robert: * From Lionel Lagrade, I've replaced readsome by read+gcount. From Robert Osfeld, added throw on uncompress error. 2008-10-27 19:59 + [r9069] robert: * From Chris Denham, changed nested Camera intersection test so that it requires the command line --relative-camera-scene to enable it 2008-10-27 17:42 + [r9068] robert: * Added --help-env docs for OSG_MAX_PAGEDLOD 2008-10-27 17:11 + [r9066-9067] robert: * Merged in comment split code from the old flt plugin so that FLT comments string with returns in them are put into separate description entries. * From Wojciech Lewandowski, I am sending a really minor fix for StatsHandler::reset method. We dynamically add and remove slave cameras in our application. StatsHandler does not automatically adapt to this situation, and we call StatsHandler::reset to force it to update number of cameras and their graphs. Unfortunately, if stats were already drawn, reset would not remove former graph drawables and they would remain frozen below new stats. This update fixes it. 2008-10-27 16:16 + [r9065] robert: * From Chris Denham, default scene that tests the use of in scene graph Camera which has a RELATIVE_RF ReferenceFrame. 2008-10-27 16:06 + [r9064] robert: * From Chris Denham, fixed support of in scene graph osg::Camera's with ReferenceFrame of RELATIVE_RF. 2008-10-27 15:26 + [r9063] robert: * From Katharina Plugge, I found a bug in the OpenFlight-Plugin. When exporting to OpenFlight it could happen that palettes of an external reference like the texture palette are set wrong, because they are overwritten by parent settings (userData), which actually do not refer to palette entries respectively ParentPools (happens for example if a Transform is parent of a ProxyNode). The static cast from userData to ParentPools should therefore be a dynamic cast. --- function FltExportVisitor::writeExternalReference( const osg::ProxyNode proxy ): Line 423 in file expPrimaryRecords.cpp has to be changed from const ParentPools* pp = static_castconst ParentPools*(proxy.getUserData() ); to const ParentPools* pp = dynamic_castconst ParentPools*(proxy.getUserData() ); 2008-10-27 13:09 +
Re: [osg-users] DatabasePager questions
On Thu, Oct 30, 2008 at 12:52 PM, Rick Appleton [EMAIL PROTECTED] wrote: Thanks again for the quick reply. All is clear now, and I'll fix our code to not use the Registry DatabasePager. They are now removed from svn too :-) 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.7.4 dev release tagged.
Paul Melis wrote: Ok, upgrading to CMake 2.7.8 seems to have fixed this... Doh! That should be 2.4.8... Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
- From: Paul Melis at 2008-10-30 23:45- Steven Saunderson wrote: Hi Paul, Thanks for you quick answer. I've tried loading the matrix manually but I still get stuck when both x-axis and y-axis are PI/2. I'm not sure what you mean here. It sounds like you're building your matrix from Euler angles manually, but this will still not solve your gimbal lock problem. You're quite right here. I'm now reading the entire FAQ especially about quaternions. To quote Q39 in the link above: Don't let the spectre of Gimbal Lock fool you: Euler angles are still a complete representation of any rotation in 3D space; it's just that the actual Euler angles needed to achieve some particular desired rotation may be rather unintuitive. Does this mean that instead of rotating both x and y 90 degrees I should find another axis and rotate around this ? What exactly are you trying to achieve? Where do the pitch, rol, yaw values come from, are they user-specified? It is a flight simulator. The pitch, roll, and yaw values come from an external source so any combination is possible. Thanks for the FAQ link; it is a great resource. -- Steven ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager questions
Thanks for removing it. The osgDB::Registry::getOrCreateDatabasePager function method has probably sent me on a wild goose chase more than once... -- John Robert Osfield wrote: Hi Rick, On Thu, Oct 30, 2008 at 12:17 PM, Rick Appleton [EMAIL PROTECTED] wrote: I see the point in having a single osgDB::DatabasePager for a single osgViewer::Scene. However, this immediately raises the question which DatabasePager osgDB::Registry would point to, as osgDB::Registry is a singleton and only has a single pointer to a DatabasePager. Should we ignore the osgDB::Registry::getOrCreateDatabasePager function? I don't see it being used anywhere in OpenSceneGraph. Oooh, those methods are deprecated, and completely forgotton about... thanks for pointing this out. I've just removed them from the Registry to avoid future confusion. I'll check this in after a clean build. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Best regards, John WeatherOne -- This message has been scanned for viruses and dangerous content by MailScanner, 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
Re: [osg-users] World-space bounds of a node
Hi, osg::Vec3 radiusVec(bs._radius, 0, 0); radiusVec = osg:Matrixd::transform3x3(radiusVec, localToWorld); bs._radius = radiusVec.length(); Or as Vincent noted: radius *= localToWorld.getScale().x(); But that would only be correct if the scale is uniform. If not, the bounding sphere is a bounding ellipsoid anyways... But I might want to scale the radius by the largest of the x, y or z scale factors to be conservative. Does that sound good? J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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] mingw build problems
On Thu, Oct 30, 2008 at 9:38 AM, Alberto Luaces [EMAIL PROTECTED] wrote: Hi Csaba, Out of curiosity, are you jester? Hi Alberto, Yes that's me :) If that were your machine, how did you manage to install Dart with Mingw? I am be interested in doing the same with a Cygwin build. I built tcl and installed Dart. But it didn't work properly, and later I found out you *don't* need dart/tcl at all. Current cmake has a ctest module that does everything. Somebody should put this in big fat letters somewhere :) So just enable the dart stuff in the config and you are done. (It will still use DartConfiguration.tcl, don't be surprised by that) -- Csaba ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World-space bounds of a node
Jean-Sébastien Guay wrote: osg::Vec3 radiusVec(bs._radius, 0, 0); radiusVec = osg:Matrixd::transform3x3(radiusVec, localToWorld); bs._radius = radiusVec.length(); Or as Vincent noted: radius *= localToWorld.getScale().x(); But that would only be correct if the scale is uniform. If not, the bounding sphere is a bounding ellipsoid anyways... But I might want to scale the radius by the largest of the x, y or z scale factors to be conservative. Does that sound good? It doesn't feel completely robust. What if your transformation matrix is a composite of scale, rotation, scale, rotation, etc. Then you can't simply decompose it into a rotation and a scale part, right? You could take a look at osg::Transform::computeBound() :) Paul PS Interestingly, Microsoft has a patent on cheaply computing bounding sphere radii in a scene graph. See US patent 6,664,975 in case you're interested ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World-space bounds of a node
Hi Paul, PS Interestingly, Microsoft has a patent on cheaply computing bounding sphere radii in a scene graph. See US patent 6,664,975 in case you're interested Well, then forget I ever said anything about this. :-) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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] help building vpb for osg 2.6.1
solved From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Thu, 30 Oct 2008 13:07:28 +0100 Subject: [osg-users] help building vpb for osg 2.6.1 Hi i´m a vista user, visual studio 2005 and i´m trying to compile VPB against osg 2.6.1 i cheked the vpb web and it said that i needed the vpb svn r924 revision in order to make it work with osg 2.6.0 i downloaded the VPB 0.9.7 and overwrote the files that were modified in the r924 svn release set up everything with cmake 2.6 for visual studio 2005 and now i get compilations errors like these .\TaskManager.cpp(192) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' 2.\TaskManager.cpp(233) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' 2.\TaskManager.cpp(679) : error C2039: 'getTerrainTechnique' : is not a member of 'osgTerrain::Terrain' 2 D:\OpenSceneGraph-2.6.1\OpenSceneGraph-2.6.1\include\osgTerrain/Terrain(26) : see declaration of 'osgTerrain::Terrain' i guess that 2.6.1 is not the right version for the VPB i´m using. What do you suggest thanks ¡Trónchate de risa con los mejores capítulos de South Park en MSN Vídeo! _ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] choppiness on 2nd graphics card with 4 monitors
Hi Robert, Problem solved! It appears that this was either a Vista issue, an Nvidia Vista driver issue, or a combination of both. I managed to get an XP installation running using an extra internal hard drive on the 4 monitor system. With osgviewer on 4 monitors I'm getting nearly 500 fps with vsync off (and with vsync on, I'm getting a constant 60 fps). ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgShadow question (ATI related?)
Hi Wojtek, Thanks for helping out. Unfortunately I didn't have much time today to further investigate the problem. It does not sound like easy one. Are you sure that ATI bug only affects texture application ? Maybe render to texture is also flipped somehow. I assume you have modified texgen matrix but not shadow camera projection matrix (the one involved in computation of texgen matrix) ? If shadow camera projection gets modified it could potentially affect rest of the code. I don't know. I read on the mailing list that there is an issue with FBO textures on ATI, because at some point, ATI inverted the 't coordinate' in their drivers. http://archive.netbsd.se/?ml=openscenegraph-submissionsa=2008-02m=6605417 Actually, one idea just came to my mind, MinimalDrawBoundsShadowMap does rough depth map prerender to compute visible shadowed scene extents. I suppose reverted vertical texture coordinates may also affect this code. You may look at MinimaDrawBounds line 203 - its the place where matrix for prerenderd image scan is computed - and you may need to make the fixes there. As a alternative approach, you could try LightSpacePerspectiveShadowMapCB and see if the problem is also present ? LightSpacePerspectiveShadowMapCB variant computes shadowed volume by scanning boxes around drawables in render bins and should avoid at least this potential prerenderd image scanning issue. OK, I quickly tried LightSpacePerspectiveShadowMapCB but the problem was still present. Unfortunately I didn't have enough time to take a good look at the prerendered image scan computation. I will keep looking into tomorrow, starting at the MinimalShadowMap level as this seems to be the lowest level at which the problem occurs on my system. Good luck. And let me know if you come up with some constructive conclusion, possible fixes or workarounds. Thanks, and I will certainly let you know if I find something! Cheers, Rick. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] read file Collada using osg
Hi, I'm trying to read a file extension .dae (COLLADA) version 1.4.0, using openSceneGraph version 2.4, but I'm getting the information that has no plugin todo the reading.How do I solve this? int main(){osg::Group* cenario = new osg::Group();osg::Geode* GeodeTerreno = new osg::Geode();osgViewer::Viewer* viewer = new osgViewer::Viewer();// Define a estrutura para o modelo 3D da nave espacialosg::Node* sphere = osgDB::readNodeFile(BaseEsfera.dae);osg::MatrixTransform* matrizTransformacoesSphere = new osg::MatrixTransform();matrizTransformacoesSphere-addChild(sphere);cenario-addChild(matrizTransformacoesSphere);// run optimization over the scene graphosgUtil::Optimizer optimzer;optimzer.optimize(cenario);viewer-setSceneData(cenario);return viewer-run();} _ Instale a Barra de Ferramentas com Desktop Search e ganhe EMOTICONS para o Messenger! É GRÁTIS! http://www.msn.com.br/emoticonpack___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] read file Collada using osg
You will need to build the Collada 3rd party libraries and dependencies www.collada.org Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai Canêz Sent: Thursday, October 30, 2008 2:49 PM To: osg Subject: [osg-users] read file Collada using osg Hi, I'm trying to read a file extension .dae (COLLADA) version 1.4.0, using openSceneGraph version 2.4, but I'm getting the information that has no plugin todo the reading. How do I solve this? int main() { osg::Group* cenario = new osg::Group(); osg::Geode* GeodeTerreno = new osg::Geode(); osgViewer::Viewer* viewer = new osgViewer::Viewer(); // Define a estrutura para o modelo 3D da nave espacial osg::Node* sphere = osgDB::readNodeFile(BaseEsfera.dae); osg::MatrixTransform* matrizTransformacoesSphere = new osg::MatrixTransform(); matrizTransformacoesSphere-addChild(sphere); cenario-addChild(matrizTransformacoesSphere); // run optimization over the scene graph osgUtil::Optimizer optimzer; optimzer.optimize(cenario); viewer-setSceneData(cenario); return viewer-run(); } Veja mapas e encontre as melhores rotas para fugir do trânsito com o Live Search Maps! Experimente já! http://www.livemaps.com.br/index.aspx?tr=true ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] read file Collada using osg
Hi, when I'm compile osg I'm using 3rd party from http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies. This package not solve this problem? Date: Thu, 30 Oct 2008 14:52:27 -0400From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [osg-users] read file Collada using osg You will need to build the Collada 3rd party libraries and dependencies www.collada.org Gordon __Gordon Tomlinson Product Manager 3DEmail : gtomlinson @ overwatch.textron.com__(C): (+1) 571-265-2612(W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai CanêzSent: Thursday, October 30, 2008 2:49 PMTo: osgSubject: [osg-users] read file Collada using osg Hi, I'm trying to read a file extension .dae (COLLADA) version 1.4.0, using openSceneGraph version 2.4, but I'm getting the information that has no plugin todo the reading.How do I solve this? int main(){osg::Group* cenario = new osg::Group();osg::Geode* GeodeTerreno = new osg::Geode();osgViewer::Viewer* viewer = new osgViewer::Viewer();// Define a estrutura para o modelo 3D da nave espacialosg::Node* sphere = osgDB::readNodeFile(BaseEsfera.dae);osg::MatrixTransform* matrizTransformacoesSphere = new osg::MatrixTransform();matrizTransformacoesSphere-addChild(sphere);cenario-addChild(matrizTransformacoesSphere);// run optimization over the scene graphosgUtil::Optimizer optimzer;optimzer.optimize(cenario);viewer-setSceneData(cenario);return viewer-run();} Veja mapas e encontre as melhores rotas para fugir do trânsito com o Live Search Maps! Experimente já! _ Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger! http://www.amigosdomessenger.com.br/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] read file Collada using osg
Well did you read what 3rd Party packages it provides ? Does it list Collada if it does then you should be ok if it does not then you have provide.. The package only provides a subset of possible 3rd part additions for OSG its aimed at the common prerequisites that most would need Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai Canêz Sent: Thursday, October 30, 2008 3:00 PM To: osg Subject: Re: [osg-users] read file Collada using osg Hi, when I'm compile osg I'm using 3rd party from http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies. This package not solve this problem? Date: Thu, 30 Oct 2008 14:52:27 -0400 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] read file Collada using osg You will need to build the Collada 3rd party libraries and dependencies www.collada.org http://www.collada.org/ Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai Canêz Sent: Thursday, October 30, 2008 2:49 PM To: osg Subject: [osg-users] read file Collada using osg Hi, I'm trying to read a file extension .dae (COLLADA) version 1.4.0, using openSceneGraph version 2.4, but I'm getting the information that has no plugin todo the reading. How do I solve this? int main() { osg::Group* cenario = new osg::Group(); osg::Geode* GeodeTerreno = new osg::Geode(); osgViewer::Viewer* viewer = new osgViewer::Viewer(); // Define a estrutura para o modelo 3D da nave espacial osg::Node* sphere = osgDB::readNodeFile(BaseEsfera.dae); osg::MatrixTransform* matrizTransformacoesSphere = new osg::MatrixTransform(); matrizTransformacoesSphere-addChild(sphere); cenario-addChild(matrizTransformacoesSphere); // run optimization over the scene graph osgUtil::Optimizer optimzer; optimzer.optimize(cenario); viewer-setSceneData(cenario); return viewer-run(); } Veja mapas e encontre as melhores rotas para fugir do trânsito com o Live Search Maps! Experimente já! http://www.livemaps.com.br/index.aspx?tr=true Conheça já o Windows Live Spaces, o site de relacionamentos do Messenger! Crie já o seu! http://www.amigosdomessenger.com.br ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CompositeViewer event delivery bug? [patch included]
Hi, I use osgViewer::CompositeViewer with several views. All views share parts of their scene graphs. Within these common part some nodes have event handlers which use the action adapter argument to the event handler to determinate which view received the event. Here is the problem, osgViewer::CompositeViewer::eventTraversal sets the action adapter field in the EventVisitor always to the last view which received an event, instead of using the view which actually received the event, so determination of the correct view does not work. I looked at the code a bit, and moved the code for setting the action adapter to a IMO better place. btw, on every mouse move all views seem to receive FRAME events, is that normal or is it some glitch within my application? thanks in advance, thomas --- OpenSceneGraph-2.6.1/src/osgViewer/CompositeViewer.cpp 2008-07-21 23:00:57.0 +0200 +++ OpenSceneGraph-2.6.1.patched/src/osgViewer/CompositeViewer.cpp 2008-10-30 14:51:45.160100471 +0100 @@ -865,7 +865,6 @@ ++veitr) { View* view = veitr-first; -_eventVisitor-setActionAdapter(view); for(osgGA::EventQueue::Events::iterator itr = veitr-second.begin(); itr != veitr-second.end(); @@ -897,6 +896,8 @@ ++veitr) { View* view = veitr-first; +_eventVisitor-setActionAdapter( view ); + if (view-getSceneData()) { for(osgGA::EventQueue::Events::iterator itr = veitr-second.begin(); ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and C# Users
Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] read file Collada using osg
Hi, I'm don't find source of collada in www.collada.org, what is location download? Date: Thu, 30 Oct 2008 15:06:07 -0400From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [osg-users] read file Collada using osg Well did you read what 3rd Party packages it provides ? Does it list Collada if it does then you should be ok if it does not then you have provide.. The package only provides a subset of possible 3rd part additions for OSG its aimed at the common prerequisites that most would need Gordon __Gordon Tomlinson Product Manager 3DEmail : gtomlinson @ overwatch.textron.com__(C): (+1) 571-265-2612(W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai CanêzSent: Thursday, October 30, 2008 3:00 PMTo: osgSubject: Re: [osg-users] read file Collada using osg Hi, when I'm compile osg I'm using 3rd party from http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies. This package not solve this problem? Date: Thu, 30 Oct 2008 14:52:27 -0400From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [osg-users] read file Collada using osg You will need to build the Collada 3rd party libraries and dependencies www.collada.org Gordon __Gordon Tomlinson Product Manager 3DEmail : gtomlinson @ overwatch.textron.com__(C): (+1) 571-265-2612(W): (+1) 703-437-7651 Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adonai CanêzSent: Thursday, October 30, 2008 2:49 PMTo: osgSubject: [osg-users] read file Collada using osg Hi, I'm trying to read a file extension .dae (COLLADA) version 1.4.0, using openSceneGraph version 2.4, but I'm getting the information that has no plugin todo the reading.How do I solve this? int main(){osg::Group* cenario = new osg::Group();osg::Geode* GeodeTerreno = new osg::Geode();osgViewer::Viewer* viewer = new osgViewer::Viewer();// Define a estrutura para o modelo 3D da nave espacialosg::Node* sphere = osgDB::readNodeFile(BaseEsfera.dae);osg::MatrixTransform* matrizTransformacoesSphere = new osg::MatrixTransform();matrizTransformacoesSphere-addChild(sphere);cenario-addChild(matrizTransformacoesSphere);// run optimization over the scene graphosgUtil::Optimizer optimzer;optimzer.optimize(cenario);viewer-setSceneData(cenario);return viewer-run();} Veja mapas e encontre as melhores rotas para fugir do trânsito com o Live Search Maps! Experimente já! Conheça já o Windows Live Spaces, o site de relacionamentos do Messenger! Crie já o seu! _ Cansado de espaço para só 50 fotos? Conheça o Spaces, o site de relacionamentos com até 6,000 fotos! http://www.amigosdomessenger.com.br___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenSceneGraph Stereo Viewer question
Hi all! It's very easy to load a model using stereo display by add an argument --stereo on console line, such as osgviewer --stereo cow.osg but how can I implement the stereo display on my application? I have searched all over but can not find it anywhere. One more question: Where can I find the osgviewer source code? osgViewer/Viewer.cpp is not that, right? TnTonly Corporation http://tntonly.myftp.org Home | Forum | Blog Our lastest offer: HTML Calculator| Simple Blog| Shopping Cart Service* | Online Personal OS** * In development and for testing only ** Contact [EMAIL PROTECTED] for a FREE storage Chọn ngay địa chỉ email bạn thích! Giờ đã có @ymail.com và @rocketmail.com. http://mail.promotions.yahoo.com/newdomains/vn/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and C# Users
Hi Maya, As long as you have the appropriate image plugin within your path (osgdb_jpg.dll, osgdb_gif.dll, etc) things should work fine. Make sure you are building these plugins and they are accessible. In theory, if the model works from osgviewer, it should work in your c# application. Good luck! Jason On Thu, Oct 30, 2008 at 3:18 PM, maya leonard [EMAIL PROTECTED]wrote: Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya -- Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Nowhttp://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 ___ 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] read file Collada using osg
Adonai Canêz wrote: Hi, I'm don't find source of collada in www.collada.org http://www.collada.org, what is location download? The library is called the COLLADA DOM. You can find it here: http://sourceforge.net/project/showfiles.php?group_id=157838package_id=270665release_id=596687 --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph Stereo Viewer question
Hello Thanh, It's very easy to load a model using stereo display by add an argument --stereo on console line, such as osgviewer --stereo cow.osg but how can I implement the stereo display on my application? I have searched all over but can not find it anywhere. Check osg::DisplaySettings::setStereo. You would do for example osg::DisplaySettings::instance()-setStereo(true); osg::DisplaySettings::instance()-setStereoMode(...); before creating your graphics context (or before the viewer creates it). One more question: Where can I find the osgviewer source code? osgViewer/Viewer.cpp is not that, right? OpenSceneGraph/applications/osgViewer/osgviewer.cpp But it's pretty simple, you won't find for example the --STEREO option there, it's checked somewhere else. I suggest you do a find in files to find out where. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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] read file Collada using osg
Try searching the osg-users archives for collada. This has been discussed extensively in the past (where to get the DOM source, what version is required, etc). -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgManipulator::Dragger and osg::AutoTransform
Hi guys, Once again, a question about something pretty specific, so bear with me please... I want an osgManipulator::Dragger to be always the same size on the screen, independently of how far away the camera is (if someone is familiar with Maya, something like that). So I thought putting it under an osg::AutoTransform with autoScaleToScreen = true would be ideal. Unfortunately, since the dragger stores its transform in its own matrix, the dragger now moves in pixel increments instead of in world unit increments. The object I'm manipulating moves correctly when I drag the dragger, but the dragger doesn't follow. Is there a way to get the AutoTransform to only affect the scale, and not other parts of the transformation matrix? Or is there some other way to do what I want to do? I thought perhaps the dragger could resize itself by listening to FRAME events or something like that and then determining the proper size. Has anyone done this before? Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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] OSG and C# Users
Jason The osgdb_jpg.dll and osgdb_gif.dll plugins are in the same location as the osgdb_gif and osgdb_rgb.dll, so I would expect them to work. Any other hints? thanks maya From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Beverage Sent: Thursday, October 30, 2008 3:46 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OSG and C# Users Hi Maya, As long as you have the appropriate image plugin within your path (osgdb_jpg.dll, osgdb_gif.dll, etc) things should work fine. Make sure you are building these plugins and they are accessible. In theory, if the model works from osgviewer, it should work in your c# application. Good luck! Jason On Thu, Oct 30, 2008 at 3:18 PM, maya leonard [EMAIL PROTECTED] wrote: Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Now http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cn s%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 ___ 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 and C# Users
Hi Maya, It's hard to tell what could be going on without some more information about your setup. One thing you should try is setting the OSG_NOTIFY_LEVEL environment variable to DEBUG to help get a clue of what is going on. If you build your app as a Console application you will see all of OSG's debug messages and might point you to the problem. I'm grasping at straws here and just guessing, but if you are using an OpenFileDialog to load your models, make sure that that RestoreDirectory property is set to true. If not, it will change your applications working directory and OpenSceneGraph won't know where to find your plugins. Jason On Thu, Oct 30, 2008 at 6:02 PM, usergroups_email [EMAIL PROTECTED]wrote: Jason The osgdb_jpg.dll and osgdb_gif.dll plugins are in the same location as the osgdb_gif and osgdb_rgb.dll, so I would expect them to work. Any other hints? thanks maya *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Jason Beverage *Sent:* Thursday, October 30, 2008 3:46 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG and C# Users Hi Maya, As long as you have the appropriate image plugin within your path (osgdb_jpg.dll, osgdb_gif.dll, etc) things should work fine. Make sure you are building these plugins and they are accessible. In theory, if the model works from osgviewer, it should work in your c# application. Good luck! Jason On Thu, Oct 30, 2008 at 3:18 PM, maya leonard [EMAIL PROTECTED] wrote: Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya -- Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Nowhttp://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 ___ 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] OSG and C# Users
Jason Thanks for the quick response. Trying debug mode I get FindFileInPath() : trying XXX\OpenSceneGraph\bin\osgPlugins-2.7.3\osgdb_jpegd.dll ... FindFileInPath() : USING XXX\OpenSceneGraph\bin\osgPlugins-2.7.3\osgdb_jpegd.dll DynamicLibrary::failed loading osgPlugins-2.7.3/osgdb_jpegd.dll Trying osgviewer --image skymap.jpg worked fine. I'm using osgCppCLIDemo/osgNETDemo.exe as an example to get started using C# and OSG I got this file from http://www.openscenegraph.org/projects/osg/wiki/Community/LanguageWrappers The scenefile I'm trying is skydome.osg from the example osg dataset and it works fine with osgviewer. So obviously the error issue relates to the C#/OSG configuration. Are you using the example osgCppCLIDemo? Cheers Maya From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Beverage Sent: Thursday, October 30, 2008 6:34 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OSG and C# Users Hi Maya, It's hard to tell what could be going on without some more information about your setup. One thing you should try is setting the OSG_NOTIFY_LEVEL environment variable to DEBUG to help get a clue of what is going on. If you build your app as a Console application you will see all of OSG's debug messages and might point you to the problem. I'm grasping at straws here and just guessing, but if you are using an OpenFileDialog to load your models, make sure that that RestoreDirectory property is set to true. If not, it will change your applications working directory and OpenSceneGraph won't know where to find your plugins. Jason On Thu, Oct 30, 2008 at 6:02 PM, usergroups_email [EMAIL PROTECTED] wrote: Jason The osgdb_jpg.dll and osgdb_gif.dll plugins are in the same location as the osgdb_gif and osgdb_rgb.dll, so I would expect them to work. Any other hints? thanks maya From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Beverage Sent: Thursday, October 30, 2008 3:46 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OSG and C# Users Hi Maya, As long as you have the appropriate image plugin within your path (osgdb_jpg.dll, osgdb_gif.dll, etc) things should work fine. Make sure you are building these plugins and they are accessible. In theory, if the model works from osgviewer, it should work in your c# application. Good luck! Jason On Thu, Oct 30, 2008 at 3:18 PM, maya leonard [EMAIL PROTECTED] wrote: Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Now http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cn s%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 ___ 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] Shadows in osgviewerQT ?
Hi, OK so I figured out that my problems are due to using AdapterWidget - I understand that shadows etc. should work fine with QOSGWidget. Unfortunately QOSGWidget doesn't work here: the widgets remains white and Qt prints warnings about recursive repaint. I've checked out the latest OSG trunk and tried with that but get the same result (actually it segfaults due to a bogus ifdef in the QOSGWidget source code - I'll send over a patch shortly - but after fixing that I get the same result.) I've started tracking down the problem, so far the only thing that I figured out is that GetWindowPort always seems to return 0 for the QOSGWidget's native peer - is that expected? I'm using Qt 4.4.3 on an Intel Mac with OS X 10.5. The Carbon code paths are used, not X11. Are there any known problems with QOSGWidget with Qt 4.4, OS X 10.5 or with the Carbon peers? Thanks in advance, Julian On Thu, Oct 30, 2008 at 3:30 AM, Julian Scheid [EMAIL PROTECTED]wrote: Hi, I'm trying to embed osg in a Qt4 application. I've had some troubles with FSAA/multisampling but managed to work around it by configuring the QGLWidget for FSAA instead of osg. However, I'm now trying to get shadows to work based on the osgshadow code, and it seems that no matter which shadowing technique I try it brings my machine to a grinding halt - the whole screen starts to flicker wildly, circles and balls reminiscent of Katamari Damacy are drawn into the scene, and when continuous update (via timer) is enabled I have no recourse but to restart my machine. (This is one of the new Intel Macbooks running OS X 10.5) I gather that when embedded in Qt, the GraphicsWindowCarbon code isn't used and osg just uses the existing GL context. Does that mean that I would have to manually setup Qt's GL context and somehow synchronize it with osg's shadow magic? If all that is meant to be supported in the Qt viewer, is there any chance you could add an example for this situation? Thanks in advance, -Julian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TrackballManipulator asymptote
thanks again Robert - now I better understand how TrackballManipulator works. I overloaded the calcMovement() function to move consistently and it is working well. Richard Hi *Richard*, The trackball slows as you move into the origin as the rate of movement in is always a percentage of distance from the center to the eye point. This is just the way it works, it's not some that can be fixed as it's doing exactly what it's meant to do. Now if you want some custom manipulator that kinda behaves like the TrackballManipulator then you'll need to subclass or just write your own from scratch. One hack you could implement is the pushing forward of the center as you get near to it, rather than just keep reducing the distance between the eye and the center. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and C# Users
Hi Maya, I'm not sure why the osgdb_jpegd.dll would fail to load, hard to say. One thing to note is that osgviewer works, but what about osgviewerd? From the debug output, you are running your app in debug mode. Try running in release and see if it works. I'll bet that osgviewerd doesn't work. Thanks, Jason On Thu, Oct 30, 2008 at 7:08 PM, usergroups_email [EMAIL PROTECTED]wrote: Jason Thanks for the quick response. Trying debug mode I get FindFileInPath() : trying XXX\OpenSceneGraph\bin\osgPlugins-2.7.3\osgdb_jpegd.dll ... FindFileInPath() : USING XXX\OpenSceneGraph\bin\osgPlugins-2.7.3\osgdb_jpegd.dll DynamicLibrary::failed loading osgPlugins-2.7.3/osgdb_jpegd.dll Trying osgviewer --image skymap.jpg worked fine. I'm using osgCppCLIDemo/osgNETDemo.exe as an example to get started using C# and OSG I got this file from http://www.openscenegraph.org/projects/osg/wiki/Community/LanguageWrappers The scenefile I'm trying is skydome.osg from the example osg dataset and it works fine with osgviewer. So obviously the error issue relates to the C#/OSG configuration. Are you using the example osgCppCLIDemo? Cheers Maya *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Jason Beverage *Sent:* Thursday, October 30, 2008 6:34 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG and C# Users Hi Maya, It's hard to tell what could be going on without some more information about your setup. One thing you should try is setting the OSG_NOTIFY_LEVEL environment variable to DEBUG to help get a clue of what is going on. If you build your app as a Console application you will see all of OSG's debug messages and might point you to the problem. I'm grasping at straws here and just guessing, but if you are using an OpenFileDialog to load your models, make sure that that RestoreDirectory property is set to true. If not, it will change your applications working directory and OpenSceneGraph won't know where to find your plugins. Jason On Thu, Oct 30, 2008 at 6:02 PM, usergroups_email [EMAIL PROTECTED] wrote: Jason The osgdb_jpg.dll and osgdb_gif.dll plugins are in the same location as the osgdb_gif and osgdb_rgb.dll, so I would expect them to work. Any other hints? thanks maya *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Jason Beverage *Sent:* Thursday, October 30, 2008 3:46 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG and C# Users Hi Maya, As long as you have the appropriate image plugin within your path (osgdb_jpg.dll, osgdb_gif.dll, etc) things should work fine. Make sure you are building these plugins and they are accessible. In theory, if the model works from osgviewer, it should work in your c# application. Good luck! Jason On Thu, Oct 30, 2008 at 3:18 PM, maya leonard [EMAIL PROTECTED] wrote: Hello hesicong, OSG and C# Users I'm trying to get textures to load within osg C# application and nothing happens. Certain textures such as rgb formats work, but jpg and gif do not work. You can replicate this problem with the osgnetdemo sample by hesicong and the sample skydome.osg sample. Do you know how to load jpg and gif textures within C# and osg? sincerely maya -- Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Nowhttp://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cull-Traversal Performance
Hi Folks, First off, let me say that it's good to be back on the list - it has been awhile ;-) I'm trying to tune a scene-graph representing a relatively-large model. I'm seeing what I think are abnormally long cull-traversal times. The SG looks as follows: (State is constant across the entire scene) [Group] x 1 | [Switch] x 1 | [MatrixTransform] x 100 | [Geode] x 1 | [Geometry] x 100 There are approx 10K Geometry Drawables in the overall scene. The cull traversal for this scene graph is approx 10ms on a 2.5GHz Core2Duo processor. If I change the SG to the following: [Group] x 1 | [Switch] x 1 | [MatrixTransform] x 100 | [Switch] x 1 | +-+ | | [Geode] x 1 [MatrixTransform] x 100 | | [Geometry] x 100 [Geode] x 1 | [Geometry] x 1 and I turn on the new branch, the cull traversal jumps to 80ms. If I eliminate the single Geometry node below the new geode (so that the new branch is still there, but doesn't draw anything, cull-traversal falls to 40ms. Can anyone help explain what is going on here? These cull-traversal times seem long relative to the complexity of the scene and the speed of the processor - I'm trying to hit a 60Hz frame-rate, and even 10ms for the cull is just not going to cut it. For better or worse, there isn't a good way to simplify the complexity of the scene. cheers, sean ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] crash at delete mViewer
hi all, There is a class cOSG in example osgviewerMFC,i find that a sentence Sleep(1000); is added to the function cOSG::~cOSG().Maybe it's used to avoid crash at delete mViewer.But Sometimes I still get a crash at delete mViewer.Is it because of the thread is not stoped? How can i slove the problem? Thanks for advance. forest ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and Chromium/VR Juggler
Hi, I simply want to run OSG on a PC Cluster of 9 Nodes in a Master/ 0..N Slaves configuration. If people who have used either Chromium http://chromium.sourceforge.net/ or VR Juggler http://www.vrjuggler.org/ please report their experiences with these. Kind Regards Paul IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] QT4 ViewerQOSG and Q_OBJECT
Could you post complete modified file as this will explain the changes without any chance of ambiguity. Sorry my mistake, Note if you want to use QT_OBJECT the ViewerQOSG class declaration should be in it's own header file. QOSGWidget.h Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org