Re: [osg-users] VPB: Multitexture control question
Hi, BTW, did you place the high res images on a different layer when using vpb? jp J.P. Delport wrote: Hi, Alejandro Aguilar Sierra wrote: Hello: I have a terrain with two layers of texture, the first one is from bluemarble and the other is a landsat image of much higher resolution. I first tested the multitexturecontrol example with just one landsat image and it works fine: from a distance it shows only the bluemarble layer. When I approach to the terrain, it fades to the landsat image. Next I rebuild the terrain, this time with all the mosaic of landsat images over Mexico (image attached). Now it shows landsat images from any distance. I have been playing with the maxElevationTransition parameter in the source code without any change. Any hint? you can just call setTextureWeight manually to get whatever mix of textures you want. The example only shows one possible way to use it, where the weight is coupled to height. jp Regards. -- A. ___ 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] New OpenGL texture object and buffer object pool support
Hi Robert, Robert Osfield wrote: A word of warning though, I have almost completely rewritten the way that the backend that drives texture objects and buffer objects, even when you don't enable the texture/buffer object pools, the code managing the GL objects is still completely different. With major changes like this comes the likelihood of regressions. I've been doing a range of tests at my end, but it's still far more limited in scope to what the community will expose the OSG to, so... there you may way see problems that I haven't. The best I can do is endeavor to get them fixed as quickly as possible, just let me know if you see something odd and I we can work together to spot what the underlying problem and squish it. The more testing we can get the quicker we can shape the code up to being release quality. I have problems with PBOs since updating to the latest svn. I'm not setting any pool env variables. One can recreate the problem with osgmovie. E.g. $ osgmovie --mouse --interactive --shaders -e ffmpeg file.avi _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 GLBufferObjectSet::GLBufferObjectSet _profile._size=1228800 Error numInList + _orphanedTextureObjects.size() != _numOfTextureObjects numInList = 1 _orphanedTextureObjects.size() = 0 _pendingOrphanedTextureObjects.size() = 0 _numOfTextureObjects = 0 terminate called after throwing an instance of 'char const*' Aborted Can you confirm if this happens on your side too? jp Have fun with it :-) Robert. ___ 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] [osgPPU] Multisampling/RenderBuffer Support
I'm looking at similar requirements and was looking at osgPPU today to see if multisampling was implemented. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17919#17919 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New OpenGL texture object and buffer object pool support
The benefit the GL object pools provide is that we can scale up the scene graph in main memory without blowing OpenGL driver and GPU memory as we would do without the new pools. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17920#17920 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
To compile, is there a way to avoid using the debug libraries of openthreads, fftw and osgviewer? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17921#17921 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to open OSG in a CView MFC ?
Hi Cory No it don’t do what I want. In fact the CMDIChildWnd in which the 3D scene should be open is at the good place But the 3D scene is not in the CMDIChildWnd If I do a ctrl+tab I have this result : -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17935#17935 attachment: screen.jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB: Is it possible to use a texture atlas over a vpb generated terrain?
Hi Alejandro, On Tue, Oct 6, 2009 at 1:37 AM, Alejandro Aguilar Sierra algsie...@gmail.com wrote: Is it possible to use a texture atlas over a vpb generated terrain? How? You just decorate your scene graph with the StateSet that contains your texture, and a use a TexGenNode to generate the coordinates. Or which is the best way to be able to supperpose many time dependent different textures over a terrain? I'm afraid this question is too open ended for me to answer. Do you at the same time? What do exactly you mean by super impose in this context? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setUpViewerAsEmbeddedInWindow and wxPython glcanvas
Hi Randolf, I have never tried what you are doing but, but use of GraphicsWindowEmbedded feature of osgViewer is pretty straightforward, have a look at the osgviewerSDL and osgviewerGLUT examples for guidance, your own code shouldn't need to be much different than these. Robert. On Tue, Oct 6, 2009 at 3:39 AM, Randolph Fritz rfritz...@gmail.com wrote: Does anyone have an example of this? I'm developing a C++ class that I'm importing via Boost.python. I can't figure out what arguments to pass, what methods to call, or when to call them. yet I know people have done this. Anyone? -- Randolph Fritz design machine group, architecture department, university of washington rfr...@u.washington.edu -or- rfritz...@gmail.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New OpenGL texture object and buffer object pool support
HI J.P., On Tue, Oct 6, 2009 at 8:26 AM, J.P. Delport jpdelp...@csir.co.za wrote: I have problems with PBOs since updating to the latest svn. I'm not setting any pool env variables. One can recreate the problem with osgmovie. E.g. $ osgmovie --mouse --interactive --shaders -e ffmpeg file.avi _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 GLBufferObjectSet::GLBufferObjectSet _profile._size=1228800 Error numInList + _orphanedTextureObjects.size() != _numOfTextureObjects numInList = 1 _orphanedTextureObjects.size() = 0 _pendingOrphanedTextureObjects.size() = 0 _numOfTextureObjects = 0 terminate called after throwing an instance of 'char const*' Aborted Can you confirm if this happens on your side too? Just tested this and I can confirm it happens for me too. I did have this working as it was one of the elements I first tested, but alas there has clearly been a regression as I completed the rest of the task. I will investigate what had gone a miss. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problem with NodeCallback at the root node
Hi, I have a scene graph with a number of animated nodes which make use of osg::AnimationPathCallback. Now I wanted to register a NodeCallback at the root node of the scene graph (which is of type Group) in order to do certain operations that have to be done once per frame, and which are not related to a particular subgraph or node of the scene graph. However, when I register a NodeCallback at the root node, all animated objects become invisible. I have the suspicion that the update callbacks of the animated objects are not called any more. The NodeCallback itself does nothing yet. Am I missing something? For example, do I have to do something specific in the NodeCallback at the root to make sure that the update callbacks of children are being called? What about data variance? Do I have to set the data variance of the root to DYNAMIC when I use update callbacks? As a workaround, I added a new child node of type Group of the root node, and I registered the NodeCallback at this child node instead. If I do this, the animated objects are shown again, and everything works fine. However, I would like to not have to use this workaround. Any ideas what I could be doing wrong? ... Thank you! Cheers, Karl Wurzel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17939#17939 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Pankaj, If you don't require the debug versions I think you can simply put in the names of the release versions in their place within CMake. And a little word to the wise, posting without signing with your name really gets on peoples wick here. All the forum posts get forwarded to a mailing list where we don't get the benefit of avatars and user names to identify people. So by signing off we all know who we're addressing and it contributes to keeping a friendly community. Regards, Kim. 2009/10/6 pankaj nagarkoti pankajnagarkot...@gmail.com To compile, is there a way to avoid using the debug libraries of openthreads, fftw and osgviewer? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17921#17921 ___ 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] [SOLVED] Problem with NodeCallback at the root node
OK, I solved the problem myself. If I call traverse(node, nv) in the NodeCallback, the animated objects are shown again, even if the NodeCallback is registered at the root node. ... Cheers, Karl -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17943#17943 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Import models from 3DS
Hi Felipe, Please check the textures' paths are correct (you may try loading your 3DS with a specialized viewer). It often happens that the 3DS file has reference to a file that has moved. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Felipe Lemus yoindra...@hotmail.com a écrit : Hi, I am trying to import some models from 3DS to OSG with the aim to create a scene in a road. I can load the models without problems, but the models have not colour they are white. I am reading different posts in the forum, and I am sure that OSG load model textures good. Is there any problem with that?, or this is in this way and I have to add colour to the model with OSG? If it is the second one, can you help me? Thank you very much! Cheers, Felipe -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17900#17900 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Loading a model
ErrIn C and C++ a single '\' indicates a control character to follow and not a directory slash you need to use a double '\\' or a single forward slash '/' ( I would have thought you would be seeing warnings about unrecognized control characters when you compile' osg::Node* pLoadedModel = osgDB::readNodeFile( C:\\Programme\\ADTF\\2.1.1\\lib\\OpenSceneGraph-2.6.1\\bin\\tour.obj ); or osg::Node* pLoadedModel = osgDB::readNodeFile( C:/Programme/ADTF/2.1.1/lib/OpenSceneGraph-2.6.1/bin/tour.obj ); 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 Giering Joseph Sent: Saturday, October 03, 2009 10:26 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [osgPlugins] Loading a model Hi, I have a problem to load a model by using this code: // load model osg::Node* pLoadedModel = osgDB::readNodeFile( C:\Programme\ADTF\2.1.1\lib\OpenSceneGraph-2.6.1\bin\tour.obj ); if(!pLoadedModel) { std::cout Error: Couldn't find model! std::endl; } m_pTransform-addChild(pLoadedModel); GetRoot()-addChild(m_pTransform.get()); The readNodeFile can't find the tour object-file. Where needs the file to be stored? Must I compile the obj-plugin? How Can I compile this plugin? Thank you! Cheers, GI Jo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17829#17829 ___ 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] [osgPlugins] Loading an image to a texture
Again your using single back ssahes in you file name string for the textures either use '\\' or '/' 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 Giering Joseph Sent: Saturday, October 03, 2009 10:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [osgPlugins] Loading an image to a texture Hi, I have a problem to load an image to a texture by using this code. // create drawable geometry object osg::Geometry* pGeo = new osg::Geometry; // add 4 vertices creating a quad osg::Vec3Array* pVerts = new osg::Vec3Array; pVerts-push_back( osg::Vec3( 0, 0, 0 ) ); pVerts-push_back( osg::Vec3( 1, 0, 0 ) ); pVerts-push_back( osg::Vec3( 1, 0, 1 ) ); pVerts-push_back( osg::Vec3( 0, 0, 1 ) ); pGeo-setVertexArray( pVerts ); // create a primitive set osg::DrawElementsUInt* pPrimitiveSet = new osg::DrawElementsUInt( osg::PrimitiveSet::QUADS, 0 ); pPrimitiveSet-push_back( 3 ); pPrimitiveSet-push_back( 2 ); pPrimitiveSet-push_back( 1 ); pPrimitiveSet-push_back( 0 ); pGeo-addPrimitiveSet( pPrimitiveSet ); // create an arraw for texture coordinates osg::Vec2Array* pTexCoords = new osg::Vec2Array( 4 ); (*pTexCoords)[0].set( 0.0f, 0.0f ); (*pTexCoords)[1].set( 1.0f, 0.0f ); (*pTexCoords)[2].set( 1.0f, 1.0f ); (*pTexCoords)[3].set( 0.0f, 1.0f ); pGeo-setTexCoordArray( 0, pTexCoords ); // create geometry node that will contain all our drawables osg::Geode* pGeode = new osg::Geode; osg::StateSet* pStateSet = pGeode-getOrCreateStateSet(); pStateSet-setMode( GL_LIGHTING, osg::StateAttribute::OFF ); pGeode-addDrawable( pGeo ); // load and set texture attribute and mode osg::Texture2D* pTex = new osg::Texture2D; //osg::Image* pImage = osgDB::readImageFile ( HUD_Maennchen.jpeg ); osg::Image* pImage = osgDB::readImageFile( C:\Programme\ADTF\\2.1.1\lib\OpenSceneGraph-2.6.1\bin\HUD_Maennchen.jpe g ); if(!pImage) { std::cout Error: Couldn't find texture! std::endl; } pTex-setImage( pImage ); pStateSet-setTextureAttributeAndModes( 0, pTex, osg::StateAttribute::ON ); pGeo-setStateSet(pStateSet); m_pTransform-addChild(pGeode); GetRoot()-addChild(m_pTransform.get()); The image can't be found by readNodeFile. Where needs the image-file to be stored? Must I compile the jpeg-plugin? How can I compile this plugin? Thank you! Cheers, GI Jo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17828#17828 ___ 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] lots of failed tasks: Resuming vpbmaster run
Hi Robert, at the moment I dont Use a Cluster, I would be happy if i could compile the large dateset one with the local 8 cores (I tried tu run it localle with 2 up to 8 cores) For smaller Datebases I used SSHFS as lightweight cluster filesystem, it worked great. Because running the osgdem tasks manually works great, I asume that vpbmaster uses a lot of any (at the moment) unknown ressources while building all task files. Therefore the osgdem process crashes if vpbmaster starts them. If could divide the taskfile creation from the osgdem calls, it should work. Because I move to another city, I cannot spend time into the project for the next two weeks, so I will resume this topics if I continue to work. Some last important questions: Which Kubuntu version do you use? Is it 32 or 64 bit? Is the database output generated by a 64bit system compatible for using with 32bit osg software? Is it possible to get an Wiki account? I would like to oprovide my self written tutorials to the community. Thank you for your help, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17952#17952 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] lots of failed tasks: Resuming vpbmaster run
Hi Torben, On Tue, Oct 6, 2009 at 1:31 PM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Some last important questions: Which Kubuntu version do you use? Is it 32 or 64 bit? I use Kubuntu 9.04 64bit right now. I've used 32bit and 64bit version of Kubuntu for the last two year during the development VPB. Is the database output generated by a 64bit system compatible for using with 32bit osg software? The databases are completely agnostic to the build or target systems configuration, you can build in 32bit and run in 64bit and visa-versa. Is it possible to get an Wiki account? I would like to oprovide my self written tutorials to the community. Just go to the wiki and create an account. Then you'll just need to have permission added to be able to write. Once you've created an account just notify myself or Jose Luis Hidalgo about getting write permission. Write permission now has to be explictly granted as spammers we're abusing openscenegraph.org :-| Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn'twork)
Johannes, Were you able to solve your problem ? I have just developed some code using Texture2DArray for shadow projection and CLAMP_TO_BORDER seems to work there. Maybe something else is wron in your example ? Actually I looked at your example again and it does not match the description. You say that you add two images but example clearly shows that you access one layer of Texture2DArray. I guess something like your code could maybe work with Texture3D where linear filter would interpolate between two layers. But Texture2DArray works like nearest on the trhird coordinate. Write more about your problem maybe we could help if you still need it. Cheers, Wojtek - Original Message - From: Johannes SchA1th acco...@jotschi.de To: osg-users@lists.openscenegraph.org Sent: Monday, October 05, 2009 6:54 PM Subject: Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn'twork) If i had read the specs earlier i would probably also remember the section you mentioned. Are there any other possible issues regarding this problem? Wojciech Lewandowski wrote: Hi Johannes, My apologies, I must have misinterpreted this pragraph of the spec: Otherwise i'm really stuck here. Greetings Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17908#17908 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Pankaj, To compile, is there a way to avoid using the debug libraries of openthreads, fftw and osgviewer? In addition to what Kim mentioned, depending on what platform you're working on, there might be an additional issue. On Linux it doesn't make any difference, so you can do what Kim said (put the release versions in the debug fields). But on Windows, linking release libraries that use the C++ runtime into a debug executable that also uses the C++ runtime will cause crashes in your application. In other words, for all C++ libraries you're using, you need to match debug to debug and release to release. For pure C libraries it doesn't matter, so in your list, you could use the release version of fftw in both debug and release builds of your application. But OpenThreads and osgViewer are C++ libraries so if you ever want to compile your app in debug mode (and I assume you will) then you'll need to link it to debug versions of these libraries. This has been discussed a lot on this list in the past. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Kim, Kim Bale kcb...@googlemail.com wrote: Hi Pankaj, If you don't require the debug versions I think you can simply put in the names of the release versions in their place within CMake. Could the CMakeFile.txt be fixed that if no debug version is found cmake doesn't fail? I want to build a release (default) and it fails because the debug version of OSG is not there - it shouldn't be required for building release and/or if not on Windows (you can safely mix debug/release except on Windows). Also, on Linux there is usually no d suffix for debug versions - OSG has a macro to deal with that. Furthermore, you may want to fix the following to bring osgOcean in line with the other plugins/nodekits regarding installation - headers should be installed under osgOcean subdir and the shared lib should go into the lib not bin subdirectory. $ svn diff src/osgOcean/CMakeLists.txt Index: src/osgOcean/CMakeLists.txt === --- src/osgOcean/CMakeLists.txt (revision 128) +++ src/osgOcean/CMakeLists.txt (working copy) @@ -117,10 +117,10 @@ INSTALL( TARGETS osgOcean - LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib - PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/osgOcean ) INSTALL( signature.asc Description: This is a digitally signed message part. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] lots of failed tasks: Resuming vpbmaster run
Hi all, Le mardi 06 octobre 2009 à 12:31 +, Torben Dannhauer a écrit : Hi Robert, at the moment I dont Use a Cluster, I would be happy if i could compile the large dateset one with the local 8 cores (I tried tu run it localle with 2 up to 8 cores) For smaller Datebases I used SSHFS as lightweight cluster filesystem, it worked great. Because running the osgdem tasks manually works great, I asume that vpbmaster uses a lot of any (at the moment) unknown ressources while building all task files. Therefore the osgdem process crashes if vpbmaster starts them. If could divide the taskfile creation from the osgdem calls, it should work. If you want to know which low level operation fail using vpbmaster you could maybe try using strace... strace -v -o /tmp/vpbmaster.log vpbmaster Take care the log can rapidly increase, but it should give you a complete report about all operations done. Pierre. Because I move to another city, I cannot spend time into the project for the next two weeks, so I will resume this topics if I continue to work. Some last important questions: Which Kubuntu version do you use? Is it 32 or 64 bit? Is the database output generated by a 64bit system compatible for using with 32bit osg software? Is it possible to get an Wiki account? I would like to oprovide my self written tutorials to the community. Thank you for your help, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17952#17952 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Pierre BOURDIN I.M.E.R.I.R. Av. Pascot BP 90443 66004 PERPIGNAN tél: 04 68 56 84 95 fax: 04 68 55 03 86 email: bour...@imerir.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Jan, Could the CMakeFile.txt be fixed that if no debug version is found cmake doesn't fail? I want to build a release (default) and it fails because the debug version of OSG is not there - it shouldn't be required for building release and/or if not on Windows (you can safely mix debug/release except on Windows). Also, on Linux there is usually no d suffix for debug versions - OSG has a macro to deal with that. The OSG libraries are found using the Findosg*.cmake that come with CMake. Looking at Findosg_functions.cmake (in my CMake install dir/share/cmake-2.6/Modules) I see this: if(NOT ${module_uc}_LIBRARY_DEBUG) # They don't have a debug library set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE) set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE) else() # They really have a FOO_LIBRARY_DEBUG set(${module_uc}_LIBRARIES optimized ${${module_uc}_LIBRARY} debug ${${module_uc}_LIBRARY_DEBUG} PARENT_SCOPE ) endif() Which if I'm reading right, means that if no debug library was found, it will set the debug library to the same value as the release library. I think that should do what you want? Maybe check which version of CMake you have, and whether your Findosg_functions.cmake has this code. In any case, tweaking how the OSG libraries are found/used will mean copying the Findosg*.cmake modules to be local to the project, and tweaking them there. I'd be hesitant to do that since we then take on the responsibility of maintaining our copies of them in the future. So if you can live with manually setting the debug library to the same value as the release library (which you'll need to do only once because then the values are cached for the next time you need to run cmake) then that might be better. Or perhaps we can submit a patch to the Findosg*.cmake modules that come with CMake to add an option to do what you want. If you want you can investigate this path. In any case, I'm not that familiar with CMake so I just read the code and try to make sense of it, if we want to do something more complicated I'd consult Philip Lowman who seems to be really comfortable with CMake :-) Furthermore, you may want to fix the following to bring osgOcean in line with the other plugins/nodekits regarding installation - headers should be installed under osgOcean subdir and the shared lib should go into the lib not bin subdirectory. Committed to SVN trunk. Thanks for the patch. 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] New OpenGL texture object and buffer object pool support
Hi J.P. On Tue, Oct 6, 2009 at 9:01 AM, Robert Osfield robert.osfi...@gmail.com wrote: Just tested this and I can confirm it happens for me too. I did have this working as it was one of the elements I first tested, but alas there has clearly been a regression as I completed the rest of the task. I will investigate what had gone a miss. I have now tracked down the problem to a bug in the reassignment of TextureObject to a new TextureObjectSet, this is now fixed along with a couple of other bugs due to the unrefAfterApply not being disabled when the texture pool is enabled. These fixes are now checked into svn/trunk. I am currently seeing GL errors reported when running osgmovie of the form: Warning: detected OpenGL error 'invalid enumerant' after applying attribute TextureRectangle 0x1fdb4e0 With the onscreen image being corrupted, while if I select a Texture2D using the osgmovie command line option --texture2D I get: Warning: detected OpenGL error 'invalid enumerant' after applying attribute Texture2D 0x1c724e0 But the onscreen image is correct. If comment out the assignment of the PixelBufferObject in the ImageStream constructor the on screen errors and the console warnings all disappear so it looks to be a PBO issue of some kind. I've only tried out this on my ATI card so far so it could be driver issue. What results do you get with the bug fixes I've just checked in? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB: Multitexture control question
Yes. Bluemarble is in layer 0 and Landsat in layer 1. Using just one landsat image it works like a charm. If I use all, as in the image I sent, they are present both all times o matter how far and close I go. -- A. On Tue, Oct 6, 2009 at 2:12 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi, BTW, did you place the high res images on a different layer when using vpb? jp J.P. Delport wrote: Hi, Alejandro Aguilar Sierra wrote: Hello: I have a terrain with two layers of texture, the first one is from bluemarble and the other is a landsat image of much higher resolution. I first tested the multitexturecontrol example with just one landsat image and it works fine: from a distance it shows only the bluemarble layer. When I approach to the terrain, it fades to the landsat image. Next I rebuild the terrain, this time with all the mosaic of landsat images over Mexico (image attached). Now it shows landsat images from any distance. I have been playing with the maxElevationTransition parameter in the source code without any change. Any hint? you can just call setTextureWeight manually to get whatever mix of textures you want. The example only shows one possible way to use it, where the weight is coupled to height. jp Regards. -- A. ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Jan, J-S, I was actually thinking about how to fix the debug library issue since pankaj mentioned it, it does appear to be a common request. I did a quick google and I think it is possible to setup CMake to configure single build types if required. If that is the case, then I think providing a cmake option of release/release+debug builds would be preferable to using a script that automatically places release libs in the place of debug libs. Doing it automatically could easily create confusion should people not notice the release/debug mix in cmake. I'll take a look at it this evening and see if it can be done easily. Jan - cheers for the fix, I must have overlooked that. Regards, Kim. 2009/10/6 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Jan, Could the CMakeFile.txt be fixed that if no debug version is found cmake doesn't fail? I want to build a release (default) and it fails because the debug version of OSG is not there - it shouldn't be required for building release and/or if not on Windows (you can safely mix debug/release except on Windows). Also, on Linux there is usually no d suffix for debug versions - OSG has a macro to deal with that. The OSG libraries are found using the Findosg*.cmake that come with CMake. Looking at Findosg_functions.cmake (in my CMake install dir/share/cmake-2.6/Modules) I see this: if(NOT ${module_uc}_LIBRARY_DEBUG) # They don't have a debug library set(${module_uc}_LIBRARY_DEBUG ${${module_uc}_LIBRARY} PARENT_SCOPE) set(${module_uc}_LIBRARIES ${${module_uc}_LIBRARY} PARENT_SCOPE) else() # They really have a FOO_LIBRARY_DEBUG set(${module_uc}_LIBRARIES optimized ${${module_uc}_LIBRARY} debug ${${module_uc}_LIBRARY_DEBUG} PARENT_SCOPE ) endif() Which if I'm reading right, means that if no debug library was found, it will set the debug library to the same value as the release library. I think that should do what you want? Maybe check which version of CMake you have, and whether your Findosg_functions.cmake has this code. In any case, tweaking how the OSG libraries are found/used will mean copying the Findosg*.cmake modules to be local to the project, and tweaking them there. I'd be hesitant to do that since we then take on the responsibility of maintaining our copies of them in the future. So if you can live with manually setting the debug library to the same value as the release library (which you'll need to do only once because then the values are cached for the next time you need to run cmake) then that might be better. Or perhaps we can submit a patch to the Findosg*.cmake modules that come with CMake to add an option to do what you want. If you want you can investigate this path. In any case, I'm not that familiar with CMake so I just read the code and try to make sense of it, if we want to do something more complicated I'd consult Philip Lowman who seems to be really comfortable with CMake :-) Furthermore, you may want to fix the following to bring osgOcean in line with the other plugins/nodekits regarding installation - headers should be installed under osgOcean subdir and the shared lib should go into the lib not bin subdirectory. Committed to SVN trunk. Thanks for the patch. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Jean-Sébastien, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Jan, Could the CMakeFile.txt be fixed that if no debug version is found cmake doesn't fail? I want to build a release (default) and it fails because the debug version of OSG is not there - it shouldn't be required for building release and/or if not on Windows (you can safely mix debug/release except on Windows). Also, on Linux there is usually no d suffix for debug versions - OSG has a macro to deal with that. The OSG libraries are found using the Findosg*.cmake that come with CMake. Looking at Findosg_functions.cmake (in my CMake install dir/share/cmake-2.6/Modules) I see this: I have checked this, the code is there. I have cmake-2.6.3. Which if I'm reading right, means that if no debug library was found, it will set the debug library to the same value as the release library. I think that should do what you want? Yes. Maybe check which version of CMake you have, and whether your Findosg_functions.cmake has this code. It does. But I am getting this: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OPENTHREADS_LIBRARY_DEBUG linked by target osgOcean in directory /home/janoc/tmp/download/osgocean-read-only/src/osgOcean It finds the non-debug OSG successfully but fails on finding debug version of OpenThreads (which I didn't compile, I have only release one). I think the issue is in the FindOpenThreads.cmake lacking the code you have pointed out. So if you can live with manually setting the debug library to the same value as the release library (which you'll need to do only once because then the values are cached for the next time you need to run cmake) then that might be better. I can live with it for the time being, but it should be fixed, IMO. Committed to SVN trunk. Thanks for the patch. Welcome. Regards, Jan signature.asc Description: This is a digitally signed message part. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean 1.0 (LGPL) Released
Hi Jan, Thanks for the investigations on your machine. It finds the non-debug OSG successfully but fails on finding debug version of OpenThreads (which I didn't compile, I have only release one). I think the issue is in the FindOpenThreads.cmake lacking the code you have pointed out. Yeah, ok so for that we can easily send a patch to the CMake project. However: I can live with it for the time being, but it should be fixed, IMO. Well if Kim can get what he said working, it would be even better. I agree that silently using the release lib in a debug build would be bad (on Windows at least, and there's no platform guard for this in the CMake module's code). At the very least it should warn that it's doing this, but even better would be setting up our project so that we can do release-only or release+debug builds as required. So good luck Kim, hope you get it working without too much trouble! 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] VPB: Multitexture control question
Have you tried manually using setTextureWeight? Any hint? you can just call setTextureWeight manually to get whatever mix of textures you want. The example only shows one possible way to use it, where the weight is coupled to height. jp -- 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] Texture Wrapping Texture2DArray (Clamping doesn't work)
No, not yet. But its a good news to hear that you managed to use CLAMP_TO_BORDER - Perhaps this might be a driver problem or maybe there is just a problem with my code. Yes - i use only one texture in the shader - but i have to add two textures to the texture array to make it work. You must add at least two textures otherwise it might not work. Wojciech Lewandowski wrote: Johannes, I guess something like your code could maybe work with Texture3D where linear filter would interpolate between two layers. But Texture2DArray works like nearest on the trhird coordinate. Write more about your problem maybe we could help if you still need it. I think i will try to isolate the problem and present it in a small example. Greetings Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17963#17963 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Perspective Axes Rotation Indicator
Hi Osg-Users, Here's a topic that I cannot seem to find any reference in the archives for. I'm trying to create an Axes rotation indicator Glyph in the lower left-hand corner of our viewer (X, Y, Z). I've got working code for this (see below), but it is an orthographic projection, while my scene is perspective. The axes rotation indicator works correctly, (e.g. it correctly matches the rotation of the trackball scene) but because it is ortho and the scene is perspective, it's quite jarring to the user. Can someone suggest how I can modify the code below so that it correctly maps the axes in perspective (ideally, the same perspective frustum as my scene)? Many thanks. Sean Code --- #ifndef OsgAxes_h #define OsgAxes_h // OSG Includes #include osg/Group #include osg/Geometry #include osg/Camera #include osg/Quat #include osg/MatrixTransform #include osg/Referenced #include osg/NodeCallback #include osgGA/TrackballManipulator class OsgAxes : public osg::Group { public: // Public Constructor explicit OsgAxes(const osgGA::TrackballManipulator trackball); // Public Destructor virtual ~OsgAxes(); void updateCurrentRotation(); private: osg::Geometry *createAxes(); // Prevent Copy Assignment OsgAxes(const OsgAxes ); OsgAxes operator=(const OsgAxes ); osg::ref_ptrosg::MatrixTransform m_rotation; const osgGA::TrackballManipulator m_trackball; }; class AxesNodeCallback : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::ref_ptrOsgAxes axes = dynamic_castOsgAxes* (node); if(axes) { axes-updateCurrentRotation(); } traverse(node, nv); } }; OsgAxes::OsgAxes(const osgGA::TrackballManipulator trackball) : m_trackball(trackball) { osg::Camera *camera = new osg::Camera; //camera-setProjectionMatrix(osg::Matrix::ortho2D(0, 1280, 0, 1024)); camera-setProjectionMatrix(osg::Matrix::ortho2D(0, 1280, 0, 1024)); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setViewMatrix(osg::Matrix::identity()); camera-setClearMask(GL_DEPTH_BUFFER_BIT); camera-setRenderOrder(osg::Camera::POST_RENDER); camera-setAllowEventFocus(false); osg::Geode* geode = new osg::Geode(); // turn lighting off for the text and disable depth test to ensure it's always ontop. osg::StateSet* stateset = geode-getOrCreateStateSet(); stateset-setMode(GL_LIGHTING,osg::StateAttribute::OFF); geode-addDrawable(createAxes()); m_rotation = new osg::MatrixTransform(); m_rotation-setMatrix(osg::Matrix::identity()); m_rotation-addChild(geode); osg::MatrixTransform *scale = new osg::MatrixTransform(); scale-setMatrix(osg::Matrix::scale(osg::Vec3(100.0f, 100.0f, 100.0f))); scale-addChild(m_rotation.get()); osg::MatrixTransform *translate = new osg::MatrixTransform(); translate-setMatrix(osg::Matrix::translate(osg::Vec3(100.0f, 100.0f, 0.0f))); translate-addChild(scale); camera-addChild(translate); addChild(camera); setUpdateCallback(new AxesNodeCallback); } OsgAxes::~OsgAxes() { } osg::Geometry * OsgAxes::createAxes() { osg::Geometry* geom = new osg::Geometry; osg::Vec3Array* vertices = new osg::Vec3Array; vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.5f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.5f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 1.0f)); geom-setVertexArray(vertices); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,0.0f,1.0f)); geom-setNormalArray(normals); geom-setNormalBinding(osg::Geometry::BIND_OVERALL); osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4(1.0f,0.0,0.0f,1.0f)); colors-push_back(osg::Vec4(0.0f,1.0,0.0f,1.0f)); colors-push_back(osg::Vec4(0.0f,0.0,1.0f,1.0f)); geom-setColorArray(colors); geom-setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); geom-addPrimitiveSet(new osg::DrawArrays(GL_LINES,0,6)); osg::StateSet* stateset = geom-getOrCreateStateSet(); osg::LineWidth *lw = new osg::LineWidth(2.0f); stateset-setAttribute(lw); return geom; } void OsgAxes::updateCurrentRotation() { osg::Matrix mat(m_trackball.getRotation().inverse()); m_rotation-setMatrix(mat); } --- End Code ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB: Multitexture control question
Yes, from multitexturecontrol example, I wrote a program in which, key 2 brings layer 2, key 3 brings layer 3 (assigning 1.o to their weights). But I really would like it to work based on distance, as the example is intended for. Regards, -- A. On Tue, Oct 6, 2009 at 9:21 AM, J.P. Delport jpdelp...@csir.co.za wrote: Have you tried manually using setTextureWeight? Any hint? you can just call setTextureWeight manually to get whatever mix of textures you want. The example only shows one possible way to use it, where the weight is coupled to height. jp -- 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB: Multitexture control question
Hi, Alejandro Aguilar Sierra wrote: Yes, from multitexturecontrol example, I wrote a program in which, key 2 brings layer 2, key 3 brings layer 3 (assigning 1.o to their weights). But I really would like it to work based on distance, as the example is intended for. if manual setting works it probably means that distances in the example are not what is expected. Maybe print out some values for elevation in ElevationLayerBlendingCallback and try to follow what it is doing. jp Regards, -- A. On Tue, Oct 6, 2009 at 9:21 AM, J.P. Delport jpdelp...@csir.co.za wrote: Have you tried manually using setTextureWeight? Any hint? you can just call setTextureWeight manually to get whatever mix of textures you want. The example only shows one possible way to use it, where the weight is coupled to height. jp -- 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 ___ 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] Perspective Axes Rotation Indicator
Hi Sean, Le mardi 06 octobre 2009 à 09:26 -0500, Sean Spicer a écrit : Hi Osg-Users, Here's a topic that I cannot seem to find any reference in the archives for. I'm trying to create an Axes rotation indicator Glyph in the lower left-hand corner of our viewer (X, Y, Z). I've got working code for this (see below), but it is an orthographic projection, while my scene is perspective. The axes rotation indicator works correctly, (e.g. it correctly matches the rotation of the trackball scene) but because it is ortho and the scene is perspective, it's quite jarring to the user. Can someone suggest how I can modify the code below so that it correctly maps the axes in perspective (ideally, the same perspective frustum as my scene)? Maybe you could have look at delta3d Compass class: http://delta3d.sourceforge.net/API/html/classdt_core_1_1_compass.html I think it is doing exactly what you're looking for... Many thanks. Cheers, Pierre. Sean Code --- #ifndef OsgAxes_h #define OsgAxes_h // OSG Includes #include osg/Group #include osg/Geometry #include osg/Camera #include osg/Quat #include osg/MatrixTransform #include osg/Referenced #include osg/NodeCallback #include osgGA/TrackballManipulator class OsgAxes : public osg::Group { public: // Public Constructor explicit OsgAxes(const osgGA::TrackballManipulator trackball); // Public Destructor virtual ~OsgAxes(); void updateCurrentRotation(); private: osg::Geometry *createAxes(); // Prevent Copy Assignment OsgAxes(const OsgAxes ); OsgAxes operator=(const OsgAxes ); osg::ref_ptrosg::MatrixTransform m_rotation; const osgGA::TrackballManipulator m_trackball; }; class AxesNodeCallback : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::ref_ptrOsgAxes axes = dynamic_castOsgAxes* (node); if(axes) { axes-updateCurrentRotation(); } traverse(node, nv); } }; OsgAxes::OsgAxes(const osgGA::TrackballManipulator trackball) : m_trackball(trackball) { osg::Camera *camera = new osg::Camera; //camera-setProjectionMatrix(osg::Matrix::ortho2D(0, 1280, 0, 1024)); camera-setProjectionMatrix(osg::Matrix::ortho2D(0, 1280, 0, 1024)); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setViewMatrix(osg::Matrix::identity()); camera-setClearMask(GL_DEPTH_BUFFER_BIT); camera-setRenderOrder(osg::Camera::POST_RENDER); camera-setAllowEventFocus(false); osg::Geode* geode = new osg::Geode(); // turn lighting off for the text and disable depth test to ensure it's always ontop. osg::StateSet* stateset = geode-getOrCreateStateSet(); stateset-setMode(GL_LIGHTING,osg::StateAttribute::OFF); geode-addDrawable(createAxes()); m_rotation = new osg::MatrixTransform(); m_rotation-setMatrix(osg::Matrix::identity()); m_rotation-addChild(geode); osg::MatrixTransform *scale = new osg::MatrixTransform(); scale-setMatrix(osg::Matrix::scale(osg::Vec3(100.0f, 100.0f, 100.0f))); scale-addChild(m_rotation.get()); osg::MatrixTransform *translate = new osg::MatrixTransform(); translate-setMatrix(osg::Matrix::translate(osg::Vec3(100.0f, 100.0f, 0.0f))); translate-addChild(scale); camera-addChild(translate); addChild(camera); setUpdateCallback(new AxesNodeCallback); } OsgAxes::~OsgAxes() { } osg::Geometry * OsgAxes::createAxes() { osg::Geometry* geom = new osg::Geometry; osg::Vec3Array* vertices = new osg::Vec3Array; vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.5f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.5f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 0.0f)); vertices-push_back(osg::Vec3(0.0f, 0.0f, 1.0f)); geom-setVertexArray(vertices); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,0.0f,1.0f)); geom-setNormalArray(normals); geom-setNormalBinding(osg::Geometry::BIND_OVERALL); osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4(1.0f,0.0,0.0f,1.0f)); colors-push_back(osg::Vec4(0.0f,1.0,0.0f,1.0f)); colors-push_back(osg::Vec4(0.0f,0.0,1.0f,1.0f)); geom-setColorArray(colors); geom-setColorBinding(osg::Geometry::BIND_PER_PRIMITIVE); geom-addPrimitiveSet(new osg::DrawArrays(GL_LINES,0,6)); osg::StateSet* stateset = geom-getOrCreateStateSet(); osg::LineWidth *lw = new osg::LineWidth(2.0f); stateset-setAttribute(lw); return geom; } void OsgAxes::updateCurrentRotation() { osg::Matrix mat(m_trackball.getRotation().inverse()); m_rotation-setMatrix(mat); } --- End Code ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB: Is it possible to use a texture atlas over a vpb generated terrain?
Hi Robert: On Tue, Oct 6, 2009 at 2:56 AM, Robert Osfield robert.osfi...@gmail.com wrote: Is it possible to use a texture atlas over a vpb generated terrain? How? You just decorate your scene graph with the StateSet that contains your texture, and a use a TexGenNode to generate the coordinates. Sounds easy. Any example? I'm afraid this question is too open ended for me to answer. Do you at the same time? What do exactly you mean by super impose in this context? I have in layer 0 bluemarble textures, in layer 1 detailed landsat ones. In layer 2 I want to put an image of some physical variable, like sun ultraviolet radiation. I have one of those for each month of the year, I would like to put the January one and change it either by hand or animation until december. I tried to put all 12 images in dfferent layers but I just got a mess. I found a message in the archives in which in a similar case you suggest not using layers but atlas or 3d texture for this. How do you suggest I should do it? Regards, -- A. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] New OpenGL texture object and buffer object pool support
Hi Robert, Robert Osfield wrote: I will investigate what had gone a miss. I have now tracked down the problem to a bug in the reassignment of TextureObject to a new TextureObjectSet, this is now fixed along with a couple of other bugs due to the unrefAfterApply not being disabled when the texture pool is enabled. These fixes are now checked into svn/trunk. I am currently seeing GL errors reported when running osgmovie of the form: Warning: detected OpenGL error 'invalid enumerant' after applying attribute TextureRectangle 0x1fdb4e0 With the onscreen image being corrupted, while if I select a Texture2D using the osgmovie command line option --texture2D I get: Warning: detected OpenGL error 'invalid enumerant' after applying attribute Texture2D 0x1c724e0 But the onscreen image is correct. If comment out the assignment of the PixelBufferObject in the ImageStream constructor the on screen errors and the console warnings all disappear so it looks to be a PBO issue of some kind. I've only tried out this on my ATI card so far so it could be driver issue. What results do you get with the bug fixes I've just checked in? I've just updated and now I get a single corrupted image flashed onto the screen and then a segfault. $ osgmovie --mouse --interactive --shaders -e ffmpeg file.avi image-s()640 image-t()=480 aspectRatio=1 _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new TextureObject, _numOfTextureObjects 1 GLBufferObjectSet::GLBufferObjectSet _profile._size=1228800 Segmentation fault If I run in gdb the corrupted image stays, but I'll have to recompile with debug info to give you a more sensible backtrace. Tomorrow... have to go now. jp ---8--- Created new TextureObject, _numOfTextureObjects 1 GLBufferObjectSet::GLBufferObjectSet _profile._size=1228800 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb2952b90 (LWP 22742)] 0xb6d69e60 in ?? () from /usr/lib/libGLcore.so.1 (gdb) bt #0 0xb6d69e60 in ?? () from /usr/lib/libGLcore.so.1 Cannot access memory at address 0xa04 (gdb) thread [Current thread is 5 (Thread 0xb2952b90 (LWP 22742))] (gdb) info threads * 5 Thread 0xb2952b90 (LWP 22742) 0xb6d69e60 in ?? () from /usr/lib/libGLcore.so.1 4 Thread 0xb3c81b90 (LWP 22741) 0xb7fe1424 in __kernel_vsyscall () 3 Thread 0xb4482b90 (LWP 22740) 0xb7fe1424 in __kernel_vsyscall () 2 Thread 0xb4c83b90 (LWP 22739) 0xb7fe1424 in __kernel_vsyscall () 1 Thread 0xb62a8950 (LWP 22736) 0xb7fe1424 in __kernel_vsyscall () Robert. ___ 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] MatrixTransform and particle system
Hi Bill, Do you have a ModularEmitter and ParticleSystemUpdater? If so, where are they in the scene graph? Are you expecting the particles, after being emitted, to move with the transform or stay in the world coordinate system. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 12:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Yes sorry I should have mentioned that... I am using 2.8.2. cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-05-09 12:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, What version of osg are you using? Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 11:18 AM To: OpenSceneGraph Users Subject: [osg-users] MatrixTransform and particle system I am trying to apply a transform to a particle system like this: _transform = new osg::MatrixTransform; _transform-setMatrix(osg::Matrix::rotate(fromDir, toDir)); _geode = new osg::Geode; _geode-addDrawable(particleSystem.get()); _transform-addChild(_geode.get()); addChild(_transform.get()); Unfortunately adding the transform does not transform my particles... However if I add another geode like this before the previous code: osg::ref_ptrosg::Geode pDummy = new osg::Geode; pDummy-addDrawable(particleSystem.get()); addChild(pDummy.get()); Then I have one set of transformed particles and one set of untransformed ones. Probably I am missing something simple here ? Anyone has a suggestion ? cheers ! bill ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Clarification on use of Manipulators in CAD-Style app
Hi Robert, It seems there is a glitch with the new osgManipulator event handling and the TrackballManipulator. In the osgmanipulator example, if you keep ctrl or 'a' pressed when you rotate the trackball using the left mouse button, the trackball might get crazy (rotating of arbitrary - probably high - angle). The trick to reproduce the bug is to try to release the mouse button on a dragger. I'm able to reproduce it constantly. I was never able to reproduce it when the ctrl or 'a' key were not pressed. I tested it on revisions 10593 and 10606. Unfortunately, I did not have the time to track it down (it's not a big problem for me at the moment). I just wanted to let you know about it. Also, are there any clues about when 2.9.6 will be released(/tagged)? regards, Vincent Gadoury Robert Osfield wrote: Hi Andrew, In the svn/trunk version of the OSG I have refactored osgManipulator a bit to make it more flexible and easier to use. I would strongly suggest having a look at it as the extra complexity of CommandManager is no longer needed, also you no longer need to implement your own event handling, as osgManipulator can now automatically pick up on events. There is also a new callback support that allows you to move objects around in the scene to follow manipulators. Robert. On Fri, Sep 25, 2009 at 1:58 PM, Andrew Thompson andyb1...@yahoo.co.uk wrote: Hi there, I am developing a CAD-Style application and am interested in using osgManipulator to provide picking, moving, rotating and scaling of objects. I just have a couple of questions with regard to the use of manipulators, and hope some of you can take the time to answer them for me. Firstly my application currently has a relatively flat scenegraph, where each Object in the CAD app is arranged as follows: Code: PositionAttitudeTransform | Geode | Geometry Then I have N Objects arranged as above in the scene that are a child of the root scene node (so a flat scene graph). From my understanding from reading the osgManipulator example, to manipulate an object I can use the following hierarchy: [Image: http://i137.photobucket.com/albums/q217/andyb1979/manpulatorhierachy.png ] In this diagram Geode is the object I want to manipulate, so I would replace that with the PAT from my 3D Object implementation, Selection wraps the object to manipulate, Dragger can go anywhere in the scene and the CommandManager links the Dragger to the Selection. So -- some questions on how I may use this in my app: * Firstly, to select an object, I pick it. At this point should I create a Selection and place in-between my 3D object and SceneRoot? Or can selection be anywhere and just place the object as a child of that? * Secondly can the dragger be anywhere in the scene hierachy or must it be a parent of the selection? * Similarly, does the Selection have to be specifically put between my 3D object and the scene root (In a CAD-Style app I will be selecting/deselecting objects quite regularly) * Say my object has a transform applied to it by its PositionAttitudeTransform. I need to somehow get that transform, apply to the dragger, then let the user manipulate it and apply the resultant transform to the PAT, removing the dragger/selection from the scene. Any ideas how this could work? * Is there a way to get an event or call-back out for each translate, rotate, scale operation as I need to push these into an undo-redo stack * Finally, could the above be modified to work with multiple objects in the same selection and how would I apply the Dragger transform to all of them before/after the event? Thanks for your time, any insights would be gratefully received. Andrew[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17650#17650 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] Shader from Rendermonkey : Collada plugin
Hi, i have Only 2 questions ... about shaders! I would like to use shaders created with rendermonkey 1.81 and exported as collada 1.4.1. I'm using OpenScenegraph 2.8.0 and 2.8.2. First question: Using Osg 2.8.0 I run viewer.exe with myfile.dae (a specular bump effect with teapot as model). The result is a black teapot with some red effect. On the console system reports unsupported effect profile profile_GLSL! What does it mean? What is the solution? Where i can find supported and unsupported effect? (I have an NVIDIA QUADRO FX 4600, and rendermonkey render my teapot correctly!) Second question: Using Osg2.8.2 I have download the collada package and i have compiled the vc8 dom 1.4 solution correctly (release and debug). With CMAKE i get the new openscenegraph solution with DAE plugin. But ... when i compile openscenegraph solution, in the linking phase, compiler says : dom\build\vc8-1.4-d\libcollada14dom21-d.dll : fatal error LNK1107: file damaged or not valid! What is wrong? Thank you! Cheers, Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17974#17974 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Import models from 3DS
Hi Sukender, Thank you very much for your answer, but that is not the problem. Textures associated to the model are loaded, I can see sticks and letters in the model, but is the colour which is white. Moreover, I can load with succes the model in my notebook computer with the same version of OSG but in the computer which I need to run the app do not. I do not understand why it is happening that. Excuse my English, I am from Spain. All help is welcome!! ... Thank you very much! Cheers, Felipe -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17976#17976 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)
Hi, i managed to reproduce the problem. And i even used another much simpler shader. This might tell us that the problem is not located in my shaders. Code: #include osg/Group #include osg/Geode #include osg/ShapeDrawable #include osg/Node #include osgViewer/Viewer #include osg/Texture2DArray #include osgDB/ReadFile #include string using namespace osg; void applyShader(Geode* geode) { ref_ptrProgram program = new Program; program-setName(TexturesTest); ref_ptrShader vertObj = new Shader(Shader::VERTEX); ref_ptrShader fragObj = new Shader(Shader::FRAGMENT); program-addShader(vertObj.get()); program-addShader(fragObj.get()); ref_ptrStateSet stateSet = new osg::StateSet; ref_ptrUniform texturesUniform = new Uniform(Uniform::SAMPLER_2D_ARRAY, textures, 0); stateSet-addUniform(texturesUniform.get()); stateSet-setAttributeAndModes(program.get(), StateAttribute::ON); ref_ptrTexture2DArray textureArray = new Texture2DArray; textureArray-setFilter(osg::Texture2DArray::MIN_FILTER, osg::Texture2DArray::NEAREST); textureArray-setFilter(osg::Texture2DArray::MAG_FILTER, osg::Texture2DArray::NEAREST); textureArray-setWrap(osg::Texture::WRAP_S, osg::Texture::CLAMP_TO_BORDER); textureArray-setWrap(osg::Texture::WRAP_T, osg::Texture::CLAMP_TO_BORDER); textureArray-setWrap(osg::Texture::WRAP_R, osg::Texture::CLAMP_TO_BORDER); textureArray-setTextureDepth(2); Image* image = osgDB::readImageFile(src/foo2.jpg); textureArray-setImage(0, image); textureArray-setImage(1, image); stateSet-setTextureAttribute(0, textureArray.get(), osg::StateAttribute::ON); std::string vertSource = void main() { gl_TexCoord[0].st = gl_MultiTexCoord0.st; gl_Position = ftransform(); }; vertObj-setShaderSource(vertSource); std::string fragSource = #version 120\n #extension GL_EXT_gpu_shader4 : enable\n uniform sampler2DArray textures; void main() { gl_FragColor = texture2DArray(textures, vec3(gl_TexCoord[0].xy*vec2(1.5,1.5), 0)); }; fragObj-setShaderSource(fragSource); geode-setStateSet(stateSet.get()); } int main(int argc, char** argv) { setNotifyLevel(osg::DEBUG_INFO); // Create a cube ref_ptrGroup rootNode = new Group; Box* cube = new Box(Vec3(0,0,0), 1.0f); ShapeDrawable* drawable = new ShapeDrawable(cube); Geode* geode = new Geode(); geode-addDrawable(drawable); rootNode-addChild(geode); // Apply our shader to this cube applyShader(geode); osgViewer::Viewer viewer; viewer.setSceneData(rootNode.get()); return viewer.run(); } http://www.jotschi.de/download/osg/Texture2DArrayClampingExample.cpp I resized the texture coords so that you can see that there is no clamping. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17977#17977 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)
Hi, even if i use st instead of the xy coords: Code: gl_FragColor = texture2DArray(textures, vec3(gl_TexCoord[0].xy*vec2(1.5,1.5), 0)); instead of: Code: gl_FragColor = texture2DArray(textures, vec3(gl_TexCoord[0].st*vec2(1.5,1.5), 0)); The problem is the same. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17978#17978 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Picking (computeIntersection) bug with POINT_ROT_EYE Billboards
Hi, I'm having trouble getting picking (via View::computeIntersection) to work on Billboards in POINT_ROT_EYE mode. Attached is a .osg file that creates a single billboard tree -- if I open this file with osgPick in OSG 2.9.5, I can only get a hit if I click near the very base of the tree. As far as I can tell this has always been a problem; billboard picking wasn't really supported at all pre-2.8. I tried tracing this through IntersectionVisitor and I couldn't figure out why it didn't work. I have two guesses: 1. A precision problem in the matrix math or 2. The billboard matrix is coming out differently in the visitor than in the actualy cull traversal. It seems to be using the intersection vector start point as the eyepoint when calculating the matrix for the billboard -- isn't this wrong? I'll keep looking at it, but I could really use a second set of eyes. Thanks! - Nathan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17980#17980 Billboard { DataVariance DYNAMIC nodeMask 0x cullingActive TRUE num_drawables 1 Geometry { DataVariance DYNAMIC StateSet { UniqueID StateSet_0 DataVariance STATIC rendering_hint TRANSPARENT_BIN renderBinMode USE binNumber 10 binName DepthSortedBin GL_LIGHTING OFF GL_ALPHA_TEST ON GL_BLEND ON AlphaFunc { DataVariance STATIC comparisonFunc GEQUAL referenceValue 0.05 } BlendFunc { DataVariance STATIC source SRC_ALPHA destination ONE_MINUS_SRC_ALPHA } textureUnit 0 { GL_TEXTURE_2D ON Texture2D { DataVariance STATIC file Images/tree0.rgba wrap_s CLAMP wrap_t CLAMP wrap_r CLAMP min_filter LINEAR_MIPMAP_LINEAR mag_filter LINEAR maxAnisotropy 1 borderColor 0 0 0 0 borderWidth 0 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply TRUE internalFormatMode USE_IMAGE_DATA_FORMAT resizeNonPowerOfTwo TRUE } TexEnv { UniqueID TexEnv_1 DataVariance STATIC mode MODULATE } } } useDisplayList TRUE useVertexBufferObjects FALSE PrimitiveSets 1 { DrawArrays QUADS 0 4 } VertexArray Vec3Array 4 { -0.125 0 0 0.125 0 0 0.125 0 0.24 -0.125 0 0.24 } ColorBinding OVERALL ColorArray Vec4Array 1 { 1 1 1 1 } TexCoordArray 0 Vec2Array 4 { 0 0 1 0 1 1 0 1 } } Mode POINT_ROT_EYE Axis 0 0 1 Normal 0 -1 0 Positions { 0.0 0.0 0.0 } } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MatrixTransform and particle system
Hi Tom, Thanks for helping out. I am indeed using a ModularEmitter and ParticleSystemUpdater. I was doing something like: effect-addChild(emitter); effect-addChild(program); effect-addChild(updater); geode-addChild(particleSystem); transform-addChild(geode); effect-addChild(transform); root-addChild(effect); I was expecting that if with no transform the particles are emitted towards +Z say, then I could add a rotation transform to emit them towards the +X axis for example. Not sure what was the problem with adding a MatrixTransform. The behavior was add one geode, the particles go towards +Z. Add a parent rotation to move towards +X, the particles still emit towards +Z. Now add another geode with particle system before previous one (no transform), and particles are emitted both towards +Z and +X (see first post)... What I did to solve my problem is that I computed the theta and phi angles of the desired rotation and set the emitter to those values using setThetaRange() and setPhiRange(). This works as intended. Either there is something I was doing wrong / not understanding before, or maybe there is a bug somewhere in osgParticle... cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-06-09 11:55 AM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, Do you have a ModularEmitter and ParticleSystemUpdater? If so, where are they in the scene graph? Are you expecting the particles, after being emitted, to move with the transform or stay in the world coordinate system. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 12:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Yes sorry I should have mentioned that... I am using 2.8.2. cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-05-09 12:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, What version of osg are you using? Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 11:18 AM To: OpenSceneGraph Users Subject: [osg-users] MatrixTransform and particle system I am trying to apply a transform to a particle system like this: _transform = new osg::MatrixTransform; _transform-setMatrix(osg::Matrix::rotate(fromDir, toDir)); _geode = new osg::Geode; _geode-addDrawable(particleSystem.get()); _transform-addChild(_geode.get()); addChild(_transform.get()); Unfortunately adding the transform does not transform my particles... However if I add another geode like this before the previous code: osg::ref_ptrosg::Geode pDummy = new osg::Geode; pDummy-addDrawable(particleSystem.get()); addChild(pDummy.get()); Then I have one set of transformed particles and one set of untransformed ones. Probably I am missing something simple here ? Anyone has a suggestion ? cheers ! bill ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Picking (computeIntersection) bug with POINT_ROT_EYE Billboards
nbmont wrote: I tried tracing this through IntersectionVisitor and I couldn't figure out why it didn't work. I have two guesses: 1. A precision problem in the matrix math or 2. The billboard matrix is coming out differently in the visitor than in the actualy cull traversal. It seems to be using the intersection vector start point as the eyepoint when calculating the matrix for the billboard -- isn't this wrong? I think it is #2. I was able to get pretty close to the desired behavior by messing with View::computeIntersections as follows -- Code: ... // original code starting at line 1877: osgUtil::IntersectionVisitor iv(picker.get()); iv.setTraversalMask(traversalMask); // NBM: kludge to make POINT_ROT_EYE billboards work iv.setReferenceEyePoint(osg::Vec3d(0.0, 0.0, 0.0)); iv.setReferenceEyePointCoordinateFrame(osgUtil::Intersector::VIEW); ... The gist of this is that it makes getEyePoint() in IntersectVisitor return the camera position in the model reference frame instead of the start point of the intersection vector. This gives me something pretty close to what I originall expected -- I can pick MOST of POINT_ROT_EYE billboard. But it still seems to miss around the edges. Btw I noticed AXIAL_ROT billboards also miss around the edges sometimes. Any ideas on what's going wrong? Am I understanding IntersectionVisitor correctly here? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17982#17982 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)
Hi, textureArray-setWrap(osg::Texture::WRAP_S, osg::Texture::MIRROR); textureArray-setWrap(osg::Texture::WRAP_T, osg::Texture::MIRROR); textureArray-setWrap(osg::Texture::WRAP_R, osg::Texture::MIRROR); does work with me. The textures will be mirrored. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17983#17983 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MatrixTransform and particle system
Hi Bill, I think what you want is to put the ModularEmitter under a Transform. A Geode with the ParticleSystem will be a sister to the Transform. Make sure the ModularEmitter has a reference to the same ParticleSystem in the Geode. The ParticleSystemUpdater will also need a reference to the ParticleSystem. You can control the direction (and position) of the particles with the Transform. I usually use a MatrixTransform. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Tuesday, October 06, 2009 1:25 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Tom, Thanks for helping out. I am indeed using a ModularEmitter and ParticleSystemUpdater. I was doing something like: effect-addChild(emitter); effect-addChild(program); effect-addChild(updater); geode-addChild(particleSystem); transform-addChild(geode); effect-addChild(transform); root-addChild(effect); I was expecting that if with no transform the particles are emitted towards +Z say, then I could add a rotation transform to emit them towards the +X axis for example. Not sure what was the problem with adding a MatrixTransform. The behavior was add one geode, the particles go towards +Z. Add a parent rotation to move towards +X, the particles still emit towards +Z. Now add another geode with particle system before previous one (no transform), and particles are emitted both towards +Z and +X (see first post)... What I did to solve my problem is that I computed the theta and phi angles of the desired rotation and set the emitter to those values using setThetaRange() and setPhiRange(). This works as intended. Either there is something I was doing wrong / not understanding before, or maybe there is a bug somewhere in osgParticle... cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-06-09 11:55 AM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, Do you have a ModularEmitter and ParticleSystemUpdater? If so, where are they in the scene graph? Are you expecting the particles, after being emitted, to move with the transform or stay in the world coordinate system. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 12:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Yes sorry I should have mentioned that... I am using 2.8.2. cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-05-09 12:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, What version of osg are you using? Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 11:18 AM To: OpenSceneGraph Users Subject: [osg-users] MatrixTransform and particle system I am trying to apply a transform to a particle system like this: _transform = new osg::MatrixTransform; _transform-setMatrix(osg::Matrix::rotate(fromDir, toDir)); _geode = new osg::Geode; _geode-addDrawable(particleSystem.get()); _transform-addChild(_geode.get()); addChild(_transform.get()); Unfortunately adding the transform does not transform my particles... However if I add another geode like this before the previous code: osg::ref_ptrosg::Geode pDummy = new osg::Geode; pDummy-addDrawable(particleSystem.get()); addChild(pDummy.get()); Then I have one set of transformed particles and one set of untransformed ones. Probably I am missing something simple here ? Anyone has a suggestion ? cheers ! bill ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MatrixTransform and particle system
Thanks Tom ! So the transform is applied to the emitter, not the geode / drawable... This makes sense :-) cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-06-09 3:19 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, I think what you want is to put the ModularEmitter under a Transform. A Geode with the ParticleSystem will be a sister to the Transform. Make sure the ModularEmitter has a reference to the same ParticleSystem in the Geode. The ParticleSystemUpdater will also need a reference to the ParticleSystem. You can control the direction (and position) of the particles with the Transform. I usually use a MatrixTransform. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Tuesday, October 06, 2009 1:25 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Tom, Thanks for helping out. I am indeed using a ModularEmitter and ParticleSystemUpdater. I was doing something like: effect-addChild(emitter); effect-addChild(program); effect-addChild(updater); geode-addChild(particleSystem); transform-addChild(geode); effect-addChild(transform); root-addChild(effect); I was expecting that if with no transform the particles are emitted towards +Z say, then I could add a rotation transform to emit them towards the +X axis for example. Not sure what was the problem with adding a MatrixTransform. The behavior was add one geode, the particles go towards +Z. Add a parent rotation to move towards +X, the particles still emit towards +Z. Now add another geode with particle system before previous one (no transform), and particles are emitted both towards +Z and +X (see first post)... What I did to solve my problem is that I computed the theta and phi angles of the desired rotation and set the emitter to those values using setThetaRange() and setPhiRange(). This works as intended. Either there is something I was doing wrong / not understanding before, or maybe there is a bug somewhere in osgParticle... cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-06-09 11:55 AM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, Do you have a ModularEmitter and ParticleSystemUpdater? If so, where are they in the scene graph? Are you expecting the particles, after being emitted, to move with the transform or stay in the world coordinate system. Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 12:09 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Yes sorry I should have mentioned that... I am using 2.8.2. cheers ! bill From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jolley, Thomas P Sent: October-05-09 12:42 PM To: OpenSceneGraph Users Subject: Re: [osg-users] MatrixTransform and particle system Hi Bill, What version of osg are you using? Tom Jolley From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: Monday, October 05, 2009 11:18 AM To: OpenSceneGraph Users Subject: [osg-users] MatrixTransform and particle system I am trying to apply a transform to a particle system like this:
Re: [osg-users] Texture Wrapping Texture2DArray (Clamping doesn't work)
Hi, i read that clamping is not supported when using s3c texture compression so perhaps the internal format in which the texture2darray is stored affects the clamping behaviour? Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17985#17985 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How to open OSG in a CView MFC ?
Resolution of the problem: If someone has the same problem as me, fallow this explication: http://www.openscenegraph.org/projects/osg/changeset/7152 for me it work -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17987#17987 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] setUpViewerAsEmbeddedInWindow and wxPython glcanvas
Robert, Thank you, that helped a lot. My C++ code has now come up and run in a Python GLUT test bed program, though I'm still having problems with wxPython. I'll keep at it. One question: the osgViewerGLUT example holds the reference to its osgViewer::GraphicsWindow in an osg::observer_ptr, rather than an osg::ref_ptr. What's the reasoning behind that? Randolph On 2009-10-06, Robert Osfield robert.osfi...@gmail.com wrote: Hi Randolf, I have never tried what you are doing but, but use of GraphicsWindowEmbedded feature of osgViewer is pretty straightforward, have a look at the osgviewerSDL and osgviewerGLUT examples for guidance, your own code shouldn't need to be much different than these. Robert. On Tue, Oct 6, 2009 at 3:39 AM, Randolph Fritz rfritz...@gmail.com wrote: Does anyone have an example of this? I'm developing a C++ class that I'm importing via Boost.python. I can't figure out what arguments to pass, what methods to call, or when to call them. yet I know people have done this. Anyone? -- Randolph Fritz design machine group, architecture department, university of washington rfr...@u.washington.edu -or- rfritz...@gmail.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Randolph Fritz design machine group, architecture department, university of washington rfr...@u.washington.edu -or- rfritz...@gmail.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Databasepager + multiple views + different camera positions = memory leak?
Hello, (i am using OSG 2.8.2) Let me try to explain the problem : I have a big database (TerraPage). I load it into my application. I have two views (cameras) within a window and i can position each camera individually looking directly down at the terrain ( I am using orthographic projection ). If I move 2 cameras to an identical location everything is fine, and I can keep moving them to the same position. However, when i move them to a different locations ( looking at different tiles i presume). The memory usage starts to increase at about 0.5mb per second and never stops. It seems to only happen when i use setViewAsLookAt which changes the modelview matrix. I used to move around the map using the ortographic projection matrix(by setting left and right top and bottom params) i have never noticed the memory increase. In other words it seems that having 2 views with cameras positioned in different places break something in the databasepager. I have tried playing with some settings such setTargetMaximumNumberOfPageLOD or calling clear on the database pager. Does anyone have or had similar issues? I have no idea how to debug this. Is what i am saying possible? and the databsepager has a bug? Does anyone have any ideas? How to debug this? How to rule out the that there is a bug in databasepager? Any help or advices are appreciated. Thanks! Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17989#17989 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Mouse Cursor troubles
Hello, Basically, I want the mouse cursor to be shown in my application. I'm doing this using GraphicsWindow::setCursor(...) and GraphicsWindow::useCursor(...) (as suggested in another thread (http://forum.openscenegraph.org/viewtopic.php?t=2902), although calling this method should not strictly be necessary) Trouble is, the mouse cursor is only displayed (and is changed properly to some application specific one as specified by useCursor()) when the application window has lost focus. Can anyone shed some light on why this might be happening? I'm using OSG version 2.8.2 on Windows. Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17967#17967 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] wxPython and CullVisitor nan on Mac
It looks like I've rediscovered the following wxWidgets on Mac problem: Also, once I add something to my scene, I get the following error printed every frame: CullVisitor::apply(Geode) detected NaN, depth=nan, center=(0 0 0), matrix={ nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan } More details at http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2009-June/029500.html Anyone remember this? Any ideas on how to debug it or what to do about it? -- Randolph Fritz design machine group, architecture department, university of washington rfr...@u.washington.edu -or- rfritz...@gmail.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] osgOcean collision detection
Hi all, the code that Jean Claude posted works like a sweet. I also wrote a function similar to biLinearInterp to interpolate the normals of 4 vertices. I renamed the function getHeightAt(x,y) to getSurfaceDataAt(x,y) that return an osg::Vec4f now. The x,y,z represent the interpolated normal and the w the surface height. Now when you apply rotation and translation (only the height) to an object you might except from seeing the object to follow the motion of the waves you can see it rotate a little bit, like it should be in real life. I will post the code soon. One other thing what is the functionality of _isDirty and buid() in Jean Claudes code ? It will save me a lot of time. Thanks! Cheers, Dimitrios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17992#17992 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org