[osg-users] Render to texture and Shadows
Hi All, I am using Light Space Perspective Shadow Maps for shadowing. I would like to render the shadowed scene to a texture, so I have another camera on top of the shadowed scene. It looks like following: root | RTTCamera | ShadowedScene I also render a small sized screen aligned quad which visualizes the texture to which RTTCamera is rendering. When there is no RTT, shadows work as expected. However, when I am rendering onto the texture, there are no shadows. I can see the scene on the screen aligned quad but it simply has no shadows. When I debugged the application I found out that StandardShadowMap::ViewData::selectLight does not find the light. Following line should normally give a list of matrices/attrib pairs rs-getPositionalStateContainer()-getAttrMatrixList(); however, it returns an empty list. I am not familiar with the implementation of Shadows in OSG so I got stuck here. Does anybody have an idea? Thanks, Tugkan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] sRGB frame buffer
I found out that one can simply call stateset-setMode( GL_FRAMEBUFFER_SRGB_EXT , osg::StateAttribute::ON); to enable sRGB mode. An explicit OSG support is not necessary. I didn't try something like this with sRGB texture formats yet. tugkan Tugkan Calapoglu wrote: Hi, I couldn't find sRGB related GLX tokens in the source code so it looks like sRGB color space is not supported by OSG at the moment. Am I right or did I miss something? I don't have any experience with sRGB framebuffers (apart from hearing about them at SIGGRAPH one year), but I agree that it looks like OSG doesn't support them yet. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org . -- Tugkan Calapoglu - VIRES Simulationstechnologie GmbH Oberaustrasse 34 83026 Rosenheim Germany phone+49.8031.463641 fax +49.8031.463645 emailtug...@vires.com internet www.vires.com - Sitz der Gesellschaft: Rosenheim Handelsregister Traunstein HRB 10410 Geschaeftsfuehrer: Marius Dupuis Wunibald Karl - ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X Snow Leopard
Hi Paul, Paul Martz schrieb: Thanks, not sure about a 2.8.3, but it's under consideration. Good to know you're interested. I understand you can build 2.8.2 against the 10.5 SDK and still run on Snow Leopard. My understanding is the changes to OSG for Snow Leopard will allow someone to build OSG against the 10.6 SDK, is that right? Snow Leopard defaults to gcc 4.2 which is pickier than gcc 4.0 (the default for 10.5) The patches to Atomic + ReaderWriterQt fixes these issues with gcc 4.2. If you switch your xcode-projects to gcc 4.0 the current 2.8.x source builds fine for 10.4 on Snow Leopard. These patches are needed regardless what sdk you are targetting if you are using gcc 4.2. But they even work for 10.5 / gcc 4.0 :) I can add an automatic build/compile test for the 2.8.x-branch here on my local machine, currently I am only monitoring osg-trunk and provide fixes back to Robert if necessary. But I didn't move to 10.6 with this machine. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: I have downloaded the newest version through SVN, and also compiled the code successfully. When I turn on the oceanExample's testCollision, I found that the boat.3ds model is just white, the same situation I met before. Is this what the example just want to show us? In the example, you did not add any shader to the model. Does this mean that: a default shader was added to the model? But why the model looks just white? Will you please give us a example about how to add a model to the oceanScene to keep what they are? Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19021#19021 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19090#19090 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture and Shadows
Hi Tugkan, Somebody recently, also mentioned that nested cams not work with LiSPSM. Frankly, I have no time to investigate this. I would recommend using RTT slave views instead of nested RTT cam. I think this will have more chance to work as intended. I apologize for trouble. Wojtek Lewandowski - Original Message - From: Tugkan Calapoglu tug...@vires.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 03, 2009 9:10 AM Subject: [osg-users] Render to texture and Shadows Hi All, I am using Light Space Perspective Shadow Maps for shadowing. I would like to render the shadowed scene to a texture, so I have another camera on top of the shadowed scene. It looks like following: root | RTTCamera | ShadowedScene I also render a small sized screen aligned quad which visualizes the texture to which RTTCamera is rendering. When there is no RTT, shadows work as expected. However, when I am rendering onto the texture, there are no shadows. I can see the scene on the screen aligned quad but it simply has no shadows. When I debugged the application I found out that StandardShadowMap::ViewData::selectLight does not find the light. Following line should normally give a list of matrices/attrib pairs rs-getPositionalStateContainer()-getAttrMatrixList(); however, it returns an empty list. I am not familiar with the implementation of Shadows in OSG so I got stuck here. Does anybody have an idea? Thanks, Tugkan ___ 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] Mac OS X Snow Leopard
Hi Paul, I tried to compile osg/trunk as a static library on Snow Leopard this week and it failed somewhere with a message about the quicktime library if I remember correctly. I could build trunk again (shared or static) and send the results to the cdash server if you are interested. It is a fresh snow leopard install. -- Nico On Tue, Nov 3, 2009 at 9:29 AM, Stephan Huber ratzf...@digitalmind.dewrote: Hi Paul, Paul Martz schrieb: Thanks, not sure about a 2.8.3, but it's under consideration. Good to know you're interested. I understand you can build 2.8.2 against the 10.5 SDK and still run on Snow Leopard. My understanding is the changes to OSG for Snow Leopard will allow someone to build OSG against the 10.6 SDK, is that right? Snow Leopard defaults to gcc 4.2 which is pickier than gcc 4.0 (the default for 10.5) The patches to Atomic + ReaderWriterQt fixes these issues with gcc 4.2. If you switch your xcode-projects to gcc 4.0 the current 2.8.x source builds fine for 10.4 on Snow Leopard. These patches are needed regardless what sdk you are targetting if you are using gcc 4.2. But they even work for 10.5 / gcc 4.0 :) I can add an automatic build/compile test for the 2.8.x-branch here on my local machine, currently I am only monitoring osg-trunk and provide fixes back to Robert if necessary. But I didn't move to 10.6 with this machine. cheers, Stephan ___ 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] Change to Optimizer OptimizationOptions
Hi, Paul Martz schrieb: Hi Robert -- The code submission by Wojciech and I for MSFBO has opened a small can of worms on declaring bits and bitmasks. I hope you can weigh in and put an end to the debate. Has anybody had a look at Qt's QFlags? http://doc.trolltech.com/4.5/qflags.html They provide a type-safe way of dealing with bit-mask-style enums. The implementation is mostly a template class with overloaded operators. Once you have the idea, it should be rather trivial to reimplement this from scratch and tailor it OSG's requirements. Cheers, Peter Originally, my submission followed the Optimizer's OptimizationOptions pattern of declaring bit values in an enum, but declaring the bitmask variable as an unsigned int. In Wojciech's modified submission, he changed the bitmask variable to a signed int, with the reasoning that enum values are also signed ints, and this eliminates the need for a typecast to get rid of compiler warnings. This caused me to weigh in with the workaround of declaring the bit values as static const unsigned int, and keeping the bitmask unsigned. But this goes against the OSG precedent set with the Optimizer. The ensuing discussion has covered the merits, or lack thereof (depending on the poster) of declaring bitmasks as signed or unsigned. What this really boils down to is: If we decide that the MSFBO bit/bitmask declarations should be different from the Optimizer pattern for bits and bitmasks, then we should change the Optimizer to follow the new standard, and also do the same for any other classes that followed the Optimizer's current pattern. If you could post with do it this way or do it that way, I (for one) could get back to work and stop prodding everyone with my code style opinions. :-) Thanks, -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG cant find libOpenThreads.11.dylib
Hi, Having trouble with osg not finding libOpenThreads.11.dylib. The library is present in /opt/local/lib however when I try to use osgviewer to run a example I get this: Code: raptorjesus-imac52:osgexport-2.42b raptorjesus$ osgviewer monkeyears.osg dyld: Library not loaded: libOpenThreads.11.dylib Referenced from: /opt/local/bin/osgviewer Reason: image not found Trace/BPT trap Some searching turned up this ticket http://trac.macports.org/ticket/17577 with a duplicate linked to it, but neither have solutions. If it helps to know, I'm running OS X 10.5.8 (intel) and installed OSG via macports. Thank you! Cheers -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19086#19086 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG cant find libOpenThreads.11.dylib
Hi Keith, I think /opt/local/lib is not in the default library path search. You can add it or you can do: $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib so osg apps can find the libraríes. Greetz, Rafa. On Tue, Nov 3, 2009 at 8:58 AM, Keith Ewan microsoftwillalwayss...@gmail.com wrote: Hi, Having trouble with osg not finding libOpenThreads.11.dylib. The library is present in /opt/local/lib however when I try to use osgviewer to run a example I get this: Code: raptorjesus-imac52:osgexport-2.42b raptorjesus$ osgviewer monkeyears.osg dyld: Library not loaded: libOpenThreads.11.dylib Referenced from: /opt/local/bin/osgviewer Reason: image not found Trace/BPT trap Some searching turned up this ticket http://trac.macports.org/ticket/17577 with a duplicate linked to it, but neither have solutions. If it helps to know, I'm running OS X 10.5.8 (intel) and installed OSG via macports. Thank you! Cheers -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19086#19086 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi MT, If you open boat.3ds in osgviewer you will notice that the model itself is white. It doesn't have any textures on it and it's there purely as a test case for the collision. But yes the default shader has been added to it. Will you please give us a example about how to add a model to the oceanScene to keep what they are? The terrain is an external model that has a custom shader applied to it, you can look at that. Alternatively look at the default shader source. K. 2009/11/3 Tian Ma tianxiao...@foxmail.com: Hi Kim: I have downloaded the newest version through SVN, and also compiled the code successfully. When I turn on the oceanExample's testCollision, I found that the boat.3ds model is just white, the same situation I met before. Is this what the example just want to show us? In the example, you did not add any shader to the model. Does this mean that: a default shader was added to the model? But why the model looks just white? Will you please give us a example about how to add a model to the oceanScene to keep what they are? Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19021#19021 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___
Re: [osg-users] Transparency issue
Hi Vincent, On 2/11/09 5:49 PM, Vincent Bourdier wrote: I have a transparency issue on a very simple sceneGraph and I do not understand how that problem can be there. I set all the mode in the stateSet to make the group transparent... but no way ! The node file is in attached file. Any suggestion would be very appreciated :-) Could it be that your vertex colors are overriding the material setting? /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X Snow Leopard
If you switch your xcode-projects to gcc 4.0 the current 2.8.x source builds fine for 10.4 on Snow Leopard. Nope, switching to gcc 4.0 does not make any difference for me. And BTW there is no 10.4 SDK on snow leopard. /stefan stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19097#19097 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X Snow Leopard
Hi stefan Nope, switching to gcc 4.0 does not make any difference for me. And BTW there is no 10.4 SDK on snow leopard. /stefan It is possible to have a 10.4 SDK in snowleopard if you have activated compatibility when you did the migration from Leopard to SnowLeopard. However the only cofiguration working for me is SDK 10.6 and architecture i386. Greets. stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19097#19097 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Mac OS X Snow Leopard
Hi, I submitted an experimental test. It shows on the cdash site, but it doesn't show the errors. I took the current trunk, applied the Atomic patch, that was previously sent to this list and ran the test with no arguments to cmake. It fails in ReaderWriterQT.cpp, which is probably easy to fix. I'll have a look later today. Bests, Nico On Tue, Nov 3, 2009 at 1:17 PM, Jordi Torres jtorresfa...@gmail.com wrote: Hi stefan Nope, switching to gcc 4.0 does not make any difference for me. And BTW there is no 10.4 SDK on snow leopard. /stefan It is possible to have a 10.4 SDK in snowleopard if you have activated compatibility when you did the migration from Leopard to SnowLeopard. However the only cofiguration working for me is SDK 10.6 and architecture i386. Greets. stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19097#19097 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ 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] VPB and OSG Version
Hi Kim, Chris, .osg files are forward compatible and in limited cases backward compatible (as long as the older OSG has all the necessary feature support). And that's the catch really, some VPB versions introduced usage of some new features that were added to OSG at that moment, for example osgTerrain::Terrain techniques, and so you need to avoid using those features in your VPB-generated terrain database if you want it to be backwards-compatible. Just using the .osg format is often not enough. .ive files ar coded with the file version they are built by, and will not be loaded by any other version of OSG. Shouldn't that be any *older* version? Because .ive files created with OSG version X should be readable with OSG version Y if Y = X. It's just the opposite which isn't true. You can convert between IVE and OSG with osgconv. Which gives you a way out, with the caveat noted above: 1. generate with VPB/OSG version X, into .osg files 2. convert to .ive with the osgconv compiled from OSG version Y As long as you keep your versions straight, and that you avoid using features specific to newer versions of OSG, it should go fine. But it's much less trouble using a recent version of OSG everywhere, of course. Hope that helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting up VPBMaster
Chris, I want to thank you again for all your help on this issue. I've got my fingers crossed for this to work, but we've already come up with some ideas of how to cut this down for the next run. My manager knows I've been in contact with you on this, and she was wondering if you part of the development team for OpenSceneGraph, or if you're a knowledgeable user or what? I told her I wasn't sure, but you seemed to know more about this stuff that I do. :) I wanted to ask you something else on OSGDem if that's ok. I posted another thread about what to do if OSGDem crashes during a run, but I haven't gotten any responses to it. I was wondering if there's any log file or any way OSGDem can pick up where it left off (or somewhere close to it) after a crash, or does it have to start from the beginning again? Do you happen to know about this? Thanks again! Date: Mon, 2 Nov 2009 15:17:42 -0700 From: xe...@alphapixel.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Setting up VPBMaster Jacob Armstrong wrote: Believe it or not, this is just a 2D Map, view from above, and we're not utilizing any 3D capabilities what-so-ever. I agree that it seems like overkill to use such a powertool to generate something fairly basic, but I can't speak to the process that got us where we were. Decisions have been made based on factors that I'm not aware of, and past experiences that I was not present for. I'm only the next guy in line who's picking up a process already in progress. Now I'm just looking for verification or denial that the process will work as is, and if possible, some alternative solutions that already exist, are quick, and are cheap. My back is against the wall for a deadline, and it's too late to propose an alternative, but maybe not a slight alteration the process. I appreciate all your input, and I hope to find a solution in all this! Thanks! Well, you're totally off the map so to speak here, so we have no idea if you'll succeed. When you rally hit the wall, drop me a note and I'll code you something that actually does what you want and works. ;) Good luck. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ Find the right PC with Windows 7 and Windows Live. http://www.microsoft.com/Windows/pc-scout/laptop-set-criteria.aspx?cbid=wlfilt=200,2400,10,19,1,3,1,7,50,650,2,12,0,1000cat=1,2,3,4,5,6brands=5,6,7,8,9,10,11,12,13,14,15,16addf=4,5,9ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:112009___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cameras hierarchy
Hi all, I'm having a difficulty understanding whats goes wrong with my scene setting. I tried merge between the osghud example and the osgdistortion example. The result I expected was to have object in the background which responds to the mouse movement, HUD in front of it, and the entire image distorted. So initially I had a graph build like that Root Distortion Group HUDed scene Which equals Root DistortedTextureDisplayCamera RTT Camera GridGeometry PostRenderCamera Scene Hud geometry This didn't work. I couldn't see the HUD. Later I changed it to Root DistortedTextureDisplayCamera RTT Cameta order 1 RTT Cameta order 1 GridGeometry Hud geometry Scene This configuration did get the right result. Later on I tried, just for the test to render a scene Root DistortedTextureDisplayCamera RTT Camera GridGeometry Camera Scene This is exactly the osgdistortion example with the adding of a camera above the scene. This camera has all the default settings, which means it does nothing, but I couldn't see anything. Can you please explain why the first and the last graphs didn't give the expected results? Isn't it possible to add cameras under RTT camera? I had similar problems with depth partitioning and shadows. Does it mean that when using RTT, these solutions have to be rearranged completely in the aspect of the camera hierarchy? Thanks, Guy. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I organize the scene graph to handle 2million points and lines?
HI We work with 100's Millions of Points in our OSG base applications, along with large amount of imagery (Giga terra bytes), elevation and feature data in one scene We do have to manage them through various LOD, Memory and paging techniques we have etc Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Angus Lau Sent: Monday, November 02, 2009 6:03 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How should I organize the scene graph to handle 2million points and lines? Hi, Thank you for your suggestions! I think the scribe effect is probably what I want for selection. You mentioned something about unreferencing data on the CPU side once it is uploaded. I am quite interested in this. Could you please give me more details? Honestly speaking, the 2 million points and lines are probably not the largest dataset I will encounter. During the last few days, I discovered that my viewer probably has an acceptable performance, but the large amount of memory that it uses is probably the main issue I need to deal with. If there are some ways that can reduce the size of the scene graph or cache inactive part of the scene graph on disk, I would like to give them a try. Thank you! Cheers, Angus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19076#19076 ___ 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] [vpb] Can I build a round earth with DEM?
Yes you can by using the -d option followed by the terrain file in VPB. VPB will stitch in the terrain (if it's geospecific) into the ellipsoid... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lv Qing Sent: Wednesday, October 28, 2009 9:40 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] Can I build a round earth with DEM? Hi, ... I have created an earth model with VPB ( an ellipsoid with earth texture) by the instruction post in http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem. (osgdem --bluemarble-west -t land_shallow_topo_west.tif --bluemarble-east -t land_shallow_topo_east.tif -l 8 -o earth.ive -a earth.osga) Can I just add some small area of DEM in the suface of this round earth? Thank you! Cheers, Lv -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18801#18801 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] export DAE file, how to change names?
lucas Grijander wrote: Hi all! I am using the collada plugin to export my geometries in .dae format. I would like to know if there is an option of specifying the name of Ids, such as shapes, primitives, materials, etc... It's important to better differenciate in another application I have between different objects. thanks! Jaime. Hi Lucas/Jaime, The DAE exporter gets most of its names from the names of nodes in the OSG scene graph hierarchy you are exporting. However, you can change anything in the DAE export by the following procedure:- Get hold of the DAE exporter osg::ref_ptrosgDB::ReaderWriter pReaderWriter = osgDB::Registry::instance()-getReaderWriterForExtension("dae"); if (!pReaderWriter.valid()) throw _("Unable to load dae writer plugin"); wxString FileName = FileDialog.GetPath(); Set up the file name in URI format - this is very important. FileName.Prepend(wxT("file:///")); Set up some objects to receive information about the DOM objects created pDae = new DAE; // Use a new object here because VC8.1 debugger barfs if it tries to show an on stack one in the autos or watch window !! if (NULL == pDae) throw _("Failed to allocate DAE object"); osg::ref_ptrosgDB::ReaderWriter::Options pOptions = new osgDB::ReaderWriter::Options; std::string DocURI; pOptions-setPluginData("DAE", (void*)pDae); pOptions-setPluginData("DAE-DocumentURI", (void*)DocURI); Write the model to a file. This causes the DOM to be built. (On of these data I might get round to putting a option in the exporter to just create the DOM and not write the file.) if (pReaderWriter-writeNode(*pGroup, (const char *)FileName.mb_str(wxConvUTF8), pOptions.get()).status() != osgDB::ReaderWriter::WriteResult::FILE_SAVED) throw _("Failed to save model"); Retrieve the DOM domCOLLADA *pDomCollada = pDae-getDom(DocURI.c_str()); if (NULL == pDomCollada) throw _("Cannot get DomCollada"); You can now play around with any of the elements in the DAE hierarchy. For exmaple:- domAssetRef pAsset = pDomCollada-getAsset(); if (NULL == (domAsset*)pAsset) throw _("Cannot get domAsset"); domAsset::domUp_axisRef pAxis = pAsset-getUp_axis(); if (NULL == (domAsset::domUp_axis*)pAxis) { // Create a new up axis element pAxis = (domAsset::domUp_axis*)pAsset-createAndPlace(COLLADA_ELEMENT_UP_AXIS); if (NULL == (domAsset::domUp_axis*)pAxis) throw _("Cannot create up_axis element"); } pAxis-setValue(UPAXISTYPE_Y_UP); Write the file out again to save any changes you have just made. if (DAE_OK != pDae-save((daeUInt)0)) throw _("Failed to save modified dae file"); If you want to ask questions about the DOM DAE API then you need to post them on the Collada forums https://collada.org/public_forum/ Cheers, Roger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] sRGB frame buffer
Tugkan Calapoglu wrote: I found out that one can simply call stateset-setMode( GL_FRAMEBUFFER_SRGB_EXT , osg::StateAttribute::ON); to enable sRGB mode. An explicit OSG support is not necessary. I didn't try something like this with sRGB texture formats yet. Glad to hear you got it working. It turns out I was wrong anyway. The SRGB tokens are in the osg/GL2Extensions header (including the new texture formats from EXT_texture_SRGB). Not sure how I missed those before... I still can't find the tokens for GLX/WGL, so I'm not sure how that affects what you're trying to do (the spec is vague to me on what those tokens actually do). It seems that the only changes to enable sRGB functionality are new tokens anyway (no new functions were defined), so it shouldn't be too much of a stretch to get it going. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG cant find libOpenThreads.11.dylib
Thanks a lot! That got it. :D -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19110#19110 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change to Optimizer OptimizationOptions
Peter Hrenka wrote: Has anybody had a look at Qt's QFlags? http://doc.trolltech.com/4.5/qflags.html They provide a type-safe way of dealing with bit-mask-style enums. The implementation is mostly a template class with overloaded operators. Once you have the idea, it should be rather trivial to reimplement this from scratch and tailor it OSG's requirements. I'm not familiar with it, but I agree that perhaps a flags class/template would be a smart way to clean up the situation. If it would solve the issues. I know I'm always happier using a provided set/test API than manually masking stuff. As long as it doesn't bloat the data size beyond the simple storage of the flag word. as long as we don't make any of it virtual, I think it would be ok. Though I don't know how RTTI adds to the class per-instance weight of a real class (as opposed to a built-in type like unsigned long int). Any C++ guru care to comment on that? -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB and OSG Version
Jean-Sébastien Guay wrote: .ive files ar coded with the file version they are built by, and will not be loaded by any other version of OSG. Shouldn't that be any *older* version? Because .ive files created with OSG version X should be readable with OSG version Y if Y = X. It's just the opposite which isn't true. I don't remember. Are IVEs forward-compatible or not? I had some reason to think they were not. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting up VPBMaster
Jacob Armstrong wrote: I want to thank you again for all your help on this issue. I've got my fingers crossed for this to work, but we've already come up with some ideas of how to cut this down for the next run. My manager knows I've been in contact with you on this, and she was wondering if you part of the development team for OpenSceneGraph, or if you're a knowledgeable user or what? I told her I wasn't sure, but you seemed to know more about this stuff that I do. :) Well, I don't know that the development team for OpenSceneGraph is a clearly defined set. By volume, Robert is the author of the vast majority of the OSG source code, but there's a long list of other contributors as well. I'm one of the those folks. I've worked on terrain-related aspects of OSG since, err, I can't remember how long. Well before OSG 1.0. I'm also one of the few people brave enough to dive into and work on VPB's own code, though I don't know it inside and out. I've worked on 3D terrain software since about 1992. I wanted to ask you something else on OSGDem if that's ok. I posted another thread about what to do if OSGDem crashes during a run, but I haven't gotten any responses to it. I was wondering if there's any log file or any way OSGDem can pick up where it left off (or somewhere close to it) after a crash, or does it have to start from the beginning again? Do you happen to know about this? I don't know if there's any way to restart OSGDEM. I kinda doubt it, because it would have no idea what the current state would be, or what files might have been written improperly or incompletely during the crash. I would expect the full VPB might have a better chance of this, because it breaks the work up into discrete jobs and dispatches them, and keeps track of what gets done. it might be able to resume a partially completed job. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgPreRender question(s)
I am going through the osgprerender example to try to understand how it works, and I think I am starting to understand a bit more, but i have some questions. If I instantiate a viewer, as is done in osgprerender... osgViewer::Viewer viewer(arguments); I assume this has a default camera right? Before the viewer.run() call, I osg::Camera *camera = viewer.getCamera(); and see that the camera has POST_RENDER render order. in createPreRenderSubGraph, another camera with PRE_RENDER render order is added. Does this mean that the second camera renders the scene before the default camera? Then the second scene renders the scene a second time? W ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Opening a GL3 context on MS Windows
Hi, I found the following on the NVIDIA developers site and thought it might be what you are looking for. 1) How do I start using OpenGL 3 in my code base? In order to use OpenGL 3.0 and later versions, an application should opt in to use these versions. There is a new context creation call CreateContextAttribsARB (for WGL and GLX defined in the WGL/GLX_ARB_create_context extensions) that you should use in order to request a context that supports OpenGL 3.0, 3.1 or 3.2. For OpenGL 3.2, and later versions, you additionally will have to indicate what profile you want the 3.2 context to support. Either the Core or the Compatibility profile. Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19136#19136 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change to Optimizer OptimizationOptions
Hi Chris, Chris 'Xenon' Hanson schrieb: Peter Hrenka wrote: Has anybody had a look at Qt's QFlags? http://doc.trolltech.com/4.5/qflags.html They provide a type-safe way of dealing with bit-mask-style enums. The implementation is mostly a template class with overloaded operators. Once you have the idea, it should be rather trivial to reimplement this from scratch and tailor it OSG's requirements. I'm not familiar with it, but I agree that perhaps a flags class/template would be a smart way to clean up the situation. If it would solve the issues. I know I'm always happier using a provided set/test API than manually masking stuff. As long as it doesn't bloat the data size beyond the simple storage of the flag word. as long as we don't make any of it virtual, I think it would be ok. Though I don't know how RTTI adds to the class per-instance weight of a real class (as opposed to a built-in type like unsigned long int). Any C++ guru care to comment on that? Nothing needs to be virtual here. It's just a template class with overloaded operators which means everything is effectively inlined. We could also use an unsigned int as internal storage type (Qt seems to use a signed int). Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change to Optimizer OptimizationOptions
Peter Hrenka wrote: Nothing needs to be virtual here. It's just a template class with overloaded operators which means everything is effectively inlined. We could also use an unsigned int as internal storage type (Qt seems to use a signed int). But doesn't RTTI embed a hidden pointer (similr to the vftbl) into every class as well, that points to the common per-class ID/metadata? I guess quibbling about an extra pointer is very old-skool 80s coder of me. You can have my VIC-20 when I'm done porting OpenGL ES 1.0 to it! ;) -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change to Optimizer OptimizationOptions
IMHO This is the best option so far ;-). I like it. Wojtek - Original Message - From: Peter Hrenka p.hre...@science-computing.de To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Tuesday, November 03, 2009 6:31 PM Subject: Re: [osg-users] Change to Optimizer OptimizationOptions Hi Chris, Chris 'Xenon' Hanson schrieb: Peter Hrenka wrote: Has anybody had a look at Qt's QFlags? http://doc.trolltech.com/4.5/qflags.html They provide a type-safe way of dealing with bit-mask-style enums. The implementation is mostly a template class with overloaded operators. Once you have the idea, it should be rather trivial to reimplement this from scratch and tailor it OSG's requirements. I'm not familiar with it, but I agree that perhaps a flags class/template would be a smart way to clean up the situation. If it would solve the issues. I know I'm always happier using a provided set/test API than manually masking stuff. As long as it doesn't bloat the data size beyond the simple storage of the flag word. as long as we don't make any of it virtual, I think it would be ok. Though I don't know how RTTI adds to the class per-instance weight of a real class (as opposed to a built-in type like unsigned long int). Any C++ guru care to comment on that? Nothing needs to be virtual here. It's just a template class with overloaded operators which means everything is effectively inlined. We could also use an unsigned int as internal storage type (Qt seems to use a signed int). Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ 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] VPB and OSG Version
Chris, J-S, Cheers chaps, far more detail that I was expecting! K. 2009/11/3 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com: Hi Kim, Chris, .osg files are forward compatible and in limited cases backward compatible (as long as the older OSG has all the necessary feature support). And that's the catch really, some VPB versions introduced usage of some new features that were added to OSG at that moment, for example osgTerrain::Terrain techniques, and so you need to avoid using those features in your VPB-generated terrain database if you want it to be backwards-compatible. Just using the .osg format is often not enough. .ive files ar coded with the file version they are built by, and will not be loaded by any other version of OSG. Shouldn't that be any *older* version? Because .ive files created with OSG version X should be readable with OSG version Y if Y = X. It's just the opposite which isn't true. You can convert between IVE and OSG with osgconv. Which gives you a way out, with the caveat noted above: 1. generate with VPB/OSG version X, into .osg files 2. convert to .ive with the osgconv compiled from OSG version Y As long as you keep your versions straight, and that you avoid using features specific to newer versions of OSG, it should go fine. But it's much less trouble using a recent version of OSG everywhere, of course. Hope that helps, J-S -- __ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help loading bunny
No, they are just different resolutions of the model. Use the one without res. On Tue, Nov 3, 2009 at 4:54 PM, Brett Thomas Lee brettle...@hotmail.com wrote: Hi, Thank you very much for the quick reply. There are lots of ply files.Do I need all the files ??? Thank you! Cheers, Brett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19132#19132 ___ 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] Setting up VPBMaster
Well, that's not what I was hoping to hear, but it certainly answers my question, so thanks again for that! By the way, it turns out that we do utilize the 3D capabilities of this data in our software for a separate page that shows the Helicopter from a out-of-copter view, flying over the terrain/buildings. My focus is on the 2D part. Tomorrow I'm presenting a bunch of data/issues/alternatives to some In-House big wigs, so they will determine our next course of action. Thanks again for all your help, and hopefully we'll get this thing working at some point! Date: Tue, 3 Nov 2009 10:12:36 -0700 From: xe...@alphapixel.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Setting up VPBMaster Jacob Armstrong wrote: I want to thank you again for all your help on this issue. I've got my fingers crossed for this to work, but we've already come up with some ideas of how to cut this down for the next run. My manager knows I've been in contact with you on this, and she was wondering if you part of the development team for OpenSceneGraph, or if you're a knowledgeable user or what? I told her I wasn't sure, but you seemed to know more about this stuff that I do. :) Well, I don't know that the development team for OpenSceneGraph is a clearly defined set. By volume, Robert is the author of the vast majority of the OSG source code, but there's a long list of other contributors as well. I'm one of the those folks. I've worked on terrain-related aspects of OSG since, err, I can't remember how long. Well before OSG 1.0. I'm also one of the few people brave enough to dive into and work on VPB's own code, though I don't know it inside and out. I've worked on 3D terrain software since about 1992. I wanted to ask you something else on OSGDem if that's ok. I posted another thread about what to do if OSGDem crashes during a run, but I haven't gotten any responses to it. I was wondering if there's any log file or any way OSGDem can pick up where it left off (or somewhere close to it) after a crash, or does it have to start from the beginning again? Do you happen to know about this? I don't know if there's any way to restart OSGDEM. I kinda doubt it, because it would have no idea what the current state would be, or what files might have been written improperly or incompletely during the crash. I would expect the full VPB might have a better chance of this, because it breaks the work up into discrete jobs and dispatches them, and keeps track of what gets done. it might be able to resume a partially completed job. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurantsform=MFESRPpubl=WLHMTAGcrea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help loading bunny
osgviewer can view ply files without any problem, and you can convert it with osgconv. ftp://graphics.stanford.edu/pub/3Dscanrep/bunny.tar.gz Cheers, -- A. On Tue, Nov 3, 2009 at 3:55 PM, Brett Thomas Lee brettle...@hotmail.com wrote: Hi, I want to load bunny model into osg. Does someone have .osg or osg compatible files for the bunny please. Thank you! Cheers, Brett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19128#19128 ___ 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] How should I organize the scene graph to handle 2 million points and lines?
Hi, Thank you for both of your help. It seems that PagedLOD is what I need to use to reduce CPU memory usage. I have tried to use PagedLOD briefly before, but I am not clear how I can make PagedLOD unload the unused child nodes once those child nodes are loaded. It seems that my PagedLOD nodes do not remove the nodes once it creates the child nodes. Could you please give me some explanation about the proper way of using it?? Thank you! Cheers, Angus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19123#19123 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture on Cylinder
Hey, I would like to build a simple panorma program with osg. I used a Cylinder and a similiar Code to sampleshape: osg::Geode* geode = new osg::Geode(); // --- // Set up a StateSet to texture the objects // --- osg::StateSet* stateset = new osg::StateSet(); osg::Image* image = osgDB::readImageFile( Images/lz.rgb ); if (image) { osg::Texture2D* texture = new osg::Texture2D; texture-setImage(image); stateset-setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); } geode-setStateSet( stateset ); float radius = 50.0f; float height = 20.0f; osg::TessellationHints* hints = new osg::TessellationHints; hints-setDetailRatio(0.5f); geode-addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(6.0f,0.0f,0.0f),radius,height),hints)); When I zoom into the cylinder, everything is dark and I cant see my texture. What can I do? Thanks, Nils ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?
Sorry to butt in the conversation here, but I also am working on an app with memory issues and we are considering Paged LOD. For a scene with millions of objects, won't there be a huge performance hit as geometry is loaded/unloaded? I imagine the sort of scene like a city scape where detail is controlled very nicely. That's good as occlusion means not too many things will be visible at any one time. However what in the case of points and lines as the user above has posted? Surely in this case loads will be visible at once, there will be no occlusion, and if you sweep around with the camera, literally thousands of objects will get paged in/out? Or am I being a complete noob and interpreting the way PagedLOD works? Cheers! Andrew On Tue, Nov 3, 2009 at 8:36 PM, Angus Lau angus@safe.com wrote: Hi, Thank you for both of your help. It seems that PagedLOD is what I need to use to reduce CPU memory usage. I have tried to use PagedLOD briefly before, but I am not clear how I can make PagedLOD unload the unused child nodes once those child nodes are loaded. It seems that my PagedLOD nodes do not remove the nodes once it creates the child nodes. Could you please give me some explanation about the proper way of using it?? Thank you! Cheers, Angus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19123#19123 ___ 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] VPB and OSG Version
Hi Chris, Shouldn't that be any *older* version? Because .ive files created with OSG version X should be readable with OSG version Y if Y = X. It's just the opposite which isn't true. I don't remember. Are IVEs forward-compatible or not? I had some reason to think they were not. Yes, I can load up an .ive generated with OSG 2.6's osgconv in OSG SVN's osgviewer. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting up VPBMaster
Regarding your questions on what osgdem does if it crashes... 1) No, it cannot pick back up from where it left off and continue on. You would have to start over and hope for better results. I always suffered from laughable experiences where it would be on the 10th day of a build and the power would go out. 2) However, all is not lost. In my experience you can still run your paged terrain in osgviewer fine. Of course in the highest LOD you won't have complete coverage. But what you had up to that point is still flyable. If you get in close enough to a part of the terrain that failed, it will throw errors/warnings but I have not seen it cause a crash. You just won't see the highest resolution you intended there. 3) I have not gotten a chance to use VPB yet, but it sounds good. David Riepl From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jacob Armstrong Sent: Tuesday, November 03, 2009 3:36 PM To: osg users Subject: Re: [osg-users] Setting up VPBMaster Well, that's not what I was hoping to hear, but it certainly answers my question, so thanks again for that! By the way, it turns out that we do utilize the 3D capabilities of this data in our software for a separate page that shows the Helicopter from a out-of-copter view, flying over the terrain/buildings. My focus is on the 2D part. Tomorrow I'm presenting a bunch of data/issues/alternatives to some In-House big wigs, so they will determine our next course of action. Thanks again for all your help, and hopefully we'll get this thing working at some point! Date: Tue, 3 Nov 2009 10:12:36 -0700 From: xe...@alphapixel.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Setting up VPBMaster Jacob Armstrong wrote: I want to thank you again for all your help on this issue. I've got my fingers crossed for this to work, but we've already come up with some ideas of how to cut this down for the next run. My manager knows I've been in contact with you on this, and she was wondering if you part of the development team for OpenSceneGraph, or if you're a knowledgeable user or what? I told her I wasn't sure, but you seemed to know more about this stuff that I do. :) Well, I don't know that the development team for OpenSceneGraph is a clearly defined set. By volume, Robert is the author of the vast majority of the OSG source code, but there's a long list of other contributors as well. I'm one of the those folks. I've worked on terrain-related aspects of OSG since, err, I can't remember how long. Well before OSG 1.0. I'm also one of the few people brave enough to dive into and work on VPB's own code, though I don't know it inside and out. I've worked on 3D terrain software since about 1992. I wanted to ask you something else on OSGDem if that's ok. I posted another thread about what to do if OSGDem crashes during a run, but I haven't gotten any responses to it. I was wondering if there's any log file or any way OSGDem can pick up where it left off (or somewhere close to it) after a crash, or does it have to start from the beginning again? Do you happen to know about this? I don't know if there's any way to restart OSGDEM. I kinda doubt it, because it would have no idea what the current state would be, or what files might have been written improperly or incompletely during the crash. I would expect the full VPB might have a better chance of this, because it breaks the work up into discrete jobs and dispatches them, and keeps track of what gets done. it might be able to resume a partially completed job. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Bing brings you maps, menus, and reviews organized in one place. Try it now.http://www.bing.com/search?q=restaurantsform=MFESRPpubl=WLHMTAGcrea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Tips for low-end GPUs?
Hi, I've been very happy developing using OSG but unfortunately, even “simple” graphics¹ tend to result in very low performance on Intel GPUs (which happen to be very common on wide-spread desktops and laptops); while I ACK that well, there are better GPUs available, it'd still be nice to be able to somehow run the app I've developed on other machines without having to upgrade them, so I've been wondering whether there are some guidelines to help getting things “easier” on the GPU. Random thoughts: - dimensions/resolutions (maybe some “native” screen/window size are better than others in order to limit resizing overhead)? - texture blending modes (how transparency is handled, etc.)? - level of detail (there is even osg::LOD for that)? - use a tree-like scene-graph (rather than a flat one) to ensure osg will do its job properly? - checking compositing on X's side (forgot to mention: running Linux machines)? acceleration type (EXA et al.)? I know there's also the “stats” display that might be of some help, and it indeed shows that most of the time is spent during “Draw”. I should mention I've tested with both OSG 2.4 and 2.8 on both desktops and laptops, and it looks like versions don't have much impact on performances, only GPUs do. (To give an idea, I'm at 100-150+ FPS with Nvidia, limited to either 60 or 75 via vblanc sync, and around 10-15 FPS with Intel.) Hardware is like Intel Core 2 Duo, 2 GB RAM. The application isn't eating more than a few MB so RAM clearly isn't the bottleneck. A single CPU out of 2 seems to be used, around 50%, so that probably isn't the bottleneck either. So, if you have any rules of thumb to share about how to get a better framerate on low-end GPUs, I'll be very pleased to read them. :) Cheers, -- Cyril Brulebois Details: ¹: That is some dozens/hundreds of geometrical forms (boxes, spheres with uniform textures), a few of them being transparent somehow, only colours/sphere radius/positions of some spheres change; using a single camera; and with some texts as overlay, HUD-like. signature.asc Description: Digital signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: Thank you for the useful informations! I could understand the default shader code a little now. When I apply the default shader to the model, it looks a little bit too shinning and glaring Can I weaken the glaring thing? Regards, MT Kim Bale wrote: Hi MT, If you open boat.3ds in osgviewer you will notice that the model itself is white. It doesn't have any textures on it and it's there purely as a test case for the collision. But yes the default shader has been added to it. Will you please give us a example about how to add a model to the oceanScene to keep what they are? The terrain is an external model that has a custom shader applied to it, you can look at that. Alternatively look at the default shader source. K. 2009/11/3 Tian Ma : Hi Kim: I have downloaded the newest version through SVN, and also compiled the code successfully. When I turn on the oceanExample's testCollision, I found that the boat.3ds model is just white, the same situation I met before. Is this what the example just want to show us? In the example, you did not add any shader to the model. Does this mean that: a default shader was added to the model? But why the model looks just white? Will you please give us a example about how to add a model to the oceanScene to keep what they are? Regards, MT Kim Bale wrote: Hi MT, For the reasons I just gave, you can't add objects to the scene and have the full compliment of effects without either using the default shader or using your own shader implementation. Reflections/refractions etc will continue to work since they act on the ocean surface and not the model. However, other such as glare, depth of field, light scattering, fogging etc will not as they act on the models themselves. However, it is pretty straight forward to duplicate a subset of fixed pipeline functionality within a shader and then add the relevant osgOcean shader effects to it, you can just copy functions from the default shader and mix them in with the result of your shader. K. 2009/11/2 Tian Ma : Hi Jan,Kim: Thank you a lot. Kim, does it means that: I can never keep the models looks like what they are before? And I have to program shaders for every loaded models, in order to have reflect or other effects? I want to know that: is there a simple way to make the models just look like what they are? Kim Bale wrote: Hi Jan, Tian, osgOcean uses shaders for pretty much every effect in the scene - fogging, depth of field, glare, lighting etc. If objects that are added to the scene are to look consistent with the ocean effects they will require a shader to be applied that takes into account these effects. This is particularly necessary if the fullscreen effects are used as they require the alpha component of the frame buffer to work. In order to address this issue, OceanScene will apply a default shader to objects added as children (default_scene.frag vert) which illustrates how to use the uniforms supplied by osgocean (prefixed osgOcean_* ) in conjunction with your own shader. Since I could not anticipate the many wierd and wonderful ways that shaders can be used it only offers a very basic implementation (1 texture unit, limited phong lighting etc) and should be seen as a shader to customise and build on yourself. You can override the default shader either by attaching a new program to the object you wish to use in the scene or by using this function in OceanScene: /** Override the default scene shader for custom shaders. * If custom shaders are required for individual nodes add them before adding to the OceanScene. * Dirties state. */ void setDefaultSceneShader( osg::Program* program ) { _defaultSceneShader = program; _isDirty = true; } Alternatively you can turn the default shader off completely with setter in OceanScene. Regards, Kim. 2009/11/2 Jan Ciger : Tian Ma wrote: Hi, When I load a model into the osgOcean scene, the model looks white all over, without any material. Anybody knows why? Yes, I have seen the same thing. I believe that the shaders applied by osgOcean are responsible and are not passing the the vertex colors along. I have yet to check the shader code, though. Regards, Jan ___ osg-users mailing list
Re: [osg-users] Mac OS X Snow Leopard
sth wrote: stefan nortd schrieb: Nope, switching to gcc 4.0 does not make any difference for me. And BTW there is no 10.4 SDK on snow leopard. It's an install option when installing xcode. Stephan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum Thanks for clarifying. /stefan stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19122#19122 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgPreRender question(s)
Hi, Wyatt Earp wrote: I am going through the osgprerender example to try to understand how it works, and I think I am starting to understand a bit more, but i have some questions. If I instantiate a viewer, as is done in osgprerender... osgViewer::Viewer viewer(arguments); I assume this has a default camera right? Before the viewer.run() call, I osg::Camera *camera = viewer.getCamera(); and see that the camera has POST_RENDER render order. in createPreRenderSubGraph, another camera with PRE_RENDER render order is added. Does this mean that the second camera renders the scene before the default camera? Then the second scene renders the scene a second time? the idea is that the prerender camera generates a texture that is used by the default (main) camera. The two cameras do not have to render the same scene. jp W ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?
Hi Angus, Angus Lau wrote: Hi, Thank you for both of your help. It seems that PagedLOD is what I need to use to reduce CPU memory usage. I have tried to use PagedLOD briefly before, but I am not clear how I can make PagedLOD unload the unused child nodes once those child nodes are loaded. It seems that my PagedLOD nodes do not remove the nodes once it creates the child nodes. Could you please give me some explanation about the proper way of using it?? I think proper would depend on you specific situation. All I can suggest further is to start reading the code of DataBasePager and see how expiry (search for it) of subgraphs work. jp Thank you! Cheers, Angus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19123#19123 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I organize the scene graph to handle 2 million points and lines?
Hi, Andrew Burnett-Thompson wrote: Sorry to butt in the conversation here, but I also am working on an app with memory issues and we are considering Paged LOD. For a scene with millions of objects, won't there be a huge performance hit as geometry is loaded/unloaded? possibly, but if you can't fit everything into memory at once you have to load/unload something. The PagedLOD is able to cope with terabyte sized terrain databases with millions of files at interactive rates, so it seems possible. I imagine the sort of scene like a city scape where detail is controlled very nicely. That's good as occlusion means not too many things will be visible at any one time. Yes, it also helps when e.g. 95%+ of an earth database is outside the field of view and can be culled :) However what in the case of points and lines as the user above has posted? Surely in this case loads will be visible at once, there will be no occlusion, and if you sweep around with the camera, literally thousands of objects will get paged in/out? You are right in expecting that different types of scenes might require different paging stategies. jp BTW I'm no PagedLOD expert, just a user. Or am I being a complete noob and interpreting the way PagedLOD works? Cheers! Andrew On Tue, Nov 3, 2009 at 8:36 PM, Angus Lau angus@safe.com mailto:angus@safe.com wrote: Hi, Thank you for both of your help. It seems that PagedLOD is what I need to use to reduce CPU memory usage. I have tried to use PagedLOD briefly before, but I am not clear how I can make PagedLOD unload the unused child nodes once those child nodes are loaded. It seems that my PagedLOD nodes do not remove the nodes once it creates the child nodes. Could you please give me some explanation about the proper way of using it?? Thank you! Cheers, Angus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19123#19123 ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Change to Optimizer OptimizationOptions
Hi Chris, Chris 'Xenon' Hanson schrieb: Peter Hrenka wrote: Nothing needs to be virtual here. It's just a template class with overloaded operators which means everything is effectively inlined. We could also use an unsigned int as internal storage type (Qt seems to use a signed int). But doesn't RTTI embed a hidden pointer (similr to the vftbl) into every class as well, that points to the common per-class ID/metadata? Boy, you're paranoid. Well, sometimes that's a good thing ;-) My understanding is that as long as you do not have virtual methods or derive (directly or indirectly) from a class that has virtual methods, there is no overhead in the memory layout of the class instances. But of course, I cannot guess what stange compilers will do... The example programm gives me the following output on 64-bit gcc on Linux: EnumSize: 4 EnumFlagsSize: 4 EnumFlagsArraySize: 40 PlainClass: 4 VirtualClass: 16 So the template class does not use more memory than the plain enum (on this platform). I guess quibbling about an extra pointer is very old-skool 80s coder of me. You can have my VIC-20 when I'm done porting OpenGL ES 1.0 to it! ;) No, your concerns are valid. As you can see the virtual method adds a factor of 4 in memory usage to the VirtualClass as compared to the PlainClass in the example. Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 #include iostream enum MyFlags { ONE = (10), TWO = (11), TREE = (12) }; templateclass enumType class EnumFlags { private: unsigned int _flags; }; class PlainClass { void foo() {} int _data; }; class VirtualClass { virtual void foo() {} int _data; }; int main(int argc, char* argv[]) { std::cout EnumSize: sizeof(MyFlags) std::endl; std::cout EnumFlagsSize: sizeof(EnumFlagsMyFlags) std::endl; EnumFlagsMyFlags enumArray[10]; std::cout EnumFlagsArraySize: sizeof(enumArray) std::endl; PlainClass p; VirtualClass v; std::cout PlainClass: sizeof(p) std::endl; std::cout VirtualClass: sizeof(v) std::endl; } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org