[osg-users] [3rdparty] osgART Mac OS Lion
Hi, I'm trying to install osgART on Lion but I'm having problems with it, I'm already got OSG running on Lion thanks to someone on this forum and some other plug-ins: osgWorks, osgBullet. I think ARtoolkit is pretty old and drop support for newer versions of Mac, however I want to know if is possible to compile it. I tried installed via cmake but all I get in my code is Plugin '-1' unknown! Could not initialize video plugin! Any help pointing that is possible to use osgART with Mac Lion is welcomed Thank you! Cheers, Erick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46330#46330 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] problem compiling osg 3.0.0 for Android
Hi, Thank you for your Answer, it clears up some things. I got it to work. The problem was in linking to the standard library. Like you wrote: NDK r7 has a strange bug with the order of linking std libraries just add -lgnustl_static at the end and it will be solved. For anyone having the same problem, the solution was to edit the Android.mk file in the project/jni/ folder (project being osgViewerExample[1/2]) on the LOCAL_LDLIBS to change it to this: from LOCAL_LDLIBS:= -llog -lGLESv2 -lz to LOCAL_LDLIBS:= -llog -lGLESv2 -lz -lgnustl_static I'm about to write a tutorial with screenshots to get openscenegraph to run. Thank you! Cheers, Bernd -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46332#46332 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Sergey, The model works with osgviewer, and replacing the link to my model with a link to a model supplied with osg (cow.osg) gives the same segmentation fault. Cheers, Mark -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46334#46334 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Incorrect volume image
Hi Clement, On 16 March 2012 03:13, clement@csiro.au wrote: When I loaded an image with using osgvolume, it cannot show probably. I found the error listed as http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/OpenGLConformance about GL_SGIS_generate_mipmap doesn't work. I would like to know whether there is a any solution to fix the problem. My graphic card details is as below. Thanks. The note on the OpenGLConformance page is for an ATI graphics card, not Intel GMA graphics. In general one doesn't use mipmapping with volumes, and osgVolume by default just uses linear interpolation filters with the Texture3D so won't be invoking any mipmap generation, either on the CPU side or GPU side. I therefore don't think the issue you have is to do with the GL_SGIS_generate_mipmap. What is the reason why you suggested this? As I've said before Intel graphics isn't something that is going to handle volume rendering, it neither has the hardware capability or driver quality up to the task. If you want to do volume rendering you should use an ATI or NVidia graphics card. Even a $50 card will be pretty capable, it's certainly far far less work just buy the appropriate hardware for the task than just and chase up problems with hardware that will never be capable of doing doing proper volume rendering. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Mark, On 16 March 2012 08:53, Mark Green hlgamead...@hotmail.com wrote: The model works with osgviewer, and replacing the link to my model with a link to a model supplied with osg (cow.osg) gives the same segmentation fault. If you are using windows you'll need to make sure you aren't mixed release and debug libraries as this is common mistake. Also when looking at this type of stuff just saying something crashes without providing a stack trace that at least points to roughly where the problem might be is rather optimistic. How are we supposed to guess what is wrong with your application if we have far less importation to hand than you do? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Robert, I'm working on linux, and with my limited experience on it I'm unaware how to obtain said stacktrace (Visual Studio has been too awesome on windows). Meanwhile however I've stripped the entire program down to the bare minimum to see if there were any influences from other code, and this is what I've got now and which is giving me the same segmentation fault. Other classes are still being compiled but they are never referenced or called, and building it is going fine. Code: #include iostream #include string #include osgDB/ReadFile using namespace std; int main( int argc, char **argv ) { string s = /home/username/OSG-Project/cow.osg; std::cout test s std::endl; osg::ref_ptrosg::Node Scene = osgDB::readNodeFile(s); std::cout test2 std::endl; return 0; } Cheers, Mark -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46337#46337 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi, Mark This is probably building\linking issue. Either you build with includes from one osg version and linking to other, or something along these lines Check if you are building with includes from same osg version as you linking to, and running with same libs, you linking with(you can get libraries which will be used on program start with ldd program). To get backtrace you should run your program with gdb gdb --args program and arguments type run and type bt when it crashes 16.03.2012, 13:35, Mark Green hlgamead...@hotmail.com: Hi Robert, I'm working on linux, and with my limited experience on it I'm unaware how to obtain said stacktrace (Visual Studio has been too awesome on windows). Meanwhile however I've stripped the entire program down to the bare minimum to see if there were any influences from other code, and this is what I've got now and which is giving me the same segmentation fault. Other classes are still being compiled but they are never referenced or called, and building it is going fine. Code: #include iostream #include string #include osgDB/ReadFile using namespace std; int main( int argc, char **argv ) { string s = /home/username/OSG-Project/cow.osg; std::cout test s std::endl; osg::ref_ptrosg::Node Scene = osgDB::readNodeFile(s); std::cout test2 std::endl; return 0; } Cheers, Mark -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46337#46337 ___ 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] Texture repeats and overlaps when I don't want it to
Hi output looks ok to me, have no idea what's wrong 16.03.2012, 04:48, Zachary Hilbun osgfo...@tevs.eu: Hi, This is a dump of how I do the mapping. I am mapping a square texture to a circle. texcoords-push_back (osg::Vec2 (x, y)); Map vertex 1, 0 to texture 1, 0.5 Map vertex 0.998027, 0.0627905 to texture 0.999013, 0.531395 Map vertex 0.992115, 0.125333 to texture 0.996057, 0.562667 Map vertex 0.982287, 0.187381 to texture 0.991144, 0.593691 Map vertex 0.968583, 0.24869 to texture 0.984292, 0.624345 Map vertex 0.951057, 0.309017 to texture 0.975528, 0.654508 Map vertex 0.929776, 0.368125 to texture 0.964888, 0.684062 Map vertex 0.904827, 0.425779 to texture 0.952414, 0.71289 Map vertex 0.876307, 0.481754 to texture 0.938153, 0.740877 Map vertex 0.844328, 0.535827 to texture 0.922164, 0.767913 Map vertex 0.809017, 0.587785 to texture 0.904508, 0.793893 Map vertex 0.770513, 0.637424 to texture 0.885257, 0.818712 Map vertex 0.728969, 0.684547 to texture 0.864484, 0.842274 Map vertex 0.684547, 0.728969 to texture 0.842274, 0.864484 Map vertex 0.637424, 0.770513 to texture 0.818712, 0.885257 Map vertex 0.587785, 0.809017 to texture 0.793893, 0.904508 Map vertex 0.535827, 0.844328 to texture 0.767913, 0.922164 Map vertex 0.481754, 0.876307 to texture 0.740877, 0.938153 Map vertex 0.425779, 0.904827 to texture 0.71289, 0.952414 Map vertex 0.368125, 0.929776 to texture 0.684062, 0.964888 Map vertex 0.309017, 0.951057 to texture 0.654508, 0.975528 Map vertex 0.24869, 0.968583 to texture 0.624345, 0.984292 Map vertex 0.187381, 0.982287 to texture 0.593691, 0.991144 Map vertex 0.125333, 0.992115 to texture 0.562667, 0.996057 Map vertex 0.0627905, 0.998027 to texture 0.531395, 0.999013 Map vertex -6.04903e-16, 1 to texture 0.5, 1 Map vertex -0.0627905, 0.998027 to texture 0.468605, 0.999013 Map vertex -0.125333, 0.992115 to texture 0.437333, 0.996057 Map vertex -0.187381, 0.982287 to texture 0.406309, 0.991144 Map vertex -0.24869, 0.968583 to texture 0.375655, 0.984292 Map vertex -0.309017, 0.951057 to texture 0.345491, 0.975528 Map vertex -0.368125, 0.929776 to texture 0.315938, 0.964888 Map vertex -0.425779, 0.904827 to texture 0.28711, 0.952414 Map vertex -0.481754, 0.876307 to texture 0.259123, 0.938153 Map vertex -0.535827, 0.844328 to texture 0.232087, 0.922164 Map vertex -0.587785, 0.809017 to texture 0.206107, 0.904508 Map vertex -0.637424, 0.770513 to texture 0.181288, 0.885257 Map vertex -0.684547, 0.728969 to texture 0.157726, 0.864484 Map vertex -0.728969, 0.684547 to texture 0.135516, 0.842274 Map vertex -0.770513, 0.637424 to texture 0.114743, 0.818712 Map vertex -0.809017, 0.587785 to texture 0.0954915, 0.793893 Map vertex -0.844328, 0.535827 to texture 0.077836, 0.767913 Map vertex -0.876307, 0.481754 to texture 0.0618467, 0.740877 Map vertex -0.904827, 0.425779 to texture 0.0475865, 0.71289 Map vertex -0.929776, 0.368125 to texture 0.0351118, 0.684062 Map vertex -0.951057, 0.309017 to texture 0.0244717, 0.654508 Map vertex -0.968583, 0.24869 to texture 0.0157084, 0.624345 Map vertex -0.982287, 0.187381 to texture 0.00885639, 0.593691 Map vertex -0.992115, 0.125333 to texture 0.00394264, 0.562667 Map vertex -0.998027, 0.0627905 to texture 0.000986636, 0.531395 Map vertex -1, -2.54207e-15 to texture 0, 0.5 Map vertex -0.998027, -0.0627905 to texture 0.000986636, 0.468605 Map vertex -0.992115, -0.125333 to texture 0.00394264, 0.437333 Map vertex -0.982287, -0.187381 to texture 0.00885639, 0.406309 Map vertex -0.968583, -0.24869 to texture 0.0157084, 0.375655 Map vertex -0.951057, -0.309017 to texture 0.0244717, 0.345491 Map vertex -0.929776, -0.368125 to texture 0.0351118, 0.315938 Map vertex -0.904827, -0.425779 to texture 0.0475865, 0.28711 Map vertex -0.876307, -0.481754 to texture 0.0618467, 0.259123 Map vertex -0.844328, -0.535827 to texture 0.077836, 0.232087 Map vertex -0.809017, -0.587785 to texture 0.0954915, 0.206107 Map vertex -0.770513, -0.637424 to texture 0.114743, 0.181288 Map vertex -0.728969, -0.684547 to texture 0.135516, 0.157726 Map vertex -0.684547, -0.728969 to texture 0.157726, 0.135516 Map vertex -0.637424, -0.770513 to texture 0.181288, 0.114743 Map vertex -0.587785, -0.809017 to texture 0.206107, 0.0954915 Map vertex -0.535827, -0.844328 to texture 0.232087, 0.077836 Map vertex -0.481754, -0.876307 to texture 0.259123, 0.0618467 Map vertex -0.425779, -0.904827 to texture 0.28711, 0.0475865 Map vertex -0.368125, -0.929776 to texture 0.315938, 0.0351118 Map vertex -0.309017, -0.951057 to texture 0.345491, 0.0244717 Map vertex -0.24869, -0.968583 to texture 0.375655, 0.0157084 Map vertex -0.187381, -0.982287 to texture 0.406309, 0.00885639 Map vertex -0.125333, -0.992115 to texture 0.437333, 0.00394264 Map vertex -0.0627905, -0.998027 to texture 0.468605, 0.000986636 Map vertex -1.83691e-16, -1 to texture 0.5, 0 Map vertex 0.0627905, -0.998027 to texture 0.531395, 0.000986636 Map vertex
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Ah this looks like it might be it, using that ldd command shows that libosgDB.so.65 = /usr/local/lib/libosgDB.so.65 (0xb7c21000) is being build, while the execution shows that /usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so is being found. The Makefile which was created/generated by someone else had been left untouched by me since compiling and executing went fine. It currently looks like this (I added the /osgPlugins-2.8.3 part just now, hoping that it would fix it, but the same error is given, ldd doesn't give different results either). Code: OBJ = main.o Configuration.o support.o OsgObject.o Lights.o Cameras.o EsimIf.o TransformAccumulator.o SOURCES=*.cc Header=*.h LIBS= -losg -losgDB -losgGA -losgUtil -losgViewer -L/usr/local/lib/osgPlugins-2.8.3 -lz -lpthread -lm -lrt -L/usr/Project/lib -lesClient CPPFLAGS= -g -I. -D__STRICT_ANSI__ -I/usr/local/include -I/usr/Project/include -I/usr/Project/include/esim all: $(OBJ) g++ -o execu $(OBJ) $(LIBS) clean: rm -f *.o rm -f execu %.o: %.cc g++ $(CPPFLAGS) -c $ -o $*.o hybr wrote: Hi, Mark This is probably building\linking issue. Either you build with includes from one osg version and linking to other, or something along these lines Check if you are building with includes from same osg version as you linking to, and running with same libs, you linking with(you can get libraries which will be used on program start with ldd program). To get backtrace you should run your program with gdb gdb --args program and arguments type run and type bt when it crashes 16.03.2012, 13:35, Mark Green : Hi Robert, I'm working on linux, and with my limited experience on it I'm unaware how to obtain said stacktrace (Visual Studio has been too awesome on windows). Meanwhile however I've stripped the entire program down to the bare minimum to see if there were any influences from other code, and this is what I've got now and which is giving me the same segmentation fault. Other classes are still being compiled but they are never referenced or called, and building it is going fine. Code: #include iostream #include string #include osgDB/ReadFile using namespace std; int main( int argc, char **argv ) { string s = /home/username/OSG-Project/cow.osg; std::cout test s std::endl; osg::ref_ptrosg::Node Scene = osgDB::readNodeFile(s); std::cout test2 std::endl; return 0; } Cheers, Mark -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46337#46337 ___ 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=46340#46340 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Mark, On 16 March 2012 10:13, Mark Green hlgamead...@hotmail.com wrote: Ah this looks like it might be it, using that ldd command shows that libosgDB.so.65 = /usr/local/lib/libosgDB.so.65 (0xb7c21000) is being build, while the execution shows that /usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so is being found. The Makefile which was created/generated by someone else had been left untouched by me since compiling and executing went fine. It currently looks like this (I added the /osgPlugins-2.8.3 part just now, hoping that it would fix it, but the same error is given, ldd doesn't give different results either). Is there any chance you have a mixed OSG version on the system? As a general note, I'd recommend moving to 3.0.1 rather than 2.8.3, API wise it should be close enough that it should primarily just be a recompile against the newer version of the OSG. One the stack trace front the quickest tool to use would be to run your application with the gnu debugger gdb, i.e. gdb osgviewer run cow.osg To list the stack trace simply type where into the gdb console. There are IDE's available tool, personally I haven't required much more than gdb over the last decade. Prior to using gdb I used to use VisualStudio under Windows and CaseVision under IRIX, but in the end found them constraining and awkward to fit with the way I've found most productive. Another tool that is very useful is valgrind for tracking memory and threading issues. Editing wise I use KDE's text editor Kate. Robert. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Robert, According to my employers OSG had never been installed on that particular machine before installing 2.8.3. However, the program was originally written for 1.2.0 on another computer and it and its Makefile have been directly copied to the new machine (where I would have to update the code to account for for example the missing osgProducer). How could I control if their recollection of events is correct or if there are any 1.2.0 parts on that machine? The stacktrace after execution was: #0 0x0001 in ?? () #1 0xb649378c in OSGReaderWriter::readNode () from /usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so #2 0xb7c88a3c in osgDB::Registry::ReadNodeFunctor::doRead () from /usr/local/lib/libosgDB.so.65 #3 0xb7c7e3a2 in osgDB::Registry::read () from /usr/local/lib/libosgDB.so.65 #4 0xb7c80527 in osgDB::Registry::readImplementation () from /usr/local/lib/libosgDB.so.65 #5 0xb7c84a92 in osgDB::Registry::readNodeImplementation () from /usr/local/lib/libosgDB.so.65 #6 0xb7c5fb99 in osgDB::readNodeFile () from /usr/local/lib/libosgDB.so.65 #7 0x0804aded in osgDB::readNodeFile (filename=@0xbf9b7298) at /usr/local/include/osgDB/ReadFile:106 #8 0x0804ac29 in main () at main.cc:77 Cheers, Mark robertosfield wrote: Hi Mark, On 16 March 2012 10:13, Mark Green wrote: Ah this looks like it might be it, using that ldd command shows that libosgDB.so.65 = /usr/local/lib/libosgDB.so.65 (0xb7c21000) is being build, while the execution shows that /usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so is being found. The Makefile which was created/generated by someone else had been left untouched by me since compiling and executing went fine. It currently looks like this (I added the /osgPlugins-2.8.3 part just now, hoping that it would fix it, but the same error is given, ldd doesn't give different results either). Is there any chance you have a mixed OSG version on the system? As a general note, I'd recommend moving to 3.0.1 rather than 2.8.3, API wise it should be close enough that it should primarily just be a recompile against the newer version of the OSG. One the stack trace front the quickest tool to use would be to run your application with the gnu debugger gdb, i.e. gdb osgviewer run cow.osg To list the stack trace simply type where into the gdb console. There are IDE's available tool, personally I haven't required much more than gdb over the last decade. Prior to using gdb I used to use VisualStudio under Windows and CaseVision under IRIX, but in the end found them constraining and awkward to fit with the way I've found most productive. Another tool that is very useful is valgrind for tracking memory and threading issues. Editing wise I use KDE's text editor Kate. Robert. Robert. ___ 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=46343#46343 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Mark, On 16 March 2012 10:56, Mark Green hlgamead...@hotmail.com wrote: Hi Robert, According to my employers OSG had never been installed on that particular machine before installing 2.8.3. However, the program was originally written for 1.2.0 on another computer and it and its Makefile have been directly copied to the new machine (where I would have to update the code to account for for example the missing osgProducer). Porting from osgProducer::Viewer to osgViewer::Viewer shouldn't be too difficult, it all depends upon how much code your application used Producer directly. How could I control if their recollection of events is correct or if there are any 1.2.0 parts on that machine? With OSG-2.x onwards we started using CMake and the scripts put version numbers of libs and the plugins directories, normally this should prevent mixing of libs. The stacktrace after execution was: #0 0x0001 in ?? () #1 0xb649378c in OSGReaderWriter::readNode () from /usr/local/lib/osgPlugins-2.8.3/osgdb_osg.so #2 0xb7c88a3c in osgDB::Registry::ReadNodeFunctor::doRead () from /usr/local/lib/libosgDB.so.65 #3 0xb7c7e3a2 in osgDB::Registry::read () from /usr/local/lib/libosgDB.so.65 #4 0xb7c80527 in osgDB::Registry::readImplementation () from /usr/local/lib/libosgDB.so.65 #5 0xb7c84a92 in osgDB::Registry::readNodeImplementation () from /usr/local/lib/libosgDB.so.65 #6 0xb7c5fb99 in osgDB::readNodeFile () from /usr/local/lib/libosgDB.so.65 #7 0x0804aded in osgDB::readNodeFile (filename=@0xbf9b7298) at /usr/local/include/osgDB/ReadFile:106 #8 0x0804ac29 in main () at main.cc:77 What you are doing with the OSG code is very simply and wouldn't be expected to crash, so there is something amiss with you libs or plugins. I can't say what this might be from the stack trace. Personally I'd download the source code to OpenSceneGraph-3.0.1 and build and install it yourself. Then just rebuild and run your application against this, this way you can make sure that everything is built and running correctly against each other. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
robertosfield wrote: Porting from osgProducer::Viewer to osgViewer::Viewer shouldn't be too difficult, it all depends upon how much code your application used Producer directly. That's good to hear, I've seen some parts that weren't immediatly obvious but I'm sure it'll be manageable then. Most of it was reconstructable with seemingly the same functionality and it ended up compiling without errors, the only part I couldn't directly find a equivalent functionality for that i nthe original application they used rendersurface to be able to set the videocard or screen on which the windows should be projected. But I guess that would be something for a different thread if I can't figure that out. What you are doing with the OSG code is very simply and wouldn't be expected to crash, so there is something amiss with you libs or plugins. I can't say what this might be from the stack trace. Personally I'd download the source code to OpenSceneGraph-3.0.1 and build and install it yourself. Then just rebuild and run your application against this, this way you can make sure that everything is built and running correctly against each other. Robert. Allright, I will try that next week. Thank you for your help, and I'll be sure to report progress back to aid any googlers from the future. Cheers, Mark ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum[/quote] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46345#46345 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Segmentation fault in osgDB::readNodeFile()
Hi Mark, On 16 March 2012 12:37, Mark Green hlgamead...@hotmail.com wrote: That's good to hear, I've seen some parts that weren't immediatly obvious but I'm sure it'll be manageable then. Most of it was reconstructable with seemingly the same functionality and it ended up compiling without errors, the only part I couldn't directly find a equivalent functionality for that i nthe original application they used rendersurface to be able to set the videocard or screen on which the windows should be projected. But I guess that would be something for a different thread if I can't figure that out. For fine control over the creation of windows and which screen to place them on have a look at the osgcamera example, in particular it's the set up of osg::GraphicsContext::Traits that provides the fine control of what windows you want created. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Nodes in osg::Group affect each other state.
Hi all, I am new to OSG, so maybe my question is silly, but I'm trying to apply some little knowledge on how scene graphs should work here. I've managed to reduce the problem I have to a reasonably sized testcase which I attached to the post. I have two nodes there: a quad with a texture applied to it and a node that contains 2 lines of green colour. Now when I place them both in an osg::Group, the presence of the lines node makes the texture disappear from the quad(comment/uncomment line 97). I am pretty sure it is something very basic that I am missing and it can't be a problem in the OSG code. Thank you! Cheers, Eldar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46347#46347 Attachments: http://forum.openscenegraph.org//files/testcase_520.cpp ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_STENCIL_TEST in draw implementation callback
Clearing the modelview and projection matrices helped a great deal. Thanks hybr! It now works as intended ... up to a point that is difficult to explain. I get the digital zoom effect until about 13x. At that point, the video suddenly starts translating instead of zooming. And instead of showing video that is off-center (which would still be confusing and wrong to me since there is nothing that is doing a translation), the video is still clipped such that inside my stencil quad I see a repeat of other items in the application (I get buttons and such drawing in my video quad). If I disable the GL_STENCIL_TEST now, the video viewport grows exactly as expected. At some point, it does grow beyond the size of my application window. Perhaps this is a problem for the stencil for some reason? Can anyone provide additional insight for me? Thanks again! Doug -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46349#46349 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] TerraPage plugin for Geocentric terrains, terrapage 2.3?
Hi, Does anyone know if the actual terrapage plugin support geocentric terrains of terrapage 2.3 version? Thank you! Cheers, Nico -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46350#46350 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Incorrect volume image
Hi Robert, Last time I got the problem is related to hardware, so texture3D is not supported by the graphic card. Now I tested on other machines. I ran the testing code and there is no any error message on console, but the display image is not correct. The image problem is same as the image shown on http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/OpenGLConformance about GL_SGIS_generate_mipmap doesn't work, so I guess the problem is related to mipmap. Do you think this problem is also related to the hardware? Regards, Clement From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield [robert.osfi...@gmail.com] Sent: Friday, 16 March 2012 8:17 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Incorrect volume image Hi Clement, On 16 March 2012 03:13, clement@csiro.au wrote: When I loaded an image with using osgvolume, it cannot show probably. I found the error listed as http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/OpenGLConformance about GL_SGIS_generate_mipmap doesn't work. I would like to know whether there is a any solution to fix the problem. My graphic card details is as below. Thanks. The note on the OpenGLConformance page is for an ATI graphics card, not Intel GMA graphics. In general one doesn't use mipmapping with volumes, and osgVolume by default just uses linear interpolation filters with the Texture3D so won't be invoking any mipmap generation, either on the CPU side or GPU side. I therefore don't think the issue you have is to do with the GL_SGIS_generate_mipmap. What is the reason why you suggested this? As I've said before Intel graphics isn't something that is going to handle volume rendering, it neither has the hardware capability or driver quality up to the task. If you want to do volume rendering you should use an ATI or NVidia graphics card. Even a $50 card will be pretty capable, it's certainly far far less work just buy the appropriate hardware for the task than just and chase up problems with hardware that will never be capable of doing doing proper volume rendering. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GL_STENCIL_TEST in draw implementation callback
UGH! I just found that I was mistaken about the video growing properly without the stencil. It actually doesn't. Once its viewport exceeds a certain size, it no longer renders as expected. I think I've come as far as I can here. Thanks anyway. Doug -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46353#46353 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] iOS Developer with OSG experience needed!
Hello dear OSG-community, Hi all, I don't mean to tread on toes, perhaps this will be of interest to one of you, or someone you know. I'm finding it very hard to find a candidate with OSG knowledge! Job spec below: iOS Developer Our client, based in Central London is urgently looking for a skilled iOS Developer to assist in a project currently set to last for a month. A relatively new, yet established and exciting Digital Agency, there are big opportunities for extended work. The ideal candidate will need: • Expertise in iOS Development • Have 1+ years’ experience in Objective-C programming • Experience with OSG Toolkit • A gaming background With a knowledge of: • ARToolkit • 3ds Max • Open GL You will also be available for work ASAP. If you are interested, please contact me immediately with a CV! :) Thank you! Best regards, Guy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46356#46356 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] [Tutorial] Building osgAndroidExampleGLES1/2 on Ubuntu 11.10
I decided to write a very easy step-for-step tutorial on how to build OSG for Android. I'm going to share it here. Corrections are of course welcome. This Tutorial is to show how to compile OpenSceneGraph for Android and how to build the Example Application osgViewer on Ubuntu 11.10. It is meant as additional help and does not exempt the developer from reading http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android and http://developer.android.com/sdk/ndk/index.html Screenshots are available here: http://imgur.com/a/VEyrg Initial requirements are an already working Android Development Environment. I am using Eclipse Indigo, Android SDK r16, Android NDK r7b. Further required are cmake and g++. Install Synaptic using the Software Center (SCREENSHOT1). Install the package openjdk-6-jdk using Synaptic (SCREENSHOT2). Install the following packages using Synaptic or apt-get. cmake (sudo apt-get install cmake) g++ Download Eclipse and extract it. I'm using /home/USER/Android/eclipse/ My version is Eclipse Indigo. Download the Android SDK (my version: r16) and extract it into /home/USER/Android/android-sdk-linux/ Install the ADT-Plugin into eclipse. This works like this: start eclipse and on the top panel go to Help → Install New Software. In the Field labeled „Work with:“ fill in: https://dl-ssl.google.com/android/eclipse/ and press Enter (SCREENSHOT3). After it has loaded the sources („Developer Tools“ is visible) (screenshot), check the „Developer Tools“ and click Next until everything is installed. After restarting eclipse go to Window → Android SDK Manager. Install AT LEAST Android 2.2 (API 8). This is the minimum required version for OSG on Android. (SCREENSHOT4). I installed it to /home/USER/Android/android-sdks/ to have it all in one place. Extract the Android NDK to /home/USER/Android/android-ndk-r7b/ Developers with an already working environment should be able to start here. Installing OpenSceneGraph 3.0.1 for Android with OpenGL ES 1.x Download OpenSceneGraph-3.0.1 and extract it to /home/USER/Android/OpenSceneGraph-3.0.1/ Download the 3rd Party Dependencies and extract it to /home/USER/Android/OpenSceneGraph-3.0.1/3rdparty/ Set the environment variable ANDROID_NDK so that the cmake building script can find it. Go to /home/USER/ and open the file .bashrc. You might need to make it visible. Do this with CTRL+H. Edit the file (add the following lines to the end): export ANDROID_NDK=/home/USER/Android/android-ndk-r7b export ANDROID_SDK=/home/USER/Android/android-sdks where USER is the username. (SCREENSHOT5). I added a variable for the SDK too, so that we don't always have to type the full path when accessing the SDK folder from the command line. Save it. Open a Terminal. Type the following commands (replace USER with your username): mkdir /home/USER/Android/OpenSceneGraph-3.0.1/build cd /home/USER/Android/OpenSceneGraph-3.0.1/build This created a directory build in the OpenSceneGraph-directory. This is where we will place our build in. The next command will create the necessary makefiles. Change the last parameter according to the number of cpu-cores you have. I set it to 4, because I have a quadcore. cmake .. -DOSG_BUILD_PLATFORM_ANDROID=ON -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=ON -DOSG_GL_VERTEX_FUNCS_AVAILABLE=ON -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=ON -DOSG_GL_FIXED_FUNCTION_AVAILABLE=ON -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=ON -DOSG_GLES2_AVAILABLE=OFF -DJ=4 After that we can build it: make ...This will take a while, so go and grab a snack. The following command will then install the libraries and headers into /usr/local into the folders /usr/local/obj and /usr/local/include: sudo make install After this is finished, we are ready to start the eclipse project. Before starting eclipse, copy the folder osgAndroidExampleGLES1 from /home/USER/Android/OpenSceneGraph-3.0.1/examples to /home/USER/workspace/osgAndroidExampleGLES1 (or wherever else your eclipse workspace is). Start eclipse and go to New → Project and choose “Android Project“. Next, then choose „Create project from existing source“ and set the location to /home/USER/workspace/osgAndroidExampleGLES1 The Project Name should be osgAndroidExampleGLES1. (SCREENSHOT6) Next, the build target should be Android 2.2 or higher. Expand the project and open the folder jni. Open the file Android.mk Change line 7 to: OSG_ANDROID_DIR := /usr/local Change line 21 to: LOCAL_DLIBS := -llog -lGLESv1_CM -ldl -lz -lgnustl_static and save it. (SCREENSHOT7) In a Terminal window, go to the project directory cd /home/USER/workspace/osgAndroidExampleGLES1 We need to update the build.xml. Type $ANDROID_SDK/tools/android list targets and look for „android-8“ (Name: Android 2.2) in the output. Remember the id. My
Re: [osg-users] Incorrect volume image
Hi Clement, On 16 March 2012 14:38, clement@csiro.au wrote: Last time I got the problem is related to hardware, so texture3D is not supported by the graphic card. Now I tested on other machines. It's still crappy Intel graphics graphics. You absolutely should expect crappy results with volume on any Intel graphics system. I have said this several times now, but it seems the message hasn't sunk in yet. So... I'll say it again. IT'S POINTLESS TRYING TO DO VOLUME RENDERING ON INTEL GRAPHICS HARDWARE, THEY ARE TOTALLY AND UTTERLY INCAPABLE OF HANDLING IT. I ran the testing code and there is no any error message on console, but the display image is not correct. The image problem is same as the image shown on http://www.openscenegraph.org/projects/osg/wiki/Community/Tasks/OpenGLConformance about GL_SGIS_generate_mipmap doesn't work, so I guess the problem is related to mipmap. Do you think this problem is also related to the hardware? What did I say in my previous email? 1) It has nothing to do with mipmapping because mipmapping isn't used for volume rendering, 2) Intel graphics hardware and driver are woefully inadequate. I know this isn't the message you want to hear, but you'll get the same message every time you try and attempt to volume rendering with Intel hardware. If you can't take this on board or other things I suggest, then how much point is there in me even trying to reply to your support posts? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] iOS Developer with OSG experience needed!
Our client, based in Central London is urgently looking for a skilled iOS Developer to assist in a project currently set to last for a month. A relatively new, yet established and exciting Digital Agency, there are big opportunities for extended work. You don't really say whether you're requiring on-site work, and what the opportunity might be for non-UK citizens (work visa, etc). You're dealing with an international list, most of the users are not in the UK so clarifying this would help you get the most useful responses. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame Rate Decay w/ SilverLining Integration
Hi, Thanks for the response. I have a little more details of the problem but am still completely stumped. This is my test: Start my application and leave it running for a while. Frame rate, memory use etc all stable. Enable silverlinng. As reported by gDebugger, after the initial expected increase, the number of reported OpenGL calls, vertices, texture objects (and every other counter they have) stays completely stable expect for the frame rate which reduces at a steady rate, a few frames each second. In the earlier thread, it was noted that changing the threading model seemed to ;reset' the frame rate. I looked into this some more and it seems the behaviour is 'reset' when the draw thread is recreated started. If you return back to a thread that had previously 'decayed', it continues to decay from where it left off. e.g. singlthreaded decays to 50fps switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again switch back to single threaded (no new threads are created) and you are back at 50 fps and still decaying switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again It seems that a delay is being added to the current GL thread by silverlining. What ever it is doing, it is not making extra gl calls etc. Any ideas what could cause this sort of behaviour? I don't! Cheers, Brad When running in gDebugger, From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Thursday, 15 March 2012 10:23 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Frame Rate Decay w/ SilverLining Integration On Thu, Mar 15, 2012 at 12:32 AM, Christiansen, Brad brad.christian...@thalesgroup.com.aumailto:brad.christian...@thalesgroup.com.au wrote: Hi, I have come across the exact problem discussed on the forum here: http://forum.openscenegraph.org/viewtopic.php?t=8287 which was posted May 2011. The discussion described the problem I am seeing perfectly but unfortunately there is no resolution posted. I think Mike Weiblen integrated OSG with SilverLining as well, he might be able to comment but he's terribly busy. Have you checked to see if gDebugger shows any issues? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS * Telemetry * Cryptography * Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS * Android - DISCLAIMER: This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. - ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame Rate Decay w/ SilverLining Integration
Hi, Brad, We have SilverLining source code license. I may find few hours in next week to look at the problem, if the issue can be reproduced on one of my machines (ie Nvidia GF580/GF9400 or GF540M). I would like to have as much info as possible to replicate the issue, though. I would like to know: - System version - OSG version - Graphics board and driver version (dual monitor setup ? GPU panel tweaks) - Compiler/linker VS studio version - SilverLining version. If not yet tested I would be grateful if you could test it with latest trial SilverLining SDK to be sure its not fixed already. What exactly is done with SilverLining ? What cloud types / wind settings / lighnting etc are used ?. Each type of SilverLining Cloud entities has its own specific parameters and can be drawn with different algorithm and use differen graphics resources. So it may be important to know what SilverLining resourses are in use. Probably the best would be if you could send the sample source you are testing. Cheers, Wojtek Lewandowski 2012/3/16 Christiansen, Brad brad.christian...@thalesgroup.com.au Hi, ** ** Thanks for the response. I have a little more details of the problem but am still completely stumped. ** ** This is my test: Start my application and leave it running for a while. Frame rate, memory use etc all stable. Enable silverlinng. As reported by gDebugger, after the initial expected increase, the number of reported OpenGL calls, vertices, texture objects (and every other counter they have) stays completely stable expect for the frame rate which reduces at a steady rate, a few frames each second. ** ** In the earlier thread, it was noted that changing the threading model seemed to ;reset' the frame rate. I looked into this some more and it seems the behaviour is 'reset' when the draw thread is recreated started. If you return back to a thread that had previously 'decayed', it continues to decay from where it left off. e.g. singlthreaded decays to 50fps switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again switch back to single threaded (no new threads are created) and you are back at 50 fps and still decaying switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again ** ** It seems that a delay is being added to the current GL thread by silverlining. What ever it is doing, it is not making extra gl calls etc.* *** ** ** Any ideas what could cause this sort of behaviour? I don’t! ** ** Cheers, ** ** Brad ** ** ** ** When running in gDebugger, *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Chris Hanson *Sent:* Thursday, 15 March 2012 10:23 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Frame Rate Decay w/ SilverLining Integration* *** ** ** On Thu, Mar 15, 2012 at 12:32 AM, Christiansen, Brad brad.christian...@thalesgroup.com.au wrote: Hi, I have come across the exact problem discussed on the forum here: http://forum.openscenegraph.org/viewtopic.php?t=8287 which was posted May 2011. The discussion described the problem I am seeing perfectly but unfortunately there is no resolution posted. ** ** ** ** I think Mike Weiblen integrated OSG with SilverLining as well, he might be able to comment but he's terribly busy. ** ** Have you checked to see if gDebugger shows any issues? ** ** -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ** ** - DISCLAIMER: This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not
[osg-users] osgDB::Options osgviewer
Is there any way to set the options for plugins (osgDB::Options) when using osgviewer? Thanks, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46363#46363 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::Options osgviewer
Hi Paul, Have you tried the following: osgDB::Registry::instance()-setOptions(options); This should set the global default options. Cheers, Farshid On Fri, Mar 16, 2012 at 11:41 AM, Paul Leopard paul.leop...@gmail.comwrote: Is there any way to set the options for plugins (osgDB::Options) when using osgviewer? Thanks, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46363#46363 ___ 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] osgDB::Options osgviewer
And you can set them on the command-line with -O: -O option_stringProvide an option string to reader/writers used to load databases -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::Options osgviewer
Chris Hanson wrote: And you can set them on the command-line with -O: -O option_string Provide an option string to reader/writers used to load databases That's exactly what I'm looking for, a way to specify options from the command line. Thanks so much ... I searched and searched and just didn't see it ... -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46367#46367 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Maintaining a reference to an osg node outside of osg
Hiya, Typically I use osg::ref_ptr to let osg handle reference counting. Right now I'm trying to create a 'rendering engine' for another library with osg. The idea for the other library is to maintain an API that allows different rendering engines -- osg, ogre, vtk, etc. The other library has virtual methods that are called when objects need to be added and removed from the scene, ie: void RemoveObjectFromScene(SomeStruct myStruct) The objects can be thought of as having a 1:1 relation with osg nodes. I'd like to maintain a reference to the osg node corresponding to the object so I don't have to traverse the scene graph to find a given node (there are a lot of objects and this would get way too expensive I think). I can modify SomeStruct as long as its library-agnostic -- so no osg specific stuff goes in there. Could I use a void * or something similar to store a reference? SomeStruct { void * mysteryPtr; } { osg::ref_ptrosg::Node myNode = new osg::node; // 1 ref to myNode m_persistant_root_node-addChild(myNode); // 2 refs to myNode mysteryPtr = myNode.get(); // 2 refs to myNode (no change!) } // 1 refs to myNode since ref_ptr has gone out of scope as long as m_persistent_root_node is alive // mysteryPtr has NO bearing to any ref counting, except for the fact that's its a valid pointer to osg::node as // long as we have 0 refs to it I'd be very grateful if someone could verify the above logic. If I'm in the wrong here, I'd appreciate any advice pointing me in the right direction. Regards, Preet ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture repeats and overlaps when I don't want it to
Hi, What I have found on this is that if I use a different PNG, the problem goes away. The only differences I know of between the 2 images is that the iamge that repeatedly partially overlaps itself is larger and has a transparent background. Any ideas on why the different PNG image makes it work? Thank you! Cheers, Zachary -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46369#46369 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems rendering to and capturing/readin GL_RGBA16
A specialized tool I'm working on needs to have a 16-bit Alpha channel for post-render analysis. I render to a screen-sized texture (1920x1080 NPOT) and then read it back to the CPU side and assess the values. I originally developed it with 8-bit per gun RGBA (32-bit total) where it works fine, but precision is very poor. I then switched my RTT camera destination texture to use GL_RGBA16: RTTtex-setInternalFormat( GL_RGBA16 ); RTTtex-setSourceFormat(GL_RGBA); RTTtex-setSourceType(GL_UNSIGNED_SHORT); This seems to work lovely, but now reading back to the texture and fetching pixels from the texture seems problematic. I capture with a post-draw callback (m_tex is the RTT texture): void CameraImageCaptureCallback::operator()( osg::RenderInfo ri ) const { osg::Image* image = m_tex-getImage(); // Get the texture image. m_tex-apply( *( ri.getState() ) ); image-readImageFromCurrentTexture( ri.getContextID(), false, GL_UNSIGNED_SHORT ); } I _think_ the UNSIGNED_SHORT is appropriate here (it was UNSIGNED BYTE when I was using regular 8-bit-per-channel rendering). To run this callback, I: osg::ref_ptr CameraImageCaptureCallback captureCB; outputImage = new osg::Image; outputImage-setPixelFormat(GL_RGBA); outputImage-setDataType(GL_UNSIGNED_SHORT); // different when in 8-bit mode osg::Texture2D *accumTex = GetAccumulationTexture(); // this is the texture that rendering writes to accumTex-setImage( outputImage ); captureCB = new CameraImageCaptureCallback(accumTex); GetPrerenderCamera()-setPostDrawCallback( captureCB.get() ); // Run the viewer one more time to capture to the attached image. vpEnv.viewer-frame(); Later, I examine the image pixel by pixel with: alpha = lessonOutput-getColor(xLoop, yLoop).a(); All of this works dandy in 8-bit mode, but add 8 more bits and it goes to heck. This message: http://forum.openscenegraph.org/viewtopic.php?t=9879 leads me to believe that some parts of OSG may not be supporting GL_RGBA16 properly, and in fact, I don't see it listed in the tokens in Image::computeNumComponents() though less-well-known tokens like GL_RGB16I_EXT are there. I tried using GL_RGB16I_EXT as my RTT texture format, but OSG fails to setup the RTT FBO, so I didn't succeed with that avenue. I was able to use GL_RGB16F_ARB but it seemed to behave very oddly all around, often refusing to clear the buffer when told to, so I abandoned that. A I missing any steps to setup for a GL_RGBA16 texture? I got very confused around all of the formats and internal formats and knowing what I needed to preconfigure in the osg::Image versus what OSG was going to setup for me. After the readImageFromCurrentTexture call, the Image's pixelFormat is set to GL_RGBA16, which makes calls like getColor fail because GL_RGBA16 isn't recognized. Is there a better way to render to a 16-bit int format? Am I just missing a critical step? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maintaining a reference to an osg node outside of osg
I'd be very grateful if someone could verify the above logic. If I'm in the wrong here, I'd appreciate any advice pointing me in the right direction. You should be able to do that (and you could probably use RTTI features to figure out what the OSG type/class mystery pointer was pointing to) as long as you realize that if an OSG node is disposed of, your mystery pointer is going to give you a mystery crash. You could also consider having it be a pointer to an entry in a table (stored/maintained outside of your struct/library code) of ref_ptrs or observer pointers. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame Rate Decay w/ SilverLining Integration
Hi Woktej, Thanks for you offer to help out, but I have managed to track it down enough to have a good enough solution for now. For anyone else who stumbles across this issue, my work around is to disable VBOs in silverlining. If I did this by using the SILVERLINING_NO_VBO environment variable it crashed so I simply hard coded them to off in SilverLiningOpenGL.cpp. I narrowed down the source of the issue to calls to AllocateVertBuffer in the same file. Even if the buffers are never used, simply allocating them for the 6 faces of the sky box is enough to cause things to go wrong. I am using version 2.35 of SilverLining. VS2010 SP1 OSG trunk as of a month or two ago Windows 7 Nvidia GTX460M Driver Version 267.21 The same problem was also occurring on another machine. I think that had a 450GT in it, but otherwise the same. Cheers, Brad From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Wojciech Lewandowski Sent: Saturday, 17 March 2012 1:59 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Frame Rate Decay w/ SilverLining Integration Hi, Brad, We have SilverLining source code license. I may find few hours in next week to look at the problem, if the issue can be reproduced on one of my machines (ie Nvidia GF580/GF9400 or GF540M). I would like to have as much info as possible to replicate the issue, though. I would like to know: - System version - OSG version - Graphics board and driver version (dual monitor setup ? GPU panel tweaks) - Compiler/linker VS studio version - SilverLining version. If not yet tested I would be grateful if you could test it with latest trial SilverLining SDK to be sure its not fixed already. What exactly is done with SilverLining ? What cloud types / wind settings / lighnting etc are used ?. Each type of SilverLining Cloud entities has its own specific parameters and can be drawn with different algorithm and use differen graphics resources. So it may be important to know what SilverLining resourses are in use. Probably the best would be if you could send the sample source you are testing. Cheers, Wojtek Lewandowski 2012/3/16 Christiansen, Brad brad.christian...@thalesgroup.com.aumailto:brad.christian...@thalesgroup.com.au Hi, Thanks for the response. I have a little more details of the problem but am still completely stumped. This is my test: Start my application and leave it running for a while. Frame rate, memory use etc all stable. Enable silverlinng. As reported by gDebugger, after the initial expected increase, the number of reported OpenGL calls, vertices, texture objects (and every other counter they have) stays completely stable expect for the frame rate which reduces at a steady rate, a few frames each second. In the earlier thread, it was noted that changing the threading model seemed to ;reset' the frame rate. I looked into this some more and it seems the behaviour is 'reset' when the draw thread is recreated started. If you return back to a thread that had previously 'decayed', it continues to decay from where it left off. e.g. singlthreaded decays to 50fps switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again switch back to single threaded (no new threads are created) and you are back at 50 fps and still decaying switch to draw thread per context and frame rate goes back to 100fps when a new thread is created and it starts decaying again It seems that a delay is being added to the current GL thread by silverlining. What ever it is doing, it is not making extra gl calls etc. Any ideas what could cause this sort of behaviour? I don't! Cheers, Brad When running in gDebugger, From: osg-users-boun...@lists.openscenegraph.orgmailto:osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.orgmailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Thursday, 15 March 2012 10:23 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Frame Rate Decay w/ SilverLining Integration On Thu, Mar 15, 2012 at 12:32 AM, Christiansen, Brad brad.christian...@thalesgroup.com.aumailto:brad.christian...@thalesgroup.com.au wrote: Hi, I have come across the exact problem discussed on the forum here: http://forum.openscenegraph.org/viewtopic.php?t=8287 which was posted May 2011. The discussion described the problem I am seeing perfectly but unfortunately there is no resolution posted. I think Mike Weiblen integrated OSG with SilverLining as well, he might be able to comment but he's terribly busy. Have you checked to see if gDebugger shows any issues? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training * Consulting * Contracting 3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 * GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL Digital Imaging * GIS * GPS *
Re: [osg-users] Maintaining a reference to an osg node outside of osg
What you're trying to do is the PIMPL design pattern. I'll leave the details to Google :) You may also want to brush up on the Factory design pattern for generating your opaque handles. In a direct answer to your question, no you can't use a void* to store a ref_ptr (without some trickery). You can, however, store a pointer to a ref_ptr as a void* . Then when you need to use it, convert it like this to avoid having to double dereference it every time you use it. Code: ref_ptr Node node = *reinterpret_cast ref_ptr Node *(mysteryPtr); And don't forget to delete the pointer to the ref_ptr when you're done. if you leak the ref_ptr the node will never get collected. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46372#46372 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Maintaining a reference to an osg node outside of osg
Hi, On Fri, Mar 16, 2012 at 4:43 PM, John Kaniarz john.kani...@us.army.mil wrote: What you're trying to do is the PIMPL design pattern. I'll leave the details to Google :) You may also want to brush up on the Factory design pattern for generating your opaque handles. In a direct answer to your question, no you can't use a void* to store a ref_ptr (without some trickery). You can, however, store a pointer to a ref_ptr as a void* . Then when you need to use it, convert it like this to avoid having to double dereference it every time you use it. If I do this, then I need to maintain the underlying ref_ptr object no? This isn't particularly convenient. What was wrong with assigning the osg::Node's pointer to mysteryPtr instead? Basically with ... osg::ref_ptrosg::Node someNode; mysteryPtr = someNode.Get(); As long as the pointer returned by the Get() method is valid for the lifetime of the object I'm safe right? Then if I want to do anything with object: osg::ref_ptrosg::Node someNode = some_cast_callosg::Node*(mysteryPtr); someNode-partyAllDay(); Code: ref_ptr Node node = *reinterpret_cast ref_ptr Node *(mysteryPtr); And don't forget to delete the pointer to the ref_ptr when you're done. if you leak the ref_ptr the node will never get collected. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46372#46372 ___ 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] Texture repeats and overlaps when I don't want it to
Hi, This turned out to be a problem with the image itself rather than my code. On most PNG viewers, it looks like a normal image. When I viewed it using Internet Explorer, it overlaps itself the same way it does on my texturing. I got this image from my client so I don't know how it was created. It could be that it is an animated PNG and the overlap is what you see if you try to view it in a viewer that doesn't support animated PNG. I'll talk to them and see what the problem is. If it's an animated PNG, I may be looking for an editor to allow me to save it as a single PNG image. Thank you! Cheers, Zachary -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46374#46374 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Question with offscreen rendering.
Hi, These are the steps I would like to produce. 1. Have multiple nodes(well call these nodes 'roots') 2. Each 'root' and it's tree renders to it's own off-screen buffer. 3. Have a few 2d triangles(black) rendered in 2d space over the top. 4. Where ever there is black convert the area to transparent(a sort of custom clip plane idea.) 5. Render each off screen buffer to the screen(in a certain order). I'm quite sure osg can do all of the above, but I'm not sure of number 4? Is it possible(and I mean very quickly) to convert solid black to transparent when I come to rendering the off-screen buffers to the main screen? ... Thank you! Cheers, Paul -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46376#46376 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org