Re: [osg-users] OSG 2.1.10 windows refresh / performance
Hi Robert, updating itself. Under windows do you have to give the window manager a kick (i.e. send it an event) each time you close a window? This is something Windows developers will need to answer code a solution. We tried to refresh via SendMessage() but no joy. Will keep investigating. Did do the Cmake release compile but the /O2 option didn't get set in the vs project by Cmake (running VS2003 7). Had to add it manually. Now have comparable fps as OSG12. How are you building using CMake? Using CMakeSetup? Yep, CMakeSetup and the /O2 option is defined there but on in my resulting vcprojs. Maybe because I am using Visual C++ 2003 Standard and the optimizing compiler of Visual C++ Toolkit 2003. Still hesistant to go to VS 2005 because of all the reported bugs which MS promises to fix in VS 2008 but who knows. Gert -- Gert van Maren Head of Research Development K2Vi Virtual Reality Software Data Interface Technologies Ltd Phone: +64 21 2855581 Email: [EMAIL PROTECTED] Web: http://www.k2vi.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Need a non-const NodeVisitor -- again
Hi Paul, All I can say is welcome to C++ :-) Occasionally one has to cast away constness for the sake of convinience and to avoid duplicating many code blocks that otherwise would have to have both const and non const versions. When you cast away constness you are effectively taking the law in your hands and agreeing not to be naughty and break any rules - only bend them a little. Robert. On 9/15/07, Paul Martz [EMAIL PROTECTED] wrote: Hi Robert -- Here's an interesting aspect of OSG's design I've just recently stumbled across. osgDB::ReaderWriter::writeNode's first param is a const osg::Node. I can understand that writing a file is inherently a const operation as far as the scene graph is concerned. However, the obvious thing to do within writeNode is to traverse the node with a NodeVisitor, which requires calling Node::accept(), which requires the node to be non-const. So it seems like the nature of the design is to require writeNode to cast away const, but I wanted to check: Did you intend implementations of writeNode to do something other than use a NodeVisitor? Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com 303 859 9466 ___ 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] FBO question
Hello to all! I have a simple question. I want to render a two cameras (two different render surfaces) by exactly the same scene. But the two cameras are with different sizes. I.e. the two cameras has to show me the same picture, but not the same size. 1. I'm using CameraNode and frame buffer object in order to render the scene to the texture. 2***. I use the same texture for two cameras. 3. If I use RenderImplementationTarget as image then everything is OK. But if I use RenderImplementationTarget as texture then only one camera shows me the texture. Is there any way to use the same texture rendered to frame buffer object for the two cameras without copying it? Or maybe there is another way to do this purpose? Thank you a lot! *** This is how I am doing it: root / \ / \ CameraNodepolygon | | scene CameraNode has a mask (only main camera traverses the CameraNode) Both cameras render the polygon with the prerenderred (by frame buffer object) texture. === Igor Naigovzin Technion - CS and Biology Student Rafael - Software Developer email: [EMAIL PROTECTED] === ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Addition and Subtraction
Hello, there. I have searched tutorials and the reference guide, but I couldn't find anything on addition and subtraction of shapes, if there is such a thing. My problem is to render a shape missing its intersection with another one. In another words: a box with a hole. How do I do this? Thanks, Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Addition and Subtraction
Oh, that's a shame. Thanks anyway... But how would you do that? Is there any OpenGL primitive appropriate for this kind of rendering? Anywhere I can read about it? Thanks again, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Addition and Subtraction
On 9/16/07, Renan Mendes [EMAIL PROTECTED] wrote: Oh, that's a shame. Thanks anyway... But how would you do that? Is there any OpenGL primitive appropriate for this kind of rendering? Anywhere I can read about it? There is no OpenGL primitive to support what you are after. The closest you could get would be to use the stencil buffer and multi-pass. Look up constructive solid modeling on the web. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Addition and Subtraction
I'll check into that. Thanks, both of you. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Sharing statesets across files
OSG's OpenFlight loader supports this. A parent flt file contains texture and material palettes, which, when loaded into OSG, become arrays of StateSets with texture and material values. If the parent model then uses external reference records, and specifies that the parent palettes override child palettes, then all child models referenced by the parent model will share the same StateSets. Not sure about this, but I don't think the existing OpenFlight loader has support to page in external reference models. If not, then this might not be a solution for you. Hope that helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com http://www.skew-matrix.com/ 303 859 9466 _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Franklin Sent: Sunday, September 16, 2007 2:25 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Sharing statesets across files Is there a way of including a proxy stateset node or referencing a stateset stored in another file? I am trying to split up a single model into smaller pagable chunks. However, my original model makes significant use of shared statesets to maximise reuse of textures. When I break up my model each leaf node includes its own copy of the shared stateset. The total disk space used by the resulting fragments is a factor of ten larger than the original file. This in itself is not a problem but the resulting texture memory usage is also a factor of ten larger as a result of the lack of reuse. Thanks in advance, Matt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Sharing statesets across files
Hi Matt, SharedStateManager is what you want. I didn't have luck improving performance with it, but you can check it out. I believe the DatabasePager shares the states when data is paged in if the SharedStateManager exists. (I don't think it is initialized by default). You have to call: osgDB::Registry::instance()-getOrCreateSharedStateManager(); to create it, and then it should run from then on. Look inside the osgDB::DatabasePager code for sharedState. Also, osgDB::SharedStateManager.cpp I think it is pretty time consuming, though, so it may not work for you. I think you'll get a decrease in memory usage, but also a decrease in performance. Its easy enough to try though. (Just add the one line above before you load any models). _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Franklin Sent: Sunday, September 16, 2007 4:25 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Sharing statesets across files Is there a way of including a proxy stateset node or referencing a stateset stored in another file? I am trying to split up a single model into smaller pagable chunks. However, my original model makes significant use of shared statesets to maximise reuse of textures. When I break up my model each leaf node includes its own copy of the shared stateset. The total disk space used by the resulting fragments is a factor of ten larger than the original file. This in itself is not a problem but the resulting texture memory usage is also a factor of ten larger as a result of the lack of reuse. Thanks in advance, Matt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Sharing statesets across files
Looks like you may also want to call this: osgDB::Registry::instance()-getOrCreateSharedStateManager()-setShareMode(S HARE_TEXTURES | SHARE_STATESETS); since SHARE_TEXTURES is the default. _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Franklin Sent: Sunday, September 16, 2007 4:25 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Sharing statesets across files Is there a way of including a proxy stateset node or referencing a stateset stored in another file? I am trying to split up a single model into smaller pagable chunks. However, my original model makes significant use of shared statesets to maximise reuse of textures. When I break up my model each leaf node includes its own copy of the shared stateset. The total disk space used by the resulting fragments is a factor of ten larger than the original file. This in itself is not a problem but the resulting texture memory usage is also a factor of ten larger as a result of the lack of reuse. Thanks in advance, Matt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] depth buffer - real pixel z - depth
Hi, I render depth buffer to the image, but values I have there are between [0.0, 1.0]. How can I get real z-depth? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] probs running OSG on non-dev system?
The redistributable package should reside: %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\vcredist_x86 for x86 ... more details here: http://blogs.msdn.com/astebner/archive/2007/01/24/updated-vc-8-0-runtime-redistributable-packages-are-included-in-visual-studio-2005-sp1.aspx Cheers, Hartmut Mike Weiblen wrote: Pardon the sparse details, had a problem in wee hours this morn... Built a 2.1.10-ish OSG on one system w/ winxppro/vs8, tried to run the resulting osgviewer on a different system w/ winxphome but no VS8 installed. I got entirely unhelpful errormsgs/dialogs along the lines of that application cant be run or trying reinstalling the app. The VS8 runtime libs were present on the non-VS8 system Does this ring any bells? Could the VS8 or Cmake ocnfigs be triggering some OS or binary dependency? Thanks -- mew Mike Weiblen -- Zebra Imaging -- Austin Texas USA -- http://www.zebraimaging.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
[osg-users] Object Array
Hi, I need to declare arrays of various types of objects, like transformations and groups, can you help me? Carlos - ¡Sé un mejor ambientalista! Encuentra consejos para cuidar el lugar donde vivimos en: http://mx.yahoo.com/promos/mejorambientalista.html___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Convertion to osg::Image from IplImage (OpenCV) for use as texture
Hi, I'm trying to convert an IplImage (OpenCV) type to osg::Image type for use as a texture within OSG. My conversion routine attempts to utilize setImage(...) of image class. It crashes and I havent been able to track down the problem. Does anyone have experience with a conversion like this or advise about building osg images from other types? Thank you! -- John ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] probs running OSG on non-dev system?
Hi, ok that was a good idea. I double-checked, and yes my runtime libs were from the VS8 SP1. The weird thing is, now I can not get it to fail again?! It was late, maybe I dreamed it? :-S thanks for the suggestion -- mew On 9/14/07, Serge Lages [EMAIL PROTECTED] wrote: On 9/14/07, Mike Weiblen [EMAIL PROTECTED] wrote: Pardon the sparse details, had a problem in wee hours this morn... Built a 2.1.10-ish OSG on one system w/ winxppro/vs8, tried to run the resulting osgviewer on a different system w/ winxphome but no VS8 installed. I got entirely unhelpful errormsgs/dialogs along the lines of that application cant be run or trying reinstalling the app. The VS8 runtime libs were present on the non-VS8 system Does this ring any bells? Could the VS8 or Cmake ocnfigs be triggering some OS or binary dependency? Hi, Are you sure that the redistributable package you have installed in the non-VS8 system correspond to the VS you use to build the application ? If you use VS8 SP1 make sure you use the updated run time libs for it. -- Serge Lages http://www.magrathea-engine.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Mike Weiblen -- Austin Texas USA -- http://mew.cx/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org